nextwebgen.com

The Next Generation Web Now

S2.enableMultitouchSupport = true; // Getting touchy feely with scripty

Filed under: Uncategorized — Dion Almaer at 5:56 am on Thursday, October 29, 2009

Thomas Fuchs has been working with Nokia on their multi-touch API for Qt/WebKit:

scripty2 supports multiple API vendors for Multitouch events, and even provides a desktop emulation (click+drag to pan, shift+click+drag to scale and rotate)– so you can try this out even without having multitouch hardware at your disposal.

Currently the scripty2 API abstraction event supports Desktop emulation, Nokia Starlight and Apple iPhone Mobile Safari. With just one API, you can now multi-touch enable any web application easily, just check out the demos.

In a recent update to scripty2, I’ve also introduced automatic support for WebKit CSS transitions, so whenever scripty2 effects are used and CSS transitions are available, the effects engine will automatically do the right thing for you.

All in all, using this in your web sites or apps boils down to just a couple of lines of code:

JAVASCRIPT:

  1.  
  2. $(‘element’).observe(‘manipulate:update’, function(event){
  3.   $(‘element’).transform(event.memo).setStyle({
  4.      left: event.memo.panX+‘px’, top: event.memo.panY+‘px’
  5.   });
  6. });
  7.  
Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blogmarks
  • del.icio.us
  • De.lirio.us
  • digg
  • NewsVine
  • YahooMyWeb

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>