Ticket #1607 (closed bug: fixed)
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: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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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