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

ScrollTop and ScrollLeft not respected #144

Description

@sabufrancis

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions