HTML5 Canvas 3D WebGL (TM) js Library
 

instMouseOverFilter Library Method

Short Description: Install MouseOver Filter

Signature: x.instMouseOverFilter (element,elimDoubleOver,elimSpontanousOut)
Class: Controller Class
 

Installs the MouseOverFilter for the given element.

If you attach animations to onmouseover and onmouseout you might notice sometimes in certain browser constellations and controllers used a strange behaviour, e.g. doublicate opening or closing animations. All you need to do is to install the MouseOverFilter on all elements having onmouseover and onmouseout event handlers. It is most convenient to use instMouseOverFilterClass for that purpose.

Technical details why the filter is needed are described below, but are not really required to use it.

You can install the filter multiple times. You however need to install it whenever the onmouseover or onmouseout handlers are modified.

Move the mouse over here
<div id="ex" style="text-align:center"
onmouseover="taccgl.actor('ex1',null,'visible').from(200,1000,10000).dur(0.3).start();taccgl.start()"
onmouseout ="taccgl.actor('ex1',null,'hidden').to(0,0,2000).dur(0.3).start();taccgl.start()">
Move the mouse over here
</div>
<script> taccgl.begin(); taccgl.controller.instMouseOverFilter("ex"); </script>
 

 

Especlly when taccgl™ and its 3D Canvas is used, especially togehter with the forwarding controller the mouseover and mouseout events tend to not work totally as desired. It might happen that extra mouseover or mouseout events are generated at the start or end of an animation stating that the mouse moved over or out the 3D canvas element. Also events might get lost in rare cases. The MouseOverFilter eliminates mouseover and mouseout events related to the 3D canvas. If elimDoubleOver is set to true, doublicate mouseover events are eleiminated. If elimSpontanousOut is set to true, doublicate mouseout events that had no preceeding mouseover are eliminated.

WebGL™ is a trademark of the Khronos Group Inc.

Next Page:Controller.automaticMouseMoveOut - Automatically generate missing mouseMoveOut Events
Previous Page: Controller.instMouseOverFilterClass - Install MouseOver Filter for all Elements of a Class