Set animation origin for individual steps?

34 views
Skip to first unread message

Eric Oliver

unread,
Feb 13, 2014, 10:26:18 PM2/13/14
to jmpr...@googlegroups.com
Hey all -

I see how to modify the animation origins for the entire slideshow (core properties originX and originY) but is there a way to set the animation origins for individual steps? That is to say, most steps in my presentation I'd like to have animating with a center-center origin, but a couple need to be center-bottom. I'm attaching an image of what I'm looking to do on an individual step (not on the whole animation).



The reason for wanting the origin this way is that I could create the impression of the circle spinning and items moving above it (rather than everything including the circle moving).

Does that make sense? Any ideas?


Tobias Koppers

unread,
Feb 14, 2014, 4:24:22 AM2/14/14
to jmpress.js
Hey Eric,

that's not possible by default, but you can hack it with a bit of javascript.

You can access (and change) the settings with this method: $('#jmpress').jmpress('settings')

So hook setActive and update the originX/Y to your needs.

You additionally need this code to reflect changes of the originX/Y after every slice change (maybe add a transistion too):

$.jmpress("applyStep", function( step, eventData ) {
$.jmpress("css", eventData.area, {
left: eventData.settings.originX,
top: eventData.settings.originY,
});
});


--
You received this message because you are subscribed to the Google Groups "jmpress.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmpressjs+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Eric Oliver

unread,
Feb 18, 2014, 8:02:52 PM2/18/14
to jmpr...@googlegroups.com, tobias....@googlemail.com
Thanks much - this was helpful. I did realize I was going about this the hard way, though -- was easier to do child steps and handle it that way.
Reply all
Reply to author
Forward
0 new messages