-
1. Re: Wondering about the difference between element and symbol drag with draggable
Zaxist Jun 9, 2013 3:39 PM (in response to resdesign)Dear redesign
that thing is that you made a copy of that box Symbol !, different between box and boxcopy is that you create the box symbol, but you did copy boxcopy from box, so that makes boxcopy to shift itself with the left and right you added to the stage, if you added 100px then it will get 100px as a 0px because it is the copy one of the original one, the original one have 0 and 0 px left and top so it will get the first position you mad for it ( 100px top 100px left ) as 0 , 0 position then will add that 100 pix to that, for example if you place your object boxcopy in 200px left and 200px right after you click it will shift to 400px left and 400px right because it will get 200px left and top a base position 0 , 0 and add 200px to that
solution : you have 2 choices
First : create your second symbol as new ( dont copy paste )
Second : put all of your symbol in the 0 , 0 and css them
in your example the css would be :
sym.$("boxCopy").css({"left":"100px", "top":"100px"})
sym.$("box").css({"left":"0px", "top":"0px"})
and all of your symbols (box and boxcopy) should place at 0 left and 0 top
i hop that i could help you to undrestand the problem
Zaxist
-
2. Re: Wondering about the difference between element and symbol drag with draggable
resdesign Jun 9, 2013 4:34 PM (in response to Zaxist)I am not sure it is the problem because if I have only box at say 100,100 then it will jump too. The only way to have a symbol not jump is to have it initially at 0,0
-
3. Re: Wondering about the difference between element and symbol drag with draggable
Zaxist Jun 10, 2013 12:07 AM (in response to resdesign)yes, you are right, i was wrong about the copy part...
but i'm sure about this:
it will get the first position you mad for it ( 100px top 100px left ) as 0 , 0 position then will add that 100 pix to that
but i dont know why symbol have this shift !!
Zaxist
-
4. Re: Wondering about the difference between element and symbol drag with draggable
resdesign Jun 10, 2013 11:11 AM (in response to resdesign)Could Anyone fom Adobe tell us what I am doing wrong?
-
5. Re: Wondering about the difference between element and symbol drag with draggable
resdesign Jun 12, 2013 7:04 AM (in response to Zaxist)OK. Joel gave me the solution.
After placing your symbols on the stage, delete the left and top lines in the symbol. This will reset to (0.0).
Here is the corrected file. You will see in the left panel that there is no left and top except for one to show the difference.
https://www.box.com/s/v2s8ueeqof9litu4zvwm




