%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
beforemovegrip Field
See Also  Example
vdWebLibrary Namespace > gripmanager Class : beforemovegrip Field
A user defined method that fires just before a grip of an entity move.

Syntax

JScript 
public var beforemovegrip : gripmanager.gripEventDelegate;

Example

For example we do not allow user to move grip points of polylines.
C#Copy Code
function _beforemovegrip(e) { 
       if (e.entity._t === vdConst.vdPolyline_code) { 
       e.cancel = true;//do not allow to move grip points of polylines 
       } 
 }

Remarks

The eventargs of the function is an object with following properties:

sender: is always the vdrawObj entity: the entity of which the grip is move indexes: an array of integers that represents the the grip indexes of the entity that is going to be move offset: an array of dx and dy movement foreach select index in the indexes property cancel:a boolean value that defines if the grip is allowed by the user to be moved. By default is false and the grips movement is allowed. Set it to true in order the grips not to be moved.

See Also