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.

Rotate issue if origin of paper is not (0,0) #125

Open

Description

@neilyoung

Hi,

I'm using your fine component with great success. Now I need to origin the paper on another point, not at (0,0).

There is an issue with the rotation behavior of an object, if the paper is not originated at (0,0).

Here is your sample code with one change: I'm forced to NOT allow handles for rotation, so the FreeTransform is setup like this:

ft = paper.freeTransform(rect, { keepRatio: true, rotate:['self']}, function(ft, events) {
    console.log(ft.attrs);
});

This works fine with your sample as shown here:

http://maps.alphadex.de/ra/sample.html

You can touch the object and rotate it.

Now I'm just instantiating the paper at a different left offset:

var paper = Raphael(400, 0, 500, 500);

The result is shown here:

http://maps.alphadex.de/ra/fail.html

Please not the horrible rotate behavior. BTW: It rotates fine, even if relocated, if I rotate using the handles, but this is no option in my case, unfortunately. It does also not rotate correctly, if the top offset is other than 0, either alone or together with a >0 left offset.

Any pointer welcome.
Regards

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