Commit 465bcbd3 authored by S Anand's avatar S Anand

BUG: regression error -- restore trigger('stop',[position])

parent e9b3884f
......@@ -39,10 +39,6 @@ $.fn.doodle = function(options) {
.on('stop.g.doodle', function(e, position) {
if (!request_id)
return
// Cancel ticks as well as loop
request_id = global.cancelAnimationFrame(request_id)
if (timeout_id)
timeout_id = global.clearTimeout(timeout_id)
if (typeof position != 'undefined') {
// Move to specified position. 1 is the end, 0 is the start
start_pos = position
......@@ -52,6 +48,10 @@ $.fn.doodle = function(options) {
// Store the current pos as start_pos to allow resuming
start_pos = pos
}
// Cancel ticks as well as loop
request_id = global.cancelAnimationFrame(request_id)
if (timeout_id)
timeout_id = global.clearTimeout(timeout_id)
})
.on('start.g.doodle', function(e, position) {
if (request_id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment