Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

ScrollTop and ScrollLeft not respected #144

Open
sabufrancis opened this issue Aug 9, 2015 · 0 comments
Open

ScrollTop and ScrollLeft not respected #144

sabufrancis opened this issue Aug 9, 2015 · 0 comments

Comments

@sabufrancis
Copy link

Hi
I am using FreeTransform plugin in an application where I've implemented a zoom and pan feature too. Moreover; the page in which the rendered canvas exists has a vertical scrollbar.

I noticed that when I hav scrolled the page down; and as I drag an object the mouse is one location but the object is itself shifted

I implemented the following in the draggables.map(function(draggable) (approx line 596)

ft.attrs.translate.x = ft.o.translate.x + dx - $(window).scrollLeft()* ft.o.viewBoxRatio.x;;
ft.attrs.translate.y = ft.o.translate.y + dy - $(window).scrollTop()* ft.o.viewBoxRatio.y;

The above seems to work (I am assuming Jquery is present)
Is there anywhere else I have to change ?

Regards
Sabu Francis

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant