Comments (4)
If you can post an example on bl.ocks.org or similar so I can take a look, that’d be great. If you can’t, unfortunately I can’t think of an immediate reason why the code above wouldn’t work as expected… sorry.
from d3-ease.
Yep here's a pen that has the issue. That example is using v3 but it's essentially the same issue. It would take me a few days as I don't have time right this but I can update pen that to v4 if it'd be helpful.
Here's what I'm seeing:
May be a little tough to see in the gif, but it essentially just jerks back and forth erratically during the rotation.
You should be able to see the issue in Chrome (v60.0.3112.101 in my case), but if you open in another browser (Firefox is the other I tested) the animation runs perfectly. Thanks for your help!
from d3-ease.
Thanks, that identified the problem. It’s your style here:
#q-loader * {
transition: all 500ms;
}
When you do that, any change you make to a style on any descendent of #q-loader has a 500ms transition. In modern browsers, SVG presentation attributes have been unified with styles, so this style rule also applies to the transform attribute you are setting through JavaScript. Each time JavaScript changes the transform attribute, it triggers a new CSS transition, so the JavaScript doesn’t have a chance to run.
Either you should disable (or reduce the scope) or your transition CSS style, or you should not just JavaScript to run the transition.
from d3-ease.
Ah I see, that makes sense. Didn't realize transition
would affect transform
attribute. Thanks for your help!
from d3-ease.
Related Issues (16)
- Consider using a more generic easing library HOT 5
- Accelerate, then coast?
- Rename ease(type[, parameters…]) to bind?
- Remove non-in aliases.
- Need an ease interface. HOT 14
- update docs with npm version HOT 1
- README needs API reference.
- README references obsolete APIs. HOT 3
- Return values of 0 and 1 are not always as expected HOT 2
- Cubic Bézier easing? HOT 1
- broken Map polyfill HOT 1
- Register with bower. HOT 1
- Don’t ignore NaN parameters? HOT 2
- Symbols, not strings? HOT 1
- bounce optional params HOT 1
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 d3-ease.