"/> ">

Home >Web Front-end >HTML Tutorial >In Fabric.js, when creating a canvas for an image, the HTML5 canvas layer disappears on mouse click and Firefox stops responding

In Fabric.js, when creating a canvas for an image, the HTML5 canvas layer disappears on mouse click and Firefox stops responding

WBOY
WBOYforward
2023-08-27 09:45:02636browse

In Fabric.js, when creating a canvas for an image, the HTML5 canvas layer disappears on mouse click and Firefox stops responding

If the HTML5 canvas layer disappears on mouse click in Fabric.js and Firefox stops responding when creating the canvas to the image, you can drag and drop images from your computer via Fabric to the canvas.

You can achieve this by setting the draggable attribute of the image to true −

<img  draggable = "true" alt="In Fabric.js, when creating a canvas for an image, the HTML5 canvas layer disappears on mouse click and Firefox stops responding" >

The above is the detailed content of In Fabric.js, when creating a canvas for an image, the HTML5 canvas layer disappears on mouse click and Firefox stops responding. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete