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 custom icon
isVML = function() { return typeof G_vmlCanvasManager !== 'undefined'; };
// overriding _drawControl method
fabric.util.object.extend(fabric.Object.prototype, {
hasRotatingPoint: true,
cornerSize: 25,
_drawControl: function(control, ctx, methodName, left, top) {
if (!this.isControlVisible(control)) {
return;
}
var size = this.cornerSize;
isVML() || this.transparentCorners || ctx.clearRect(left, top, size, size);
if(control !== 'mtr')
ctx['fillRect'](left, top, size, size);
var SelectedIconImage = new Image();
if(control === 'mtr') {
SelectedIconImage.src = 'http://s1.postimg.org/6lqguc8rf/rotate.jpg';
ctx.drawImage(SelectedIconImage, left, top, size, size);
}
}
});
This is jsfiddle