【发布时间】:2016-03-26 11:00:20
【问题描述】:
我是fabtric js的新手。如何将自动生成的 id 和自定义属性添加到 fabric js 对象。 例如,我想添加一个 id,该 id 使用对象类型和类别的增量整数自动生成:添加对象时为 'new'
据我所知,fabric js 默认不支持这个。
var text = new fabric.IText('Enter text here', {
id: 'text-i' -> where i increment according to number of IText in the canvas
left: 150,
top: 50,
type: 'new'
});
【问题讨论】:
标签: fabricjs