Comments (10)
i don't think is easy. u'll have to create a separate path :s as far as I know. unless jQuery has some new functionality to abort animations.
from jquery.path.
Well, there is the step function of the method. I've been playing around with it. Although, I haven't exactly figure it out. I think it has the potential to function this way.
However, when applying it to your plugin, the step function does not seem to return any values.
What do you mean create a separate path?
from jquery.path.
Bah.. I didn't mean to hit Comment and Close...
from jquery.path.
could u use stop (http://api.jquery.com/stop/) within the step function perhaps ?
from jquery.path.
Well, I haven't quite figured out how to call stop() from within the step function if you even can, but you can do some neat things with it. I have some code, but I don't know how to post it in there.
On the other hand, I can't get the step function to work while using your Path plugin. Perhaps I'm missing something?
from jquery.path.
Ok, just figured out how to call stop() from step, but it doesn't work with your Paths plugin. The same data isn't being accessed when being pushed through Paths.
from jquery.path.
Check it out..
Change
var css = fx.end.css(1 - fx.pos)
to
var css = fx.end.css(fx.pos/2)
Could change the code to accept a param there maybe.
from jquery.path.
Alright, so I'm still hacking away at this. I brought the divisor in as a param, not sure that's the way to go though. Playing around with some loops now to see if I can make the divisor work...
from jquery.path.
try
var css = fx.end.css(1 - fx.pos*param)
where param is between 0 and 1
from jquery.path.
I was able to get an animation to stop at an arbitrary point along the curve by using step and stop()
{step: function(now, fx) {
if (fx.pos > .5) {$(this).stop(true, false)}; //when the position param of fx gets bigger than .5, stop the animation
}
}
from jquery.path.
Related Issues (20)
- How can I continue animation from point I stopped it ? HOT 1
- how can I draw lines? HOT 1
- How to animate along on oval HOT 1
- 360 loop using Arc HOT 1
- custom path HOT 3
- Reversed SineWave HOT 1
- Issue with Safari 6.0.2 and Firefox 17.0 HOT 3
- How to achieve a projectile path ? HOT 3
- How to not repositionning elements? HOT 1
- Units & scale HOT 2
- Arc Function Enhancement
- Resume animation HOT 1
- Not working in Chrome Version 33.0.1750.154 m (latest version) HOT 1
- Is it possible to animate path plotting itself instead of the object in path? HOT 1
- Demos are not working in latest Chrome HOT 2
- What is the p parameter in the SineWave function? HOT 2
- demo not working - missing html tag? HOT 2
- Getting error $.path is undefined
- Can i stop animation before ending point? HOT 3
- License 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 jquery.path.