You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to add a background image to Canvas but it hides tools and shows those errors const canvas = new fabric.Canvas('canvas', { fireRightClick: true, stopContextMenu: true, controlsAboveOverlay: true, imageSmoothingEnabled: false, backgroundImage: 'https://cdn.pixabay.com/photo/2016/03/25/09/04/t-shirt-1278404_960_720.jpg', });
vue-router.js?v=e189ee66:2699 TypeError: instance[methodName] is not a function at klass._toObject (fabric.js?v=e189ee66:7251:46) at klass.callSuper (fabric.js?v=e189ee66:2366:52) at klass._toObject (fabric.js?v=e189ee66:9550:99) at klass._toObject (fabric.js?v=e189ee66:2331:53) at klass.__serializeBgOverlay (fabric.js?v=e189ee66:7277:43) at klass._toObjectMethod (fabric.js?v=e189ee66:7228:31) at klass.toDatalessObject (fabric.js?v=e189ee66:7215:25) at klass.toDatalessJSON (fabric.js?v=e189ee66:7199:25) at fabric.Canvas._historyNext (fabric-history.js?v=e189ee66:11:30) at fabric.Canvas._historyInit (fabric-history.js?v=e189ee66:15:124)
i try to add image to fabric ` fabric.Image.fromURL(
'https://cdn.pixabay.com/photo/2016/03/25/09/04/t-shirt-1278404_960_720.jpg',
function (oImg) {
oImg.set({
selectable: false,
evented: false,
lockMovementX: true,
lockMovementY: true,
lockScalingX: true,
lockScalingY: true,
hasControls: false,
hasBorders: false,
});
canvas.add(oImg);
oImg.viewportCenter();
canvas.setActiveObject(oImg);
}
);`
but it shows the image in Layer and when press undo it removes the image and I don't want that
What should I do?
The text was updated successfully, but these errors were encountered:
I am trying to add a background image to Canvas but it hides tools and shows those errors
const canvas = new fabric.Canvas('canvas', { fireRightClick: true, stopContextMenu: true, controlsAboveOverlay: true, imageSmoothingEnabled: false, backgroundImage: 'https://cdn.pixabay.com/photo/2016/03/25/09/04/t-shirt-1278404_960_720.jpg', });
vue-router.js?v=e189ee66:2699 TypeError: instance[methodName] is not a function at klass._toObject (fabric.js?v=e189ee66:7251:46) at klass.callSuper (fabric.js?v=e189ee66:2366:52) at klass._toObject (fabric.js?v=e189ee66:9550:99) at klass._toObject (fabric.js?v=e189ee66:2331:53) at klass.__serializeBgOverlay (fabric.js?v=e189ee66:7277:43) at klass._toObjectMethod (fabric.js?v=e189ee66:7228:31) at klass.toDatalessObject (fabric.js?v=e189ee66:7215:25) at klass.toDatalessJSON (fabric.js?v=e189ee66:7199:25) at fabric.Canvas._historyNext (fabric-history.js?v=e189ee66:11:30) at fabric.Canvas._historyInit (fabric-history.js?v=e189ee66:15:124)
);`
but it shows the image in Layer and when press undo it removes the image and I don't want that
What should I do?
The text was updated successfully, but these errors were encountered: