You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@asturur I think I remember. If you resize the object and while resizing moving the mouse over the scrollbar of the layer-div, the size of the objects jumps. http://jsfiddle.net/r2ZE7/299/
But If you remove this if statement it works the same way. I think we can drop this.
Another issue exists with freedrawing. If you draw a line and moving the mouse over the scrolled scrollbar, the freedrawing line jumps.
There is an issue when a canvas is placed in a scrollable div. When you scroll the pointer position is off by the amount scrolled.
The issue is with the scroll value in the getPointer fn below. If you remove the scroll.left and scroll.top values it works fine.
function getPointer(event, upperCanvasEl){
event || (event = fabric.window.event);
var element = event.target ||
(typeof event.srcElement !== unknown ? event.srcElement : null),
scroll = fabric.util.getScrollLeftTop(element, upperCanvasEl);
return {
x: pointerX(event) + scroll.left,
y: pointerY(event) + scroll.top
};
}
Please see the following fiddle:
http://jsfiddle.net/mcannon/6sksLp30/3/
Thanks,
Matt
The text was updated successfully, but these errors were encountered: