Closed michael-brade closed 3 years ago
This is totally intended. You clone the element and set a new y-value in your first case.
In your second case, you add a new y value to the use
element. It means, you shadow copy the rectangle with its dy of 3 and then add another y of 9. If you give use
a position it will move the copied element by that amount. The copied element is at y=3 and its moved by 9
Oh, darn. Thanks :-) So I cannot use
an element and absolutely change the position? Fair enough, I'll just clone then :)
Hi,
if I paste the following code
in this fiddle, then you can see that the green rect is below the red rect, even though both have their
y
value set to the same value.However, if I remove the
.dy(3)
in line 4 (marked withHERE
), then the green rect ends up in the correct position.This doesn't seem to be intentional ;-) Or am I wrong?