Bug Tracker

Modify

Ticket #1607 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

It's not possible to animate an element to an absolute negative position.

Reported by: gensmann Owned by: john
Priority: major Milestone: 1.2.1
Component: effects Version: 1.2
Keywords: Cc:
Blocking: Blocked by:

Description

It's not possible to animate an element to an absolute negative position.

The new -/+ function in 1.2 for putting the animator into relative mode seems to affect when I wants to something like .animate({left: -1337}) and I don't whant to move it relative to the current position, but simple wants to move it to the position of left:-1337px.

in a specific example I want to move a container with the following code:

jQuery('.ghe_header_button', $areaHeader).each(function(index) {

jQuery(this).click(function() {

jQuery('div', $areaSlideContainer).css('overflow', 'hidden'); $areaSlideContainer.animate({left: $areaContainer.width() * index * -1}, 1500, 'swing',function(){

jQuery('div:eq('+ index +')', $areaSlideContainer).css('overflow', 'auto');

})

});

});

When I do it by using * -1 it switches to relative mode, however if I remove the * -1 part it moves it (forward) using absolute mode.

Change History

comment:1 Changed 6 years ago by sunsean

I've just committed this fix to SVN. Revision 3721

comment:2 Changed 6 years ago by gensmann

Seems like the fix isn't quite fixing it. Now it basically always does a positive absolute movement. Even if I throw -700 after it, it moves to the right. However it does it correct absolute now. It just seems like it don't know the difference between a postive and a negative integer and treats all as a positive?

comment:3 Changed 6 years ago by sunsean

Right you are, completely blew that by me. If this doesn't work I shall resign. Revision 3272

comment:4 Changed 6 years ago by john

  • Owner set to john

comment:5 Changed 6 years ago by john

  • Status changed from new to closed
  • Resolution set to fixed

Converted to the new -= / += format in SVN rev [3299].

comment:6 Changed 6 years ago by john

  • Component changed from core to fx

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.