dojox/drawing/manager/Anchors (version 1.10)

Usage

var foo = new Anchors(options);
dojox/drawing/manager/Anchors
Parameter Type Description
options dojox.__stencilArgs

Method Summary

  • add(item) Creates anchor points on a Stencil, based on the Stencil's points.
  • remove(item) Destroys the anchor points for a Stencil.

Event Summary

  • onAddAnchor(anchor) Event fires when anchor is created
  • onAnchorDown(anchor) Event fired on anchor mousedown
  • onAnchorDrag(anchor) Event fired when anchor is moved
  • onAnchorUp(anchor) Event fired on anchor mouseup
  • onChangeStyle(stencil) if the Stencil changes color while were's selected this moves the anchors to the back.
  • onRenderStencil() Event fires when an anchor calls a Stencil's render method
  • onReset(stencil) Event fires when an anchor's reset method is called
  • onTransformPoint(anchor) Event fired on anchor drag

Methods

add(item)

Creates anchor points on a Stencil, based on the Stencil's points.

Parameter Type Description
item Stencil
remove(item)

Destroys the anchor points for a Stencil.

Parameter Type Description
item Stencil

Events

onAddAnchor(anchor)

Event fires when anchor is created

Parameter Type Description
anchor Object

An object with the following properties:

  • y_anchor
  • x_anchor
  • render:

    Creates the anchor point. Unlike most render methods in Drawing, this is only called once.

  • onRenderStencil:

    Event fires when an anchor calls a Stencil's render method

  • onTransformPoint:

    Event fires when an anchor changes the points of a Stencil

  • onAnchorDown:

    Event fires for mousedown on anchor

  • onAnchorUp:

    Event fires for mouseup on anchor

  • onAnchorDrag:

    Event fires for on dragging of an anchor

  • anchorConstrain:

    To be over written by tool! Add an anchorConstrain method to the tool and it will automatically overwrite this stub. Should return a constrained x & y value.

  • anchorPositionCheck:

    To be over written by tool! Add a anchorPositionCheck method to the tool and it will automatically overwrite this stub. Should return x and y coords. Success is both being greater than zero, fail is if one or both are less than zero.

  • setPoint:

    Internal. Sets the Stencil's point

  • connectMouse:

    Internal. Connects anchor to manager.mouse

  • disconnectMouse:

    Internal. Disconnects anchor to manager.mouse

  • reset:

    Called (usually) from a Stencil when that Stencil needed to make modifications to the position of the point. Basically used when teh anchor causes a less than zero condition.

  • destroy:

    Destroys anchor.

onAnchorDown(anchor)

Event fired on anchor mousedown

Parameter Type Description
anchor Object

An object with the following properties:

  • y_anchor
  • x_anchor
  • render:

    Creates the anchor point. Unlike most render methods in Drawing, this is only called once.

  • onRenderStencil:

    Event fires when an anchor calls a Stencil's render method

  • onTransformPoint:

    Event fires when an anchor changes the points of a Stencil

  • onAnchorDown:

    Event fires for mousedown on anchor

  • onAnchorUp:

    Event fires for mouseup on anchor

  • onAnchorDrag:

    Event fires for on dragging of an anchor

  • anchorConstrain:

    To be over written by tool! Add an anchorConstrain method to the tool and it will automatically overwrite this stub. Should return a constrained x & y value.

  • anchorPositionCheck:

    To be over written by tool! Add a anchorPositionCheck method to the tool and it will automatically overwrite this stub. Should return x and y coords. Success is both being greater than zero, fail is if one or both are less than zero.

  • setPoint:

    Internal. Sets the Stencil's point

  • connectMouse:

    Internal. Connects anchor to manager.mouse

  • disconnectMouse:

    Internal. Disconnects anchor to manager.mouse

  • reset:

    Called (usually) from a Stencil when that Stencil needed to make modifications to the position of the point. Basically used when teh anchor causes a less than zero condition.

  • destroy:

    Destroys anchor.

onAnchorDrag(anchor)

Event fired when anchor is moved

Parameter Type Description
anchor Object

An object with the following properties:

  • y_anchor
  • x_anchor
  • render:

    Creates the anchor point. Unlike most render methods in Drawing, this is only called once.

  • onRenderStencil:

    Event fires when an anchor calls a Stencil's render method

  • onTransformPoint:

    Event fires when an anchor changes the points of a Stencil

  • onAnchorDown:

    Event fires for mousedown on anchor

  • onAnchorUp:

    Event fires for mouseup on anchor

  • onAnchorDrag:

    Event fires for on dragging of an anchor

  • anchorConstrain:

    To be over written by tool! Add an anchorConstrain method to the tool and it will automatically overwrite this stub. Should return a constrained x & y value.

  • anchorPositionCheck:

    To be over written by tool! Add a anchorPositionCheck method to the tool and it will automatically overwrite this stub. Should return x and y coords. Success is both being greater than zero, fail is if one or both are less than zero.

  • setPoint:

    Internal. Sets the Stencil's point

  • connectMouse:

    Internal. Connects anchor to manager.mouse

  • disconnectMouse:

    Internal. Disconnects anchor to manager.mouse

  • reset:

    Called (usually) from a Stencil when that Stencil needed to make modifications to the position of the point. Basically used when teh anchor causes a less than zero condition.

  • destroy:

    Destroys anchor.

onAnchorUp(anchor)

Event fired on anchor mouseup

Parameter Type Description
anchor Object

An object with the following properties:

  • y_anchor
  • x_anchor
  • render:

    Creates the anchor point. Unlike most render methods in Drawing, this is only called once.

  • onRenderStencil:

    Event fires when an anchor calls a Stencil's render method

  • onTransformPoint:

    Event fires when an anchor changes the points of a Stencil

  • onAnchorDown:

    Event fires for mousedown on anchor

  • onAnchorUp:

    Event fires for mouseup on anchor

  • onAnchorDrag:

    Event fires for on dragging of an anchor

  • anchorConstrain:

    To be over written by tool! Add an anchorConstrain method to the tool and it will automatically overwrite this stub. Should return a constrained x & y value.

  • anchorPositionCheck:

    To be over written by tool! Add a anchorPositionCheck method to the tool and it will automatically overwrite this stub. Should return x and y coords. Success is both being greater than zero, fail is if one or both are less than zero.

  • setPoint:

    Internal. Sets the Stencil's point

  • connectMouse:

    Internal. Connects anchor to manager.mouse

  • disconnectMouse:

    Internal. Disconnects anchor to manager.mouse

  • reset:

    Called (usually) from a Stencil when that Stencil needed to make modifications to the position of the point. Basically used when teh anchor causes a less than zero condition.

  • destroy:

    Destroys anchor.

onChangeStyle(stencil)

if the Stencil changes color while were's selected this moves the anchors to the back. Fix it.

Parameter Type Description
stencil Object
onRenderStencil()

Event fires when an anchor calls a Stencil's render method

onReset(stencil)

Event fires when an anchor's reset method is called

Parameter Type Description
stencil Stencil
onTransformPoint(anchor)

Event fired on anchor drag

Parameter Type Description
anchor Object

An object with the following properties:

  • y_anchor
  • x_anchor
  • render:

    Creates the anchor point. Unlike most render methods in Drawing, this is only called once.

  • onRenderStencil:

    Event fires when an anchor calls a Stencil's render method

  • onTransformPoint:

    Event fires when an anchor changes the points of a Stencil

  • onAnchorDown:

    Event fires for mousedown on anchor

  • onAnchorUp:

    Event fires for mouseup on anchor

  • onAnchorDrag:

    Event fires for on dragging of an anchor

  • anchorConstrain:

    To be over written by tool! Add an anchorConstrain method to the tool and it will automatically overwrite this stub. Should return a constrained x & y value.

  • anchorPositionCheck:

    To be over written by tool! Add a anchorPositionCheck method to the tool and it will automatically overwrite this stub. Should return x and y coords. Success is both being greater than zero, fail is if one or both are less than zero.

  • setPoint:

    Internal. Sets the Stencil's point

  • connectMouse:

    Internal. Connects anchor to manager.mouse

  • disconnectMouse:

    Internal. Disconnects anchor to manager.mouse

  • reset:

    Called (usually) from a Stencil when that Stencil needed to make modifications to the position of the point. Basically used when teh anchor causes a less than zero condition.

  • destroy:

    Destroys anchor.

Error in the documentation? Can’t find what you are looking for? Let us know!