Fabric Js Custom Rotate Icon Is Not Visible In Only Iphone's Google Chrome Browser
I have created an editor in fabric js. I am using custom icon for rotate and this is not visible only in iphone's google chrome. Please give me solution. This code i am using for c
Solution 1:
It may be a image loading issue.
if(control === 'mtr') {
if (this.isLoaded) {
ctx.drawImage(this.selectedIconImage, left, top, size, size);
} else {
var self = this;
this.selectedIconImage.onload = function() {
self.isLoaded = true;
ctx.drawImage(self.selectedIconImage, left, top, size, size);
}
this.selectedIconImage.src = this.iconSrc;
}
}
First of all update your fiddle to fabricjs 1.5.0, this function is not working on 1.4.0.
As you see you are reloading the icon every frame draw. This is not optimal at all and may cause the drawImage function to draw a still refreshing image element.
Try this fiddle on iphone and check if it is working, maybe not at first select but at least on moving of object.
Post a Comment for "Fabric Js Custom Rotate Icon Is Not Visible In Only Iphone's Google Chrome Browser"