Opened 6 years ago

Closed 3 years ago

#17285 closed enhancement (patchwelcome)

add resume() method and fix pause() method during delay phase

Reported by: satyanath Owned by:
Priority: undecided Milestone: 1.13
Component: fx Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:

Description

I have been using dojo for creating some eLearning course in html5. Some of the slides have complicated animation with lot of objects being animated in a sequence and often with some gaps. So the obvious choice was to use the dojo/_base/fx animation. The courses required a feature to be able to pause and resume the slides later. Also the slides had voice over and audio syncing had to be done with the animation.

I give below the problems I faced and also the patched fx.js file which can be used to rectify the problem. Please consider the change and put incorporate it into the main stream.

Some of the problems I faced were:

1) The animations do not have a resume routine after a pause. Yes I could use the pause, get the status and read the percentage completion and then go to that percentage. Most of my animations have a delay factor. The problem with go to percent is that the delay is started all over again. 2) On calling pause in the delay phase - does not pause the delay and resume it. That is if animation has not yet started I cant pause it at all. After the specified delay animation starts even though I had called pause().

I have patched the fx.js to solve these problems. I have introduced a routine called resume(). Also I have modified to code to allow pausing of the delay timer also and restarting the same.

Please consider and include this change into the main branch.

I have noticed the problem in version 1.8.1 but I guess it may be there on 1.9 also I have not yet checked it.

By the way I am very much impressed by the quality of the dojo software. Keep the good work you all are doing.

Attachments (1)

fx.js (21.3 KB) - added by satyanath 6 years ago.
Patched dojo/_base/fx.js file

Download all attachments as: .zip

Change History (12)

Changed 6 years ago by satyanath

Attachment: fx.js added

Patched dojo/_base/fx.js file

comment:1 Changed 6 years ago by satyanath

Looking at the source for 1.9.1 I find that there is no change to this portion. So looks like the bug is present in version 1.9.1 also.

comment:2 Changed 6 years ago by bill

#17337 is a duplicate of this ticket.

comment:3 Changed 6 years ago by bill

Can you open a pull request for these changes, including updating the existing test cases?

comment:4 Changed 6 years ago by satyanath

I am not familiar with Github and pull requests etc. Also I do not have much time to do further work on this. I can of course explain the changes I did. So I will not be able to update the test cases soon.

I read that I have to sign a CLA for this. I can do that. But I do not know how to go about doing it. Please let me know.

Regards, S.Satyanath

comment:5 Changed 6 years ago by bill

Summary: dojo/_base/fx animation routines - need modificationsadd resume() method and fix pause() method during delay phase
Type: defectenhancement

Github and pull requests and CLA's are all documented in the link I gave above, https://github.com/dojo/dojo/blob/master/CONTRIBUTING.md.

It's fine if you don't have time to make a test case etc., but it's unlikely that anyone will integrate your changes without it.

comment:6 Changed 6 years ago by satyanath

I have now created a pull request as requested. The pull request does have the ticket number so that it can be easily identified.

comment:7 in reply to:  5 Changed 6 years ago by satyanath

Replying to bill:

Github and pull requests and CLA's are all documented in the link I gave above, https://github.com/dojo/dojo/blob/master/CONTRIBUTING.md.

It's fine if you don't have time to make a test case etc., but it's unlikely that anyone will integrate your changes without it.

Hi Bill,

I have created the pull request around 4 months back. But find that nobody is picking this up. Actually the issue is, it has been changed to enhancement where as it should be a defect. Actually the existing animation is broken it does not handle the delay and hence is unusable. Request you to please have a look at this and convert this to a defect. Yes the pause and resume part may be an enhancement - but there is also a defect which needs to be fixed.

Regards, S.Satyanath

comment:8 Changed 6 years ago by bill

Yes, I see the pull request as https://github.com/dojo/dojo/pull/27 and if you follow that link and read the comment, you'll see why no one is picking it up.

comment:9 Changed 4 years ago by dylan

Milestone: tbd1.12

Hopefully we can get a testcase in for this, and land it for 1.12.

comment:10 Changed 3 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

comment:11 Changed 3 years ago by dylan

Milestone: 1.151.13
Resolution: patchwelcome
Status: newclosed

Given the lack of tests since this was first raised over 3 years ago, I'm going to assume that there's just not much interest in landing this unfortunately. I'm happy to reconsider this if it is reopened with corresponding Intern-based tests.

Note: See TracTickets for help on using tickets.