roll
roll copied to clipboard
On 'step' currStepProgress
Hey there, I'm looking to use this library for a simple project. I've got it all working well, but I'm running into some undesirable behavior:
On a step
or goto
event, the roll moves to the desired step, but the currStepProgress
defaults to approximately 25%. The reason this is undesirable is that I'm attempting to draw svg paths which correlate to the currStepProgress, so that when a step event occurs, they're already a quarter drawn. I'd like to be able to ensure that on this event, it sets the progress to zero or very close to it.
I'm perusing the source code, but i'd be grateful if you could point me in the right direction.
Hi Will, sorry about the late reply. I'm guessing this is probably due to the "padding" between chunks. If padding is 0, then the step progress should match exactly with the position. See if that solves your problem.
https://github.com/williamngan/roll/blob/master/src/roll.js#L182
On Thu, Jan 19, 2017 at 8:58 AM, Will Carron [email protected] wrote:
Hey there, I'm looking to use this library for a simple project. I've got it all working well, but I'm running into some undesirable behavior:
On a step or goto event, the roll moves to the desired step, but the currStepProgress defaults to approximately 25%. The reason this is undesirable is that I'm attempting to draw svg paths which correlate to the currStepProgress, so that when a step event occurs, they're already a quarter drawn. I'd like to be able to ensure that on this event, it sets the progress to zero or very close to it.
I'm perusing the source code, but i'd be grateful if you could point me in the right direction.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/williamngan/roll/issues/5, or mute the thread https://github.com/notifications/unsubscribe-auth/AEKCWpTbhdUeH1Wgw8U0lpGDC3gmoj9Hks5rT5YfgaJpZM4LoWXz .