Answer the question
In order to leave comments, you need to log in
How to set event via fabric.Image.fromURL constructor?
var imgOptions = { 'left': 50, 'top': 550, 'selectable': false }
imgOptions.__eventListeners = {};
imgOptions.__eventListeners['mouseup'] = [];
imgOptions.__eventListeners['mouseup'].push(function () {
console.log('mouseup event');
});
fabric.Image.fromURL('/url/mypng/', function(oImg) {
canvas.add(oImg);
}, imgOptions);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question