Receiver.onCircle( callback )

Use this method to pass a function to a receiver that should be called when the user makes a circular gesture on his screen.
 

Callback arguments

  • number angle
    angular displacement in radians
     

Example

In the following example a developer wants to move a cartoon of Michael Jackson from left to right across the screen, when a user make a circular gesture. He has prepared a HTML element with the image inside and he has given that element the ID "move-me".

var moveMe = document.getElementById( 'move-me' ),
      left = 0;
                
PLUGPIN
    .createReceiver({ 
        'name'             : 'Circle demo' 
        ,'notification'     : 'small'
    })
    .onCircle( function ( angle )
    {
        left += angle * 100;
        moveMe.style.left = left + 'px';
    });

 

Live example

Connect to the app in the iFrame below to check out the circle event.

Open in new tab

 

Contact us


Talk to us!
Tell us anything you want to and please add your contact information.




Our contact info
tel. +31 (0) 20 2170013
info@plugpin.com

Groenhoedenveem 28
1019 BL Amsterdam
The Netherlands

News letter


Enter your e-mail address to stay informed on everything PlugPIN!