%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
GetUserPoint Method
See Also  Example
vdWebLibrary Namespace > vdrawObj Class : GetUserPoint Method
statechangeDelegate
A function created using the onStateChangedDelegate as model.
Initiates an action (check BaseActionObj) where the user will select a point in the component's drawing area.

Syntax

JScript 
public function GetUserPoint( 
   statechangeDelegate : onStateChangedDelegate
);

Parameters

statechangeDelegate
A function created using the onStateChangedDelegate as model.

Example

C#Copy Code
  
function _onActionPointIdStateChanged(action, status) { 
    var vdcanvas = action.vdrawOwner(); 
    if (status == 'start') { 
        vdcanvas.Prompt('pick a point'); 
    } else if (status == 'end') { 
        if (!action.IsCanceled()) { 
            vdcanvas.Prompt('X= ' + action.ResValue[X].toString() + ' Y= ' + action.ResValue[Y].toString()); 
        } else { 
            vdcanvas.Prompt(''); 
        } 
    } 

 
function CmdPointId(canvasId) { 
    var vdcanvas = vdmanager.vdrawObject("canvasId"); 
    vdcanvas.GetUserPoint(_onActionPointIdStateChanged); 
}

See Also