Timeline doesn't support touch scroll events in iOS and Android

218 views
Skip to first unread message

Scott

unread,
Mar 9, 2012, 2:54:57 PM3/9/12
to wp-simile-timeline
I love the timeline and have it filled up nicely, but have noticed
that the plugin doesn't support use from iPad's, iPhones, Androids...
etc. It delivers a nice static image of the Timeline at your
established starting point, but doesn't recognize touch events for
horizontal scrolling in either band.

I saw a post somewhere adding this functionality for the MIT codebase
(I think), but wondered if this was on something that could be added
to the WP plugin?

Thanks,
Scott

ctgs...@gmail.com

unread,
Mar 13, 2012, 12:16:06 AM3/13/12
to wp-simile...@googlegroups.com


On Friday, March 9, 2012 11:54:57 AM UTC-8, Scott wrote:

Just to help a little, for anyone looking at this...  I found the post with the javascript fix for the regular Simile API to work... (just not the WordPress plugin version). 
 
http://code.google.com/p/simile-widgets/issues/detail?id=278&q=touch&colspec=ID%20Project%20Type%20Status%20Priority%20Fixed%20Owner%20Summary
 
I am going to try to poke around and see if I can get it to work... but I definitely would appreciate help from the more experienced coders.

Cheers!
 

ctgs...@gmail.com

unread,
Mar 13, 2012, 1:01:20 AM3/13/12
to wp-simile...@googlegroups.com

Ok... it looks like I was able to get this to work by using the JavaScript edits made in the other post I linked previously. 
1. I copied the 'api' directory inside 'local_example.zip' downloaded from the bottom of this post (http://code.google.com/p/simile-widgets/issues/detail?id=278&q=touch&colspec=ID%20Project%20Type%20Status%20Priority%20Fixed%20Owner%20Summary) to my site's Simile plugin folder (/wp-content/plugins/wp-simile-timeline).
2. I edited the timeline plugin in the WordPress plugin editor to reference the local Javascript file instead of the remote version.  The original line read:
@define('STL_TIMELINE_API_URL', 'http://api.simile-widgets.org/timeline/2.3.1/timeline-api.js?bundle=true');
The new line reads:
@define('STL_TIMELINE_API_URL', STL_TIMELINE_FOLDER.'/api'.'/timeline-api.js?bundle=true');
3. I made the one line edit to keep the iPad keyboard from popping up when selecting a timeline item.  You simply need to remark out this line (should be about line #265 in
timeline-bundle.js)
//this._keyboardInput.focus();

I know this is a bit of a hack, since as soon as the plugin is updated, It will undoubtedly overwrite my changes... but I guess I will come back here to remember what I did.  If you have any recommendations for me as I am NOT a WP pro, please feel free to let me know!  I appreciate any help you can give me.

Thanks!
Scott
 

Tim

unread,
Mar 13, 2012, 5:01:42 AM3/13/12
to wp-simile-timeline
This is nifty! I'll see if I can implement this in the plugin for one
of the next versions.
Thanks for your research on this.

On Mar 13, 6:01 am, ctgsc...@gmail.com wrote:
> Ok... it looks like I was able to get this to work by using the JavaScript
> edits made in the other post I linked previously.
> 1. I copied the 'api' directory inside 'local_example.zip' downloaded from
> the bottom of this post (http://code.google.com/p/simile-widgets/issues/detail?id=278&q=touch&...)
> to my site's Simile plugin folder (/wp-content/plugins/wp-simile-timeline).
> 2. I edited the timeline plugin in the WordPress plugin editor to reference
> the local Javascript file instead of the remote version.  The original line
> read:
>
> > @define('STL_TIMELINE_API_URL',
> > 'http://api.simile-widgets.org/timeline/2.3.1/timeline-api.js?bundle=t...

ctgs...@gmail.com

unread,
Apr 23, 2012, 8:44:48 PM4/23/12
to wp-simile...@googlegroups.com
Hi Tim,

Yes!  It works really well.  However, as I predicted, I completely forgot I had made the hack and I just upgraded the plugin to 4.8.5 and had my changes overwritten.  After a little searching, I found this again and will fix my site soon.  I look forward to you integrating this functionality in a later version of the WP plugin!

Happy coding!

Scott
Reply all
Reply to author
Forward
0 new messages