Opened 14 years ago

Closed 12 years ago

Last modified 10 years ago

#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:



  $('.scale').click(function() {
                   {percent:200, origin: ['middle','center']}, 

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:

Change History (8)

comment:1 Changed 14 years ago by Scott González

Milestone: TBD1.8

comment:2 Changed 13 years ago by AzaToth

can confirm this; I would recommend bumping severity, as currently it's impossible to enlarge stuff with non top/left gravity

comment:3 Changed 12 years ago by Corey Frang

Status: newopen

comment:4 Changed 12 years ago by dclawson

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 tomykaira

Here is a clean patch for this issue. I add new top and left in object.

comment:6 Changed 12 years ago by Corey Frang

Resolution: fixed
Status: openclosed

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 dmack

this is NOT fixed, you can even see the repositioning in the above URL

comment:8 Changed 10 years ago by Scott González

@dmack It was fixed, but it regressed.

Note: See TracTickets for help on using tickets.