#4316 closed bug (fixed)
Element jumps to wrong position after "scale" effect with origin: ['middle','center'] parameter
Reported by: | marteadrian | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.effects.* (individual effect) | Version: | 1.7 |
Keywords: | scale effect ui | Cc: | |
Blocked by: | Blocking: |
Description
Code:
$(document).ready(function(){ $('.scale').click(function() { $(this).effect("scale", {percent:200, origin: ['middle','center']}, 1000); }); });
the element resizes well, but after the transition (and before the
callback function executes) the element jumps back to it's original
(unresized) position. (the left and top position changed because of
the origin [middle,center] parameter).
You can see an example here: http://neu.optiongolf.com/fileadmin/templates/test.html
Change History (8)
comment:1 Changed 14 years ago by
Milestone: | TBD → 1.8 |
---|
comment:2 Changed 13 years ago by
comment:4 Changed 12 years ago by
A temporary fix I have found is to remove the 'restore' function call after the effect has been performed.
Remove this block of code from the end of the Scale function:
c.effects.restore(a, n?e:g);
A top and left css property is also added to the element. Simply place some jquery css on the effect callback to prevent this:
$('#element').css('top', '0').css('left', '0');
comment:5 Changed 12 years ago by
https://github.com/tomykaira/jquery-ui/commit/ca8d70dbbf9eff0057cf67f695e66b8c40cec09b
Here is a clean patch for this issue. I add new top and left in el.to object.
comment:6 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Effects.scale: Update the position of the element post animation to avoid jumping - Fixed #4316 - Element jumps to wrong position after scale effect with origin: ['middle','center'] parameter
Changeset: c1f71f1c2f732e58a8fbca91185a284ea8db6b1b
comment:7 Changed 10 years ago by
this is NOT fixed, you can even see the repositioning in the above URL
can confirm this; I would recommend bumping severity, as currently it's impossible to enlarge stuff with non top/left gravity