Comments (5)
I'm not sure why you'd get that warning, but I do know that Firefox can be picky in regards to detecting transition changes. Try the following test, which sets width to 10% before the animation:
http://jsbin.com/AXuHiqEH/30/edit
from tram.
The test ran fine without any warnings.
In hindsight, it's probable that my issues are specific to jQuery 2,1
I just removed any extra js inclusions and reduced it to jQuery 2.1 and Tram 0.7 ... the warning and "then" problem is there. So I'll chalk it up to a jQuery 2.1 thing. Those matters aside everything's working well with 2.1. ;)
from tram.
Interesting.. can you isolate it and provide a JSBin link? I'd like to fix it if possible.
from tram.
Here's a primitive version of code reproducing the error and warning:
The error was never shown in the console, because the "then" was silently discarded. So I compensated for that using a setTimeout on line: 94. The console does however show the perpetually collecting warnings that occur on every transition. I tested for the warning in Firefox and Chrome, and they exist in both.
Hope this helps.
from tram.
I apologize for the lack of docs to support this, but here is the fix..
In the following code:
// slide out the current article, then reset its position
tram(page_articles[current_article]).start(adjust).then(function(){
// then reset its position and continue the progress bar
tram(page_articles[current_article]).set({left:page_width+'px'}).then(function(){
article.progress(current_article);
});
});
Once the first then()
has fired, the queue is finished and the animation is complete.
Also, set()
is instant, and not part of the queue, therefore cannot have a then()
directly after. Your nested function should look something like this instead:
// then reset its position and continue the progress bar
tram(page_articles[current_article]).set({left:page_width+'px'});
article.progress(current_article);
from tram.
Related Issues (20)
- Bad selectors throw a fatal error HOT 2
- Support SVG dash offset
- Add failsafe for rAF bug in iOS Chrome HOT 1
- Getting an undefined on `wait()` HOT 3
- Make it possible to chain tram onto jquery HOT 2
- Allow set() to apply "auto" HOT 6
- Support chaining with wait() HOT 3
- GPU layering approach info? HOT 2
- Git rid of Makefile?
- jQuery Collections Ignore 'Then' HOT 1
- Matrix transform support? HOT 8
- Call then() after something has had stop() called HOT 6
- Support for IE HOT 2
- The transform example did not work on Chrome Version 34.0.1847.137 m HOT 4
- Project still maintained? HOT 1
- Feature idea: specify time using number only HOT 2
- Support CSS filters
- Test `display: none` + set() + start()
- Fix unit tracking in transform properties
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tram.