use fabric to achievement drawing board and support free drawing, line, rect,cirlce,eraser,text,pan,scale,undo,redo,clear, save(使用fabric实现画板功能,支持画笔,绘制直线,矩形,圆形,文字,移动缩放画布,撤销重做,清屏与保存功能)
hi,i used it with a plugin in project,but i found it impacted other vue ,can limit it effect only in a fixed vue? my project itself used fabric,the plugin lib eraser_brush.mixin.js /**
@private
@param {CanvasRenderingContext2D} ctx Context to render on
@param {string} property 'background' or 'overlay'
*/
_renderBackgroundOrOverlay: function(ctx, property) {
var fill = this[property + 'Color'],
object = this[property + 'Image'],
v = this.viewportTransform,
needsVpt = this[property + 'Vpt'];
if (!fill && !object) {
return;
}
if (fill || object) {
ctx.save();
if (needsVpt) {
ctx.transform(v[0], v[1], v[2], v[3], v[4], v[5]);
}
fill && fill.render(ctx);
object && object.render(ctx);
ctx.restore();
}
},
this line will has error fill && fill.render(ctx);when run project after use this plugin;the log is "Uncaught (in promise) TypeError: i.render
function".
hi,i used it with a plugin in project,but i found it impacted other vue ,can limit it effect only in a fixed vue? my project itself used fabric,the plugin lib eraser_brush.mixin.js /**