- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to keep the image at the back of the HTML5 canvas when moving elements with fabric.js?
To keep the image at the back of the canvas, when move elements, you need to pass:
preserveObjectStacking
And the following would work and the image is not visible in the background:
window.canvas = new fabric.Canvas('c', { preserveObjectStacking:true });
Now, on moving the shape will appear over the image.
- Related Articles
- HTML5 Canvas layer disappears on mouse click in Fabric.js and Firefox stops responding when creating a canvas for the image?
- How to rotate an image with the canvas HTML5 element from the bottom center angle?
- Layers of canvas fabric.js
- HTML5 drawImage() method to draw image onto the canvas
- Play video on canvas and preserve the last frame/image on HTML5 Canvas
- How to save DIV as Image with HTM5 canvas to image with the extension?
- How to copy the content of one HTML5 Canvas to another Canvas locally?
- How to use images with HTML5 canvas?
- Draw part of an image inside HTML5 canvas
- Load image from url and draw to HTML5 Canvas
- How to save and restore the HTML5 Canvas states?
- Is HTML5 canvas and image on polygon possible?
- How to actually work with HTML5 Canvas camera/viewport?
- How to handle mousedown and mouseup with HTML5 Canvas
- How to draw a Bezier Curve with HTML5 Canvas?

Advertisements