resetViewportEvent
Resets an event of the viewport.
Signatures
- Paramate.Viewport.resetViewportEvent( eventName )
Details
The function sets the function of an event in the viewport back to its default value. This can be used when the original viewport behavior shall be restored after the replaceViewportEventfunction was applied.
Example
[...]
var viewPort = new Paramate.Viewport({ /.../ });
[...]
configurator.initialize( function(){
// Replace default mouse-down behavior with custom behavior function
viewPort.replaceViewportEvent('mousedown', CustomBehavior );
});
function CustomBehavior( event ){
alert('mouse button pressed down the first time');
// Go back to normal behavior
viewPort.resetViewportEvent('mousedown');
}
Parameters
- eventName
-
Name of the event to reset, e.g. "mousedown".