当前位置:网站首页>Fabric. JS activation input box
Fabric. JS activation input box
2022-06-09 07:15:00 【InfoQ】
Brief introduction
HTMLinputinputautofocusJSfocusFabric.jsITextPractice
Fabric.jsITextHTMLinputBy default
Fabric.jsIText
<canvas id="canvasBox" width="600" height="600" style="border: 1px solid #ccc;"></canvas>
<!-- introduce Fabric.js -->
<script src="https://cdn.bootcdn.net/ajax/libs/fabric.js/521/fabric.js"></script>
<script>
const canvas = new fabric.Canvas('canvasBox')
const iText = new fabric.IText('', {
left: 100, // The distance from the input box to the left of the canvas
top: 100, // The distance from the input box to the top of the canvas
padding: 7 // Set the inside margin of the input box
})
canvas.add(iText) // Add an input box to the canvas
</script>
Activate the input box

// Omitted code
iText.enterEditing()
enterEditing()Further
enterEditing()Fabric CanvassetActiveObject()
// Omitted code
canvas.add(iText).setActiveObject(iText)
iText.enterEditing()
setActiveObject()summary
Fabric.jsCanvasFabric.jsapiCode warehouse
边栏推荐
- Do you really understand the logic that two objects are equal in dart?
- UML series articles (20) basic behavior - activity diagram
- Summarize the key knowledge of multithreading.
- 【快捷记录,方便CV】TeachYourselfSQL_MySQL
- 软件设计文档最容易忽略哪些?
- Apache 网页与安全优化
- Peripheral driver library development notes 42:dac8552 DAC driver
- 关于用户消息的推送
- How idea views the path to save code
- 2022年全国最新消防设施操作员(中级消防设施操作员)考试模拟题库及答案
猜你喜欢

Squid代理服务器应用

性能测试流程,指标,实现方法以及总结

Thread类的有关方法

InfoWorld article - applying data orchestration technology to AI model training

线程池的使用

Distributed message middleware -- Introduction to message queue

InfoWorld文章丨将数据编排技术用于AI模型训练

100 Go Mistakes and How to Avoid Them 之代码结构和项目组织(四)

【无标题】

UML series articles (21) high level behavior - events and signals
随机推荐
Clickhouse2 fragment 2 replica high availability cluster setup and chproxy proxy configuration
分布式消息中间件--消息队列介绍
Top view all processes
Web performance test case design model
[work direction] CONDA common command summary
使用postman模拟携带token的请求
朴素贝叶斯分类器
外设驱动库开发笔记42:DAC8552 DAC驱动
实现轮播图就是这么简单!!!
从Excel读取各种格式的日期转换为目标格式
10. 正则表达式匹配
The new colleagues optimized the project performance once, trembling
Flutter learning Hello World
C语言文件——字符读出与写入
Database final exam outline
Distributed message middleware -- Introduction to message queue
【工作向】conda常用命令汇总
UML series articles (23) advanced behavior -- process and thread
Thread类的有关方法
defineProperty