Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag & drop after rotaion. #102

Closed
classic12 opened this issue Dec 15, 2009 · 6 comments
Closed

Drag & drop after rotaion. #102

classic12 opened this issue Dec 15, 2009 · 6 comments

Comments

@classic12
Copy link

@classic12 classic12 commented Dec 15, 2009

No matter what I try (apart from not rotating the object) I cannot
get the object to drag and drop properly in FF once rotated. I have
have the following code on the top slider :

rotate1 = event.getValue(); // the value from the slider 1-360;

Which ever I use I get the same error.
selecteditem.rotate(rotate1,true);
selecteditem.attr({rotation:rotate1,});

Also if I set the rotate attribute elsewhere I get the same issue.

   function Button6JSClick($sender, $params)
   {

   ?>
   //Add your javascript code here

   selecteditem.translate(0,-10);
   return false;
   <?php

   }

Once rotated the button press results in the translate going in the direction of the roration and not as expected

@DmitryBaranovskiy

This comment has been minimized.

Copy link
Owner

@DmitryBaranovskiy DmitryBaranovskiy commented Mar 18, 2011

Fixed in 2.0

@dantaylor

This comment has been minimized.

Copy link

@dantaylor dantaylor commented Nov 13, 2011

This is still broken in 2.0

if you rotate an element by any angle, that angle is then used on any x or y translate so if you rotate 180 you will get x and y inverted .. this is not like that on 1.5.2

@DmitryBaranovskiy

This comment has been minimized.

Copy link
Owner

@DmitryBaranovskiy DmitryBaranovskiy commented Nov 14, 2011

This is correct behaviour.

@dantaylor

This comment has been minimized.

Copy link

@dantaylor dantaylor commented Nov 14, 2011

If this is the correct behavior .. how can I make it work like the previous version? I appreciate your help. Thanks.

@danbramall

This comment has been minimized.

Copy link

@danbramall danbramall commented Nov 14, 2011

Hi, someone on StackOverflow pointed me here as I'm having the exact same issue. I understand that the behaviour is correct but am struggling to find a solution to some (what should be simple) draggable/rotatable objects. I basically just need to have several objects on the canvas - each able to be dragged and dropped and rotated - like a room planner for example. The code is here, but as you can see, the result is just not working as you'd expect as a user: http://jsfiddle.net/QRZMS/ - any advice greatly appreciated Dmitry! Many thanks.

@AliasIO

This comment has been minimized.

Copy link

@AliasIO AliasIO commented Dec 4, 2011

If it helps. I created a plugin that takes care of this. Demo here:

http://elbertf.com/raphael/free_transform/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.