Last updated

API / geotoolkit / controls / tools / Selection / Selection

Class: Selection

tools.Selection.Selection

Selection tool to pick nodes in the specified point or rectangular area

Events [Events](../enums/geotoolkit.controls.tools.selection.events.md)
EventArgumentsDescription
onPick[SelectionEventArgs](../classes/geotoolkit.controls.tools.selectioneventargs.selectioneventargs.md)This Event is fired when the Selection Tool select a visual.
onSelectionEnd[SelectionEventArgs](../classes/geotoolkit.controls.tools.selectioneventargs.selectioneventargs.md)This Event is fired when the Selection Tool select a visual. (similar to Selection.Events.onPick)
onSelectionChanged[SelectionEventArgs](../classes/geotoolkit.controls.tools.selectioneventargs.selectioneventargs.md)This Event is fired when the Selection Tool select a visual and it is different from previous selection.
beforeSelectionChange[SelectionEventArgs](../classes/geotoolkit.controls.tools.selectioneventargs.selectioneventargs.md)This Event is fired before the Selection Tool select a visual and it is different from previous selection.
onDoubleClick[SelectionEventArgs](../classes/geotoolkit.controls.tools.selectioneventargs.selectioneventargs.md)This Event is fired when the Selection Tool select a visual with a double click.

Tool name: 'pick'

Hierarchy

Table of contents

Constructors
[new Selection(layer, mode)](/solutions/geotoolkit/apis/classes/geotoolkit.controls.tools.selection.selection.md#new selection(layer, mode))[new Selection(options)](/solutions/geotoolkit/apis/classes/geotoolkit.controls.tools.selection.selection.md#new selection(options))
Methods
Css Properties
Name Type Description
autodisabledbooleanTrue if selection automatically disabled on selection changed
circularmodeCircularModeTool circular selection mode
enabledbooleanEnabled state
fillstylestringRubber band selection fillstyle
fillstyleFillStyleRubber band selection fillstyle
fillstyle-colorstringColor in CSS form
fillstyle-evenoddmodebooleanEven-odd fill mode
fillstyle-fillpatternPatternPattern
fillstyle-fillpattern-containernamestringAn optional container name, which creates an image pattern. This parameter is used for serialization if you want to save are reference to pattern instead of the pattern itself
fillstyle-fillpattern-patternnamestringName of this pattern for indexing
fillstyle-fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
fillstyle-foregroundstringForeground color
fillstyle-patternPatternPattern
layerCompositeNodeManipulator layer
layer-clippingbooleanEnable clipping, this does not consider the clipstyle, it is related to bounds-clipping
layer-clipstyleClipStyleClipping style
layer-clipstyle-evenoddbooleanTrue if evenodd mode is on ('nonzero' mode otherwise)
layer-clipstyle-geometryGraphicsPathClipping geometry
layer-clipstyle-geometry-boundsRectBounds
layer-clipstyle-geometry-bounds-heightnumberHeight
layer-clipstyle-geometry-bounds-readonlybooleanReadonly
layer-clipstyle-geometry-bounds-widthnumberWidth
layer-clipstyle-geometry-bounds-xnumberLeft
layer-clipstyle-geometry-bounds-ynumberTop
layer-clipstyleGraphicsPathClipping style
layer-cssclassstringThe css class name of this node
layer-csscursorstringCSS cursor associated with node
layer-cssstylestringCSS style to be applied to inserted elements
layer-idstring | numberId of the node, its a unique identifier
layer-infinitybooleanMode to render outside the model limits
layer-localtransformTransformationLocal transformation
layer-localtransform-dxnumberX axis translation
layer-localtransform-dynumberY axis translation
layer-localtransform-xxnumberX scale
layer-localtransform-xynumberXy skew
layer-localtransform-yxnumberYx skew
layer-localtransform-yynumberY scale
layer-marginsnumber | stringIt has properties for specifying the margins for each side
layer-namestringName of the node. It is often used for debugging purposes or to simplify queries
layer-opacitynumberNode opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context
layer-opacityblendmodeBlendModeNode opacity mode to blend it
layer-scalescrollstrategyScaleScrollStrategyScale scroll strategy
layer-scalescrollstrategy-enabledbooleanEnable flag
layer-selectablebooleanSelectable node, a boolean to determine if selection should consider this node
layer-taganyCustom information associated with node. It is a user object which can be used by client code to store information or attach an application object to the shape
layer-transformstringAdditional CSS transformation applied to node or 'none'
layer-transformTransformationAdditional CSS transformation applied to node or 'none'
layer-visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
layer-z-indexnumberDefine node z-index
linestylestringRubber band selection linestyle
linestyleLineStyleRubber band selection linestyle
linestyle-colorstringColor in CSS form
linestyle-fillstringOptional fill style to be used to fill lines generated with this style
linestyle-fillFillStyleOptional fill style to be used to fill lines generated with this style
linestyle-linecapCapStyleThe line cap style
linestyle-linedashoffsetnumberLine dash offset of dashed line
linestyle-linejoinJoinStyleThe line join style
linestyle-pixelsnapmodebooleanPixel Snap Mode, default(
linestyle-scalablebooleanTrue if width should depend on transformation
linestyle-unitstringOptional unit for the width
linestyle-widthnumber | stringThe line thickness
modeRubberBandRenderModeRubber mode
modeSelectionModeSelection mode
mouseradiusnumberDevice radius for mouse events
namestringName of the tool used like cross-hair etc
pointermodePointerModeTool pointer selection mode
rootnodeNodeA root node to start selection
rootnode-cssclassstringThe css class name of this node
rootnode-idstring | numberId of the node, its a unique identifier
rootnode-namestringName of the node. It is often used for debugging purposes or to simplify queries
rootnode-selectablebooleanSelectable node, a boolean to determine if selection should consider this node
rootnode-taganyCustom information associated with node. It is a user object which can be used by client code to store information or attach an application object to the shape
rootnode-visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
rootnode-z-indexnumberDefine node z-index
rubberbandmodeRubberBandModeTool rubberband selection mode
rubberbandshapemodeRubberBandShapeModeShape mode for the rubberband selection area
selectionmodeSelectionModeSelection mode
textstylestringRubber band selection distance textstyle
textstyleTextStyleRubber band selection distance textstyle
textstyle-alignmentAlignmentStyleAlignment
textstyle-autosizebooleanAuto font size on high definition display
textstyle-backgroundstringBackground style
textstyle-backgroundFillStyleBackground style
textstyle-baselineBaseLineStyleBase line
textstyle-colorstringColor in CSS form
textstyle-fillFillStyleText fill style
textstyle-fontstringFont see
textstyle-fonturlstringThe place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword
textstyle-lineheightstring | numberLine height
textstyle-multilinebooleanAllow multi-line text
textstyle-outlinestringOutline style
textstyle-outlineLineStyleOutline style
textstyle-overflowwrapOverflowWrapStyleOverflow wrap
textstyle-strikethroughstringStrikethrough style
textstyle-strikethroughLineStyleStrikethrough style
textstyle-textoverflowTextOverflowStyleText overflow
textstyle-underlinestringUnderline style
textstyle-underlineLineStyleUnderline style
textstyle-underlineoffsetstring | numberUnderline offset distance
textstyle-whitespaceWhiteSpaceStyleWhite space
textstyle-wordbreakWordBreakStyleWord break
touchradiusnumberDevice radius for touch events

Contents

Constructors

new Selection(layer, mode)

new Selection(layer?, mode?)

Creates Selection

Parameters

Name Type Description
Optional layerCompositeNode<Node>manipulator layer
Optional modenumber | RubberBandRenderModerender mode

Overrides

AbstractRubberTool.constructor


new Selection(options)

new Selection(options?)

Creates Selection

Parameters

Name Type Description
Optional optionsOptionsproperties object

Overrides

AbstractRubberTool.constructor

Methods

addListener

addListener(eventName, listener): Selection

add event listener. The listener receives the message when the system event happens.

Deprecated

since 4.0 use .on() instead. Note that 3 args callback should be used in subscription via .on(): (eventType, source, args)

Parameters

Name Type Description
eventNamestringevent name or unique event identifier
listenerFunctionthe event listener

Returns

Selection

Inherited from

AbstractRubberTool.addListener


captureMouseUp

captureMouseUp(): void

listen to window mouse events in order to catch a mouse up action outside of the tool container DOM element. useful for example when you pan and release click outside of DOM element.

Returns

void

Inherited from

AbstractRubberTool.captureMouseUp


dispose

dispose(): void

Dispose tool.

Returns

void

Inherited from

AbstractRubberTool.dispose


fireEvent

fireEvent(eventName, eventArgs?): void

This method is Protected. Fire an Event.

Deprecated

since 4.0 use .notify() instead. Note that 3 args callback should be used in subscription via .on()

Parameters

Name Type Description
eventNamestringevent name
Optional eventArgsanycontains info of the event

Returns

void

Inherited from

AbstractRubberTool.fireEvent


getCircularMode

getCircularMode(): CircularMode

Gets tool's circular selection mode

Returns

CircularMode


getClassName

getClassName(): string

Returns

string

Inherited from

AbstractRubberTool.getClassName


getContainerModelLimits

Protected getContainerModelLimits(): Rect

Return container model limits in which rubber band is drawn. By default it returns manipulator layer visible model limits

Returns

Rect

area of model limits

Inherited from

AbstractRubberTool.getContainerModelLimits


getEndPoint

getEndPoint(): Point

Return end point of selection

Returns

Point


getEventRadius

Protected getEventRadius(eventArgs): number

Returns device radius for the provided event

Parameters

Name Type Description
eventArgsEventArgscontains info of the event

Returns

number

Inherited from

AbstractRubberTool.getEventRadius


getFillStyle

getFillStyle(): FillStyle

Returns fill style

Returns

FillStyle

fill style


getLineStyle

getLineStyle(): LineStyle

Returns line style

Returns

LineStyle

line style


getManipulatorLayer

getManipulatorLayer(): CompositeNode<Node>

return manipulator layer

Returns

CompositeNode<Node>

layer

Inherited from

AbstractRubberTool.getManipulatorLayer


getMouseButtons

getMouseButtons(): MouseButtons

Gets mouse buttons set for selection

Returns

MouseButtons

this

Inherited from

AbstractRubberTool.getMouseButtons


getMouseRadius

getMouseRadius(): number

Returns current device radius for mouse events

Returns

number

Inherited from

AbstractRubberTool.getMouseRadius


getName

getName(): string

return tool name if any

Returns

string

name of the tool

Inherited from

AbstractRubberTool.getName


getNodeFilter

getNodeFilter(): NodeFilterCallback

Returns filter handler

Returns

NodeFilterCallback

filter


getParentTool

getParentTool(): AbstractCompositeTool

Gets parent tool

Returns

AbstractCompositeTool

parent tool

Inherited from

AbstractRubberTool.getParentTool


getPointerMode

getPointerMode(): PointerMode

Gets tool pointer selection mode

Returns

PointerMode


getProperties

getProperties(): OptionsOut

Returns properties

Returns

OptionsOut

properties

Overrides

AbstractRubberTool.getProperties


getProperty

getProperty(name): any

Gets dynamic property by name. These properties can be used as a property bags

Parameters

Name Type Description
namestringproperty name

Returns

any

Inherited from

AbstractRubberTool.getProperty


getPropertyKeys

getPropertyKeys(): string[]

Returns known properties keys

Returns

string[]

Inherited from

AbstractRubberTool.getPropertyKeys


getRoot

getRoot(): AbstractCompositeTool

Gets root tool

Returns

AbstractCompositeTool

parent tool

Inherited from

AbstractRubberTool.getRoot


getRootNode

getRootNode(): Node

Return the root node to start selection. If it is not specified then root node is used

Returns

Node

root node


getRubberBandMode

getRubberBandMode(): RubberBandMode

Gets tool's rubberband selection mode

Returns

RubberBandMode


getRubberBandRenderMode

getRubberBandRenderMode(): RubberBandRenderMode

Return the way the rectangle is displayed

Returns

RubberBandRenderMode

Inherited from

AbstractRubberTool.getRubberBandRenderMode


getRubberBandShapeMode

getRubberBandShapeMode(): RubberBandShapeMode

Gets tool's rubberband shape

Returns

RubberBandShapeMode


getSelection

getSelection(): (Node | SelectedItem<any>)[]

gets the currently selected items

Returns

(Node | SelectedItem<any>)[]


getSelectionMode

getSelectionMode(): SelectionMode

Returns tool selection mode

Returns

SelectionMode


getStartPoint

getStartPoint(): Point

Return start point of selection

Returns

Point


getTextStyle

getTextStyle(): TextStyle

Returns text style

Returns

TextStyle

text style


getTouchRadius

getTouchRadius(): number

Returns current device radius for touch events

Returns

number

Inherited from

AbstractRubberTool.getTouchRadius


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

AbstractRubberTool.hasEventListener


isActive

isActive(): boolean

return active state

Returns

boolean

Inherited from

AbstractRubberTool.isActive


isAutoDisabled

isAutoDisabled(): boolean

Get auto-disabled mode

Returns

boolean

does the selection automatically disable itself on selection changed


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

AbstractRubberTool.isDisposed


isDoubleClick

Protected isDoubleClick(point, eventArgs?): boolean

returns true if double clicked

Parameters

Name Type Description
pointPointClick point
Optional eventArgsEventArgsoptional event args to verify double click

Returns

boolean

Inherited from

AbstractRubberTool.isDoubleClick


isEnabled

isEnabled(): boolean

returns enable state

Returns

boolean

state

Inherited from

AbstractRubberTool.isEnabled


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

AbstractRubberTool.isSilent


isTouchEvent

isTouchEvent(eventArgs): boolean

return true if the event is a touch event and false otherwise.

Parameters

Name Type Description
eventArgsEvent | EventArgscontains info of the event

Returns

boolean

Inherited from

AbstractRubberTool.isTouchEvent


notify

notify<E>(type, source, args?): Selection

Notify listeners

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceSelectionof the event
Optional argsEventMap[E]arguments of the event

Returns

Selection

this

Overrides

AbstractRubberTool.notify


off

off<E>(type?, callback?): Selection

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: Selection, args: EventMap[E]) => voidfunction to be called

Returns

Selection

this

Overrides

AbstractRubberTool.off


on

on<E>(type, callback): Selection

Attach listener on event that will be called whenever the specified event is delivered to the target

If the callback function is already in the list of event listeners for this target, the function is not added a second time.

If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.

TypeScript hint: in case of creating derived tool with own events, EventMap should be extended and .on() and .notify() methods redeclared, see sample.

Example

// Using in derived tool
import type {EventMap as EventMapBase} from '@int/geotoolkit/controls/tools/AbstractTool';
export type EventMap = EventMapBase &amp; {
[MyToolEvents.onValueChanged]: MyToolEventArgs
}
export enum MyToolEvents {
onValueChanged = 'onValueChanged'
}
export class MyTool extends AbstractTool {
public declare on: <E extends keyof EventMap>(type: E, callback: (eventType: E, sender: this, args: EventMap[E]) => void) => this;
protected declare notify: <E extends keyof EventMap>(type: E, source: AbstractTool, args?: EventMap[E]) => this;
public declare off: <E extends keyof EventMap>(type: E, callback?: (eventType: E, sender: this, args: EventMap[E]) => void) => this;
// ...
}

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: Selection, args: EventMap[E]) => voidto be called

Returns

Selection

Overrides

AbstractRubberTool.on


onActiveStateChanged

Protected onActiveStateChanged(): void

Fires

Events.onStateChanged

Returns

void

Inherited from

AbstractRubberTool.onActiveStateChanged


onDoubleClick

Protected onDoubleClick(eventArgs): void

Double click handler Detects if double click happens on scrollbar and prevents propagation

Parameters

Name Type Description
eventArgsEventArgsevent arguments

Returns

void


onEnabledStateChanged

Protected onEnabledStateChanged(): void

Fires

Events.onEnabledStateChanged

Returns

void

Inherited from

AbstractRubberTool.onEnabledStateChanged


onMouseDown

Protected onMouseDown(eventArgs): void

mouse down function of selection tool

Parameters

Name Type Description
eventArgsEventArgscontains info about the event arguments

Returns

void


onMouseMove

Protected onMouseMove(eventArgs): void

mouse move function

Parameters

Name Type Description
eventArgsEventArgscontains info about the event arguments

Returns

void


onMouseUp

Protected onMouseUp(eventArgs): void

mouse up function of selection tool

Parameters

Name Type Description
eventArgsEventArgscontains info about the event arguments

Returns

void


pageToCanvas

pageToCanvas(eventArgs, externalPlot?): Object

return position relative to the canvas

Parameters

Name Type Description
eventArgsEvent | EventArgsparentElement the parent HTML element
Optional externalPlotPlotplot

Returns

Object

NameType
xnumber
ynumber

Inherited from

AbstractRubberTool.pageToCanvas


pointToModel

pointToModel(model, eventArgs): Point

converts device coordinates to inner coordinates of node

Parameters

Name Type Description
modelNodethe model
eventArgsPoint | EventArgsarguments of the event OR point in device (plot) coordinates.

Returns

Point

Inherited from

AbstractRubberTool.pointToModel


removeListener

removeListener(eventName, listener?): Selection

remove event listener. The listener reveives the message when the system event happens.

Deprecated

since 4.0 use .off() instead.

Parameters

Name Type Description
eventNamestringevent name
Optional listenerFunction | Function[]the event listener, if null, remove all listeners for the event

Returns

Selection

Inherited from

AbstractRubberTool.removeListener


setActive

setActive(active): Selection

set active state

Fires

Events.onStateChanged

Parameters

Name Type Description
activebooleanset active state

Returns

Selection

Inherited from

AbstractRubberTool.setActive


setAutoDisabled

setAutoDisabled(mode): Selection

Set auto-disabled mode

Parameters

Name Type Description
modebooleandoes the selection automatically disable itself on selection changed

Returns

Selection

this


setCircularMode

setCircularMode(mode): Selection

Sets tool's circular selection mode

Parameters

Name Type Description
modeCircularModenew circular selection mode

Returns

Selection

this


setEnabled

setEnabled(enabled): Selection

set enable state

Fires

Events.onEnabledStateChanged

Fires

Events.onStateChanged

Parameters

Name Type Description
enabledbooleansets the enabled state

Returns

Selection

this

Inherited from

AbstractRubberTool.setEnabled


setFillStyle

setFillStyle(fillStyle, merge?): Selection

Sets fill style

Parameters

Name Type Description
fillStyleTypea new fill style
Optional mergebooleantrue if you want to merge fillStyle with existing attribute, false by default

Returns

Selection

this this


setLineStyle

setLineStyle(lineStyle, merge?): Selection

Sets line style

Parameters

Name Type Description
lineStyleTypeline style or options
Optional mergebooleantrue if you want to merge lineStyle with existing attribute, false by default

Returns

Selection

this


setMeasureCallback

setMeasureCallback(measureCallback): Selection

Sets measure callback

Parameters

Name Type Description
measureCallbackMeasureCallbackmeasure callback

Returns

Selection


setMouseButtons

setMouseButtons(button): Selection

Sets mouse buttons for selection

Parameters

Name Type Description
buttonMouseButtonsmouse button

Returns

Selection

this

Inherited from

AbstractRubberTool.setMouseButtons


setMouseRadius

setMouseRadius(radius): Selection

Sets device radius for mouse events

Parameters

Name Type Description
radiusnumberradius for mouse events

Returns

Selection

this

Inherited from

AbstractRubberTool.setMouseRadius


setName

setName(name): Selection

set tool name

Parameters

Name Type Description
namestringthe tool name

Returns

Selection

Inherited from

AbstractRubberTool.setName


setNodeFilter

setNodeFilter(filter): Selection

Sets filter handler

Parameters

Name Type Description
filterNodeFilterCallbackThis allows to filter selected nodes.

Returns

Selection


setOptions

setOptions(options?): Selection

Sets selection options

Parameters

Name Type Description
Optional optionsOptionsoptions

Returns

Selection

this


setPointerMode

setPointerMode(mode): Selection

Sets tool pointer selection mode

Parameters

Name Type Description
modePointerModetool pointer selection mode

Returns

Selection

this


setProperties

setProperties(properties): Selection

Sets all the properties pertaining to this object

Parameters

Name Type Description
propertiesOptionsAn object containing the properties to set

Returns

Selection

this

Overrides

AbstractRubberTool.setProperties


setProperty

setProperty(name, value): Selection

Sets dynamic property by name

Parameters

Name Type Description
namestringproperty name
valueanyproperty value

Returns

Selection

this

Inherited from

AbstractRubberTool.setProperty


setRootNode

setRootNode(root): Selection

Specify a root node to start selection. If it is not specified then root node is used

Parameters

Name Type Description
rootNoderoot node

Returns

Selection

this


setRubberBandMode

setRubberBandMode(mode): Selection

Sets tool rubberband selection mode

Parameters

Name Type Description
modeRubberBandModetool rubberband selection mode

Returns

Selection

this


setRubberBandRenderMode

setRubberBandRenderMode(mode): Selection

Set the way the rectangle has to be displayed

Parameters

Name Type Description
modeRubberBandRenderModethe way the rectangle has to be displayed

Returns

Selection

Inherited from

AbstractRubberTool.setRubberBandRenderMode


setRubberBandShapeMode

setRubberBandShapeMode(mode): Selection

Sets tool's rubberband shape mode

Parameters

Name Type Description
modeRubberBandShapeModeshape mode for the rubberband selection area

Returns

Selection

this


setSelection

setSelection(selection): Selection

sets the currently selected items

Parameters

Name Type Description
selection(Node | SelectedItem<any>)[]selection

Returns

Selection

this


setSelectionMode

setSelectionMode(mode): Selection

Sets tool selection mode

Parameters

Name Type Description
modeSelectionModetool selection mode

Returns

Selection

this


setSelectorCallback

setSelectorCallback(selectorCallback): Selection

Sets selector callback

Parameters

Name Type Description
selectorCallbackSelectorCallbackselector callback

Returns

Selection


setSilent

setSilent(bool): Selection

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

Selection

this

Inherited from

AbstractRubberTool.setSilent


setSlotEnabled

setSlotEnabled(eventName, value, target?): Selection

Sets slot enabled

Parameters

Name Type Description
eventNamestringeventName
valuebooleanvalue
Optional targetEventTargettarget

Returns

Selection

Inherited from

AbstractRubberTool.setSlotEnabled


setSlots

setSlots(slots?, merge?): Selection

Sets new slots.

Example

const slots = {
'pointerdown': (event: EventArgs) => {
// event is an instance of @int/geotoolkit/controls/tools/EventArgs
...
}
};
tool.setSlots(slots);

Parameters

Name Type Description
Optional slotsRecord<string, Slot | Slot[] | (eventArgs: EventArgs) => void>type of system events
Optional mergebooleanset to true if you want to merge with existing slots

Returns

Selection

this

Inherited from

AbstractRubberTool.setSlots


setTextStyle

setTextStyle(textStyle, merge?): Selection

Sets measurement label text style

Parameters

Name Type Description
textStyleTypea new shape text style
Optional mergebooleantrue if you want to merge textStyle with existing attribute, false by default

Returns

Selection

this


setTouchRadius

setTouchRadius(radius): Selection

Sets device radius for touch events

Parameters

Name Type Description
radiusnumberradius for touch events

Returns

Selection

this

Inherited from

AbstractRubberTool.setTouchRadius


start

Protected start(eventArgs?): Selection

start

Parameters

Name Type Description
Optional eventArgsEventArgsevent args

Returns

Selection

Inherited from

AbstractRubberTool.start


stop

Protected stop(): Selection

stop

Returns

Selection

Inherited from

AbstractRubberTool.stop


toggle

toggle(): Selection

switch enable state to opposite state

Returns

Selection

Inherited from

AbstractRubberTool.toggle


canvasToClient

Static canvasToClient(plotPoint, plot): Point

Convert plot coordinates to global coordinates

Parameters

Name Type Description
plotPointPointpoint in plot coordinates
plotPlotplot with canvas

Returns

Point

Inherited from

AbstractRubberTool.canvasToClient


clientToCanvas

Static clientToCanvas(nativeEvent, plot): Point

Convert global coordinates to plot coordinates

Parameters

Name Type Description
nativeEventEventnative browser event
plotPlotplot with canvas

Returns

Point

Inherited from

AbstractRubberTool.clientToCanvas


getClassName

Static getClassName(): string

Returns

string

Inherited from

AbstractRubberTool.getClassName


getExclusiveTool

Static getExclusiveTool(plot): AbstractTool

return exclusive tool associated with plot

Parameters

Name Type Description
plotPlotplot

Returns

AbstractTool

tool

Inherited from

AbstractRubberTool.getExclusiveTool


getNativeEventName

Static getNativeEventName(eventName): string[]

Returns native event name

Parameters

Name Type Description
eventNamestringW3C Pointer Events Recommendation name

Returns

string[]

Inherited from

AbstractRubberTool.getNativeEventName


isTouchEvent

Static isTouchEvent(eventArgs): eventArgs is TouchEvent

return true if the event is a touch event and false otherwise.

Parameters

Name Type Description
eventArgsEvent | EventArgscontains info of the event

Returns

eventArgs is TouchEvent

Inherited from

AbstractRubberTool.isTouchEvent


lock

Static lock(plot, tool): void

Set exclusive tool for plot

Parameters

Name Type Description
plotPlotplot
toolAbstractTooltool

Returns

void

Inherited from

AbstractRubberTool.lock


setDefaultMouseRadius

Static setDefaultMouseRadius(radius): void

Sets default device radius for mouse events

Parameters

Name Type Description
radiusnumberradius for mouse events

Returns

void

Inherited from

AbstractRubberTool.setDefaultMouseRadius


setDefaultTouchRadius

Static setDefaultTouchRadius(radius): void

Sets default device radius for touch events

Parameters

Name Type Description
radiusnumberradius for touch events

Returns

void

Inherited from

AbstractRubberTool.setDefaultTouchRadius


unlock

Static unlock(value): void

Remove exclusive tool from plot

Parameters

Name Type Description
valueAbstractTool | Plotvalue

Returns

void

Inherited from

AbstractRubberTool.unlock