When utilizing fabric.js to draw a new path with isDrawingMode: true
enabled (seen on the right side of the screenshot), I am encountering an issue where the path appears above my overlay image, which is a transparent png.
https://i.stack.imgur.com/R3fGn.png
var canvas = this.__canvas = new fabric.Canvas('c', {
isDrawingMode: true,
preserveObjectStacking: true
});
var img = fabric.Image.fromURL(imgUrl, function(oImg) {
oImg.scaleToWidth(canvas.getWidth());
oImg.id="OverlayImage";
canvas.setOverlayImage(oImg, canvas.renderAll.bind(canvas));
});
The issue only arises once I finish drawing the path.
I have attempted using multiply filter and adjusting stacking order during mouse move events, but have not had any success.
If you have any ideas on how to resolve this, please share!