<@class name="SvgPointer" hide="yes"> An object representing the current pointer interaction (c) SAP AG 2003-2006. All rights reserved. // constructor function SvgPointer(method, evt, peer, canvas) { var obox=canvas.outerbox, ibox=canvas.innerbox; var s=canvas.scale, vp=canvas.viewport; this.canvas = canvas; this.source = evt.target; this.target = evt.target; this.peer = peer; this.method = method; this.abspos = {x:evt.clientX-obox.x-ibox.x, y:evt.clientY-obox.y-ibox.y}; this.pos = {x:vp.x + (evt.clientX-obox.x-ibox.x)/s, y:vp.y + (evt.clientY-obox.y-ibox.y)/s}; this.origin = {x:this.pos.x, y:this.pos.y}; this.offset = {x:0, y:0}; this.button = MAX(1, evt.button*2); this.dblclick = (evt.detail>1); this.key = (evt.shiftKey ? 1 : 0) | (evt.ctrlKey ? 2 : 0) | (evt.altKey ? 4 : 0); this.phase = 0; this.oldview = canvas.captureViewport(); this.moved = false; this.scrolled = false; this.sticky = false; this.cancel = false; this.scrollMode = 0; } SVG.declareClass(SvgPointer); ////////////////////////////////////////////////////////////////////////////////////// // PROPERTIES <@prop name="canvas:Canvas" access="RO">The canvas object in which the pointer interaction takes place <@prop name="source:SVGNode" access="RO">The source element on which the pointer interaction has started <@prop name="target:SVGNode" access="RO">The target element which is currently under the pointer <@prop name="peer:Object" access="RO">The peer object that controls the source element <@prop name="method:s" access="RO">The name of the peer method for handling the pointer interaction <@prop name="pos:pt" access="RO">The current pointer position (in logical units) <@prop name="origin:pt" access="RO">The starting pointer position (in logical units) <@prop name="offset:pt" access="RO">The pointer offset relative to the starting position (in logical units) <@prop name="moved:b" access="RO">Indicates whether the pointer has been moved <@prop name="scrolled:b" access="RO">Indicates whether the canvas has been scrolled during the pointer interaction <@prop name="button:n" access="RO">Indicates which pointer button was pressed (PTR_LEFT, PTR_MIDDLE, PTR_RIGHT) <@prop name="key:n" access="RO">Indicates which modifier key was pressed (PTR_SHIFT, PTR_CTRL, PTR_ALT) <@prop name="dblclick:b" access="RO">Indicates whether the pointer button was double clicked <@prop name="phase:n" access="RO">The current phase of the pointer interaction (PTR_START, PTR_MOVE, PTR_FIRSTMOVE, PTR_LASTMOVE, PTR_FINISH, PTR_CANCEL) <@prop name="sticky:b:false">Set to indicate whether the pointer interaction is sticky (engaged also if the mouse button is released) <@prop name="scrollMode:n:false">Set to indicate the scrolling mode of the pointer interaction (PTR_NOSCROLL, PTR_AUTOSCROLL, PTR_SCROLL) <@prop name="cancel:b:false">Set to indicate that the pointer interaction should be cancelled