The minimum size allowed for a render. If the size is less, the shape is destroyed.
Creates a dojox.gfx.shape based on passed arguments. Can be called many times by implementation to create multiple shapes in one stencil.
Parameter | Type | Description |
---|---|---|
shp | String | |
d | Object | An object with the following properties:
|
sty | Object |
Internal. Sets the rawNode attribute. (Or in Silverlight an "object attribute". "stencil" is used by the application to determine if something is selectable or not. This also sets the mouse custom events like: "onStencilUp". To disable the selectability, make the att "", which causes a standard mouse event. Labels are special and used to select master stencils.
Parameter | Type | Description |
---|---|---|
shape | undefined |
Parameter | Type | Description |
---|---|---|
options | undefined | |
create | undefined |
Applies the transform to the stencil
NOTE: PARTIALLY IMPLEMENTED. Only applies x y coords.
Parameter | Type | Description |
---|---|---|
mx | undefined |
Changes properties in the style or disabled styles, depending on whether the object is enabled. Also can be used to change most position and size props.
Parameter | Type | Description |
---|---|---|
key | String | Object | |
value | String | Number |
Optional
|
Convenience method for quick connects See comments below for possiblities functions can be strings
Parameter | Type | Description |
---|---|---|
o | undefined | |
e | undefined | |
s | undefined | |
m | undefined | |
once | Boolean | If true, the connection happens only once then disconnects. Five args are required for this functionality. |
Internal. Registers this Stencil to receive mouse events.
Convenience method for batches of quick connects Handles are not returned and therefore cannot be disconnected until Shape destroy time
Converts data to points.
Parameter | Type | Description |
---|---|---|
o | Object |
Called when the Stencil is deselected. NOTE: Calling this will not deselect the Stencil calling this just sets the style to the current theme. 'manager.Stencil' should be used for selecting and deselecting Stencils.
Parameter | Type | Description |
---|---|---|
useDelay | Boolean | Adds slight delay before the style is set. |
Disables Stencil so it is not selectable. Changes the color to the disabled style.
Removes connections based on passed handles arguments
Parameter | Type | Description |
---|---|---|
handles | Handle | Array |
Internal. Unregisters this Stencil from receiving mouse events.
Enables Stencil so it is not selectable (if it was selectable to begin with). Changes the color to the current style.
Gets angle of Stencil NOTE: Only works for Lines, Arrows, Vectors and Axes (works on points, not transforms)
Returns the coordinates of the Stencil. This is often different than the data or the points.
NOTE: Won't work for paths or annotations (labels, Axes, arrow tips) They should overwrite.
NOTE: Primarily used for checking for if shape is off canvas. Therefore Lines could get flipped. Use absolute to prevent this.
Parameter | Type | Description |
---|---|---|
absolute | Boolean | Keeps lines from flipping (see note). |
Gets radius (length) of Stencil.
NOTE: Only works for Lines, Arrows and Vectors (not for Ellipse, Axes has its own version)
Returns the current transform (position) of the Stencil's container
Moves Stencil to the back of all other items on the canvas.
Moves Stencil to the front of all other items on the canvas.
Converts points to data
Parameter | Type | Description |
---|---|---|
p | Array |
Internal. Prevent item from being drawn/rendered less than zero on the X or Y.
Removes shape(s), typically before a re-render No args defaults to this.shape Pass in multiple args to remove multiple shapes
Renders the 'hit' object (the shape used for an expanded hit area and for highlighting) and the'shape' (the actual display object).
Called when the Stencil is selected. NOTE: Calling this will not select the Stencil calling this just sets the style to the 'selected' theme. 'manager.Stencil' should be used for selecting Stencils.
Setter for Stencil data; also converts data to points. See individual Stencils for specific data properties.
Parameter | Type | Description |
---|---|---|
data | StencilData |
Creates and sets a label annotation for the Stencil. If Stencil contains a labelPosition method, that will be used for positioning. Otherwise dojox.drawing.util.positioning.label is used.
Parameter | Type | Description |
---|---|---|
text | String | The text to set as the label. |
Setter for Stencil points; also converts points to data. See individual Stencils for specific points properties.
Parameter | Type | Description |
---|---|---|
points | StencilPoints |
Sets the transform to the stencil
NOTE: PARTIALLY IMPLEMENTED. Only applies x y coords.
Parameter | Type | Description |
---|---|---|
mx | Object |
Moves object to a new X Y location mx is additive. So mx.dx=1 will move the stencil 1 pixel to the right from wherever it was.
Parameter | Type | Description |
---|---|---|
mx | undefined |
Drag-create or programmatic create calls onRender and afterwards, _onPostRender is called and manages further events.
Parameter | Type | Description |
---|---|---|
data | Object |
Stub - Fires before render occurs.
Parameter | Type | Description |
---|---|---|
stencil | Object |
Stub - fires on change of dimensional properties or a text change
Parameter | Type | Description |
---|---|---|
stencil | Object |
Fires when styles of shape has changed
Parameter | Type | Description |
---|---|---|
stencil | Object |
Parameter | Type | Description |
---|---|---|
value | undefined |
Stub - fires before this is destroyed
Parameter | Type | Description |
---|---|---|
stencil | Stencil |
Mouse event, fired on mousedown on canvas
Parameter | Type | Description |
---|---|---|
obj | EventObject |
Stub - fires on change of any property, including style properties
Parameter | Type | Description |
---|---|---|
stencil | Object |
Mouse event, fired on mousemove while mouse is not down. NOTE: Not currently implemented
Parameter | Type | Description |
---|---|---|
obj | EventObject |
Stub - Fires on creation. Drawing connects to this (once!) to be notified of drag completion. But only if it was registered as a Tool. Creating Stencil in and of itself does not register it.
This should fire at the end of creation (not during drag)
Parameter | Type | Description |
---|---|---|
stencil | Object |
Called from anchor point mouse drag also called from plugins.Pan.checkBounds
Parameter | Type | Description |
---|---|---|
anchor | ? manager.Anchor |
Fired at the start of a transform. This would be an anchor drag or a selection.
Parameter | Type | Description |
---|---|---|
anchor | ? manager.Anchor |
Called from anchor point up mouse up
Parameter | Type | Description |
---|---|---|
anchor | manager.Anchor |