API / geotoolkit / schematics / widgets / DeviatedSchematicsWidget / DeviatedSchematicsWidget
widgets.DeviatedSchematicsWidget.DeviatedSchematicsWidget
A schematics widget overrides [AnnotatedWidget](../classes/geotoolkit.widgets-1.annotatedwidget.annotatedwidget.md) class to work with [DeviatedWellBoreWithLabels](../classes/geotoolkit.schematics.scene-2.deviatedwellborewithlabels.deviatedwellborewithlabels.md) as a data model
DeviatedSchematicsWidget inherits from AnnotatedWidget, so it takes most of its functionality too. The main way to configure and customize the widget is to use its setOptions() function that provide a comprehensible way of changing the default look and feel of the widget.
- setData() will pass through everything to the [WellBoreNode](../classes/geotoolkit.schematics.scene-2.wellborenode.wellborenode.md)'s "setWellBoreData" for the internal shape.
Deprecated
since 4.0. Use CompositeSchematicsWidget instead.
Fires
Fires
↳
DeviatedSchematicsWidget
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
legendalignmentarea | AnnotationLocation | Legend alignment area.<br> |
options | any | |
scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
scalescrollstrategy-enabled | boolean | Enable flag |
scalesratio | number | Y-to-X scales ratio used for scalesratiomode=ScalesRatioMode.Keep only |
scalesratiomode | ScalesRatioMode | Y-to-X scales ratio mode |
sealevel | any | |
webglrendering | boolean | True for webgl rendering |
wellborenode | any | Wellbore node options see |
Constructors
• new DeviatedSchematicsWidget(options?)
| Name | Type | Description |
|---|---|---|
Optional options | Options | options object |
AnnotatedWidget.constructor
Methods
▸ addAxis(axis, location, connectedObject?): Object
add new axis and connect with object
| Name | Type | Description |
|---|---|---|
axis | Axis | AxisOptions | new axis instance or options |
location | AnnotationLocation | location of annotation for adding new axis |
Optional connectedObject | Group<Node> | connected object of axis |
Object
▸ addBaseLayer(baseLayer): DeviatedSchematicsWidget
Add baseLayer to container
this
▸ addChild(node): DeviatedSchematicsWidget
Add a child node
this
▸ addCssClass(cssclass): DeviatedSchematicsWidget
Adds new css class to node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ addInvalidateHandler(handler): DeviatedSchematicsWidget
Add invalidate handler
Deprecated
since 4.0, use Node.on instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
AnnotatedWidget.addInvalidateHandler
▸ addLegend(options): LegendPanel
Creates legend, scrollable panel and interactive tools for the options provided. If legend already exists, does nothing.
Example
widget.addLegend({
// use known types to create legend items automatically (from charts)
// use custom string item for user setup
'alignment': AnchorType.LeftTop,
'offset': new Point(60, 40)
});| Name | Type | Description |
|---|---|---|
options | LegendOptions | LegendPanel | legend options |
▸ Protected addLegendInteral(options): LegendPanel
| Name | Type |
|---|---|
options | LegendOptions | LegendPanel |
AnnotatedWidget.addLegendInteral
▸ addOverlay(overlay): DeviatedSchematicsWidget
Add overlay to container
this
▸ addTitle(location, options): void
Add title to annotation
| Name | Type | Description |
|---|---|---|
location | AnnotationLocation | of the title |
options | TitleOptions | title options |
void
▸ adjustPosition(area?, vAlign?, hAlign?): DeviatedSchematicsWidget
Adjust position of node to specified area
| Name | Type | Description |
|---|---|---|
Optional area | Rect | specified area. Default to Parent Model Limits |
Optional vAlign | string | vertical alignment. It can be "top", "bottom", "center". Defaults to "top". |
Optional hAlign | string | horizontal alignment It can be "left", "right", "center". Defaults to "left". |
this
AnnotatedWidget.adjustPosition
▸ Protected applyOpacity(context): DeviatedSchematicsWidget
This method is called to apply opacity if it is specified on the rendering context. The default implementation sets global alpha on the rendering context
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
this
▸ Protected applyResponsiveStyle(): void
Apply a responsive style rules it is exists
void
AnnotatedWidget.applyResponsiveStyle
▸ beginExport(): DeviatedSchematicsWidget
Prepares object before exporting and saving state
▸ changeBaseLayerOrder(overlay, order, anchor?): DeviatedSchematicsWidget
Changes the z-order of the baseLayer.
| Name | Type | Description |
|---|---|---|
overlay | Node | |
order | NodeOrder | position to be added |
Optional anchor | Node | anchor node to specify changeOrder with respect to this node |
this
AnnotatedWidget.changeBaseLayerOrder
▸ changeChildOrder(node, order, anchor?): DeviatedSchematicsWidget
changes the z-order of the nodes being rendered.
| Name | Type | Description |
|---|---|---|
node | Node | any child added in the Composite node |
order | NodeOrder | position to be added |
Optional anchor | Node | anchor node to specify changeOrder with respect to this node |
this
AnnotatedWidget.changeChildOrder
▸ changeOverlayOrder(overlay, order, anchor?): DeviatedSchematicsWidget
Changes the z-order of the overlay.
| Name | Type | Description |
|---|---|---|
overlay | Node | child overlay |
order | NodeOrder | position to be added |
Optional anchor | Node | anchor node to specify changeOrder with respect to this node |
this
AnnotatedWidget.changeOverlayOrder
▸ checkCollision(context): boolean
Check culling Returns true if object is inside of renderable area
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
true if node is collided
AnnotatedWidget.checkCollision
▸ clearBaseLayers(disposeBaseLayers?): DeviatedSchematicsWidget
Remove all child baseLayers from group
| Name | Type | Description |
|---|---|---|
Optional disposeBaseLayers | boolean | automatically dispose baseLayers. If it is true then method dispose is called for each baseLayer, false by default |
this
AnnotatedWidget.clearBaseLayers
▸ clearCache(): DeviatedSchematicsWidget
Clear cache
this
▸ clearChildren(disposeChildren?): DeviatedSchematicsWidget
Remove all child nodes from this composite group
| Name | Type | Description |
|---|---|---|
Optional disposeChildren | boolean | automatically dispose children. If it is true then method dispose is called for each child. |
this
▸ clearOverlays(disposeOverlays?): DeviatedSchematicsWidget
Remove all child overlays from group
| Name | Type | Description |
|---|---|---|
Optional disposeOverlays | boolean | automatically dispose overlays. If it is true then method dispose is called for each overlay, false by default |
this
All subclasses should override copyConstructor or provide custom implementation for this method
clone
▸ connect(object, model, orientation?, autoSize?): DeviatedSchematicsWidget
Synchronizes object with a model
| Name | Type | Description |
|---|---|---|
object | Axis | Group<Node> | object to be synchronized |
model | Group<Node> | source model |
Optional orientation | Orientation | horizontal or vertical |
Optional autoSize | boolean | true if object and model share the same device size in the orientation, true by default if not specified |
this
▸ connectStyle(style, type, callback): DeviatedSchematicsWidget
Connects style.
This convenience method subscribes a listener to given style for the specified type.
And automatically un-subscribes listener if node is disposed to prevent memory leaks
| Name | Type | Description |
|---|---|---|
style | EventDispatcher | connect style |
type | string | type of event or property |
callback | AttributeCallback<EventDispatcher> | function to be called |
this
▸ connectTool(tool): DeviatedSchematicsWidget
Connect a new tool with a toolname to the widget
| Name | Type | Description |
|---|---|---|
tool | AbstractTool | AbstractTool[] | tool associated with the widget |
this
▸ Protected copyConstructor(src, deepCopy?): DeviatedSchematicsWidget
Copy constructor function.
Function used as part of the cloning mechanism.
Implementations should copy the given instance state to this instance.
this
AnnotatedWidget.copyConstructor
▸ disconnect(object): DeviatedSchematicsWidget
Disconnect an object from its source model
this
▸ disconnectStyle(style, type, callback): DeviatedSchematicsWidget
Disconnect style
This convenience method un-subscribes a listener to given style for the specified type.
| Name | Type | Description |
|---|---|---|
style | EventDispatcher | connect style |
type | string | type of event or property |
callback | AttributeCallback<EventDispatcher> | function to be called |
this
AnnotatedWidget.disconnectStyle
▸ disconnectTool(tool): DeviatedSchematicsWidget
Disconnect the tool from the widget
| Name | Type | Description |
|---|---|---|
tool | AbstractTool | AbstractTool[] | tool to disconnect |
this
AnnotatedWidget.disconnectTool
▸ dispose(): void
Dispose node. Clear all listeners and disconnect style to avoid memory leaks
void
▸ Protected drawBorder(localContext, bounds?): DeviatedSchematicsWidget
Draws a rectangle at the bounding box (in parent coordinates)
| Name | Type | Description |
|---|---|---|
localContext | RenderingContext | The local rendering context |
Optional bounds | Rect | group bounds |
this
▸ enableClipping(doClip): DeviatedSchematicsWidget
Enables or disables clipping of this node. If enabled, shapes will not be rendered outside of its bounds.
| Name | Type | Description |
|---|---|---|
doClip | boolean | enable clipping on this node |
this
AnnotatedWidget.enableClipping
▸ enableEventPropagation(enable): DeviatedSchematicsWidget
Enable event propagation from the node hierarchy from bottom to top
This option is similar to DOM Event bubbling, which allows to get any event from child node. By default it is disabled for better performance.
Example
import {Group} from '@int/geotoolkit/scene/Group';
import {Events as SceneEvents} from '@int/geotoolkit/scene/Node';
const parentGroup = new Group()
.setName('ParentGroup')
.enableEventPropagation(true);
const childGroup = new Group()
.setName('ChildGroup');
parentGroup.addChild(childGroup);
parentGroup.on(SceneEvents.Invalidate, (eventName, sender, args) => {
// Got notifications from all children of parent group
});
childGroup.invalidate();| Name | Type | Description |
|---|---|---|
enable | boolean | enable |
this
AnnotatedWidget.enableEventPropagation
▸ enablePickingChildren(enable): DeviatedSchematicsWidget
Enables or disables picking children
| Name | Type | Description |
|---|---|---|
enable | boolean | enable picking children |
this
AnnotatedWidget.enablePickingChildren
▸ endExport(): void
Restores object's state after exporting
void
▸ enumerateNodes(callback, target?): void
Executes a provided function once for each child node
| Name | Type | Description |
|---|---|---|
callback | Callback<Node> | provided function |
Optional target | QueryBuilder<any> | target to pass to callback as a second parameter |
void
AnnotatedWidget.enumerateNodes
▸ execute(delegate): DeviatedSchematicsWidget
Executes delegate and return the result. It allows us to keep all initialization calls in one place,
and we do not need to scroll up or down in IDE to find how and where it was initialized.
Example
// All setters (.setName() for example) returns reference to the this.
// In order to modify inner object like LineStyle or Pattern, to get this object (property) we should call getter to get object reference.
// Then modify it as shown below in Option 1 or you can use execute methods shown in Option 2.
import {Group} from '@int/geotoolkit/scene/Group';
import {Rect} from '@int/geotoolkit/util/Rect';
// Option 1
const group = new Group()
.setName('MyGroup')
.setBounds(new Rect(0, 0, 42, 16))
.enableClipping(true)
.setTag({'type': 'sometype'});
group.getLineStyle().setPattern('pattern');
return group;
// Options 2 ( using execute method )
return group
.execute(function () {
this.getLineStyle()
.setPattern("pattern");
});| Name | Type | Description |
|---|---|---|
delegate | (this: DeviatedSchematicsWidget) => void | Function to execute |
The result if any or this
▸ execute<T>(delegate): T
| Name |
|---|
T |
| Name | Type |
|---|---|
delegate | (this: DeviatedSchematicsWidget) => T |
T
▸ exportToPdf(options?): Promise<IWritable>
Export a part of the container to PDF
This method sets automatically export scale and limits based on input parameters and current model scale and limits
| Name | Type | Description |
|---|---|---|
Optional options | ExportToPdfOptions | option to specify paper parameters and header and footer |
Promise<IWritable>
promise with output stream
▸ Protected filter(context): boolean
Filter node
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
flag filter flag ("true" to render node; "false" otherwise)
▸ fitToBounds(): DeviatedSchematicsWidget
fit bounds to model limits
Fires
Events.ModelVisibleLimitsChanged
this
▸ getAnimationStyle(): AnimationStyle
Return animation style
animationStyle current animation style
AnnotatedWidget.getAnimationStyle
▸ getAnnotation(location): Group<Node>
return the node at the specific annotation
| Name | Type | Description |
|---|---|---|
location | AnnotationLocation | position to return the node for |
▸ getAnnotationSize(): Required<AnnotationSize>
Return sizes of all annotations or the exact one
Required<AnnotationSize>
contains size of all annotations
AnnotatedWidget.getAnnotationSize
▸ getAnnotationSize(loc): string | number
| Name | Type |
|---|---|
loc | AnnotationLocation |
string | number
AnnotatedWidget.getAnnotationSize
▸ getAutoModelLimitsMode(): boolean
Get Model Limits Logics to use when no Model Limits have been set set to true: will use parents width and height, starting at 0 set to false: will use parents bounds
boolean
mode
AnnotatedWidget.getAutoModelLimitsMode
▸ getAutoModelLimitsStrategy(): ModelLimitsStrategy
Get Model Limits Logics Strategy
strategy
AnnotatedWidget.getAutoModelLimitsStrategy
▸ getBaseLayer(index): Node
Return baseLayer at specified index
| Name | Type | Description |
|---|---|---|
index | number | index at which to get the baseLayer for |
track
▸ getBaseLayers<S>(predicate, modify?): Iterator<Node>
Return iterator by baseLayers nodes
| Name | Type |
|---|---|
S | extends Node<S> |
| Name | Type | Description |
|---|---|---|
predicate | (value: Node) => value is S | a filter function |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
▸ getBaseLayers(filter?, modify?): Iterator<Node>
Returns an iterator for child baseLayers. The iterator does not support adding or deleting items from overlays by default. If it is necessary to modify a collection of overlays, pass true as the last parameter.
Example
// Gets a writable iterator
const it = node.getOverlays(null, true);| Name | Type | Description |
|---|---|---|
Optional filter | (node: Node) => boolean | A filter function. Returns all overlays if null. |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
An iterator for child overlays.
▸ getBaseLayersCount(): number
Returns amount of baseLayers
number
AnnotatedWidget.getBaseLayersCount
▸ getBounds(): Rect
Get the bounds in the parents model space. If bounds are not set, then parent model limits are used.
current bounds
▸ getCache(): Cache
Return cache strategy to be used to cache children nodes
cache
▸ getCenterModelLimits(): Rect
Gets WellBoreNode's model limits
ISchematicsWidget.getCenterModelLimits
AnnotatedWidget.getCenterModelLimits
▸ getChild(i): Node
Return node by index
| Name | Type | Description |
|---|---|---|
i | number | index of the node |
▸ getChildren<S>(predicate, modify?): Iterator<S>
Return iterator by child nodes
| Name | Type |
|---|---|
S | extends Node<S> |
| Name | Type | Description |
|---|---|---|
predicate | (value: Node) => value is S | a filter function |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
Iterator<S>
▸ getChildren(filter?, modify?): Iterator<Node>
Returns an iterator for child nodes. The iterator does not support adding or deleting items from children by default. If it is necessary to modify a collection of children, pass true as the last parameter.
Example
// Gets a writable iterator
const it = node.getChildren(null, true);| Name | Type | Description |
|---|---|---|
Optional filter | (node: Node) => boolean | A filter function. Returns all nodes if null. |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
An iterator for child nodes.
▸ getChildrenCount(): number
Return number of child nodes
number
AnnotatedWidget.getChildrenCount
▸ getClassName(): string
string
ISchematicsWidget.getClassName
▸ getClipStyle(): ClipStyle
Gets the current clipping style
clipping style
▸ getContentOrientation(): Orientation
Return content orientation
content orientation
AnnotatedWidget.getContentOrientation
▸ getContentsArea(transformation?): Rect
Return area without paddings. Model limits are mapped to content area, where children are layout.
| Name | Type | Description |
|---|---|---|
Optional transformation | Transformation | scene transformation |
AnnotatedWidget.getContentsArea
▸ getContentsTransform(): Transformation
getContentsTransform() retrieves the world transformation of the node.
transformation from model coordinates to bounds of the group
AnnotatedWidget.getContentsTransform
▸ getCss(): CssStyle
Return CSS style
▸ getCssClass(): string
Returns css class name to be used to apply CSS style
string
the css class name
▸ getCssClasses(): string[]
Gets list of css class names which applied to this node
string[]
▸ getCssTransform(): string
Returns CSS transformation
string
AnnotatedWidget.getCssTransform
▸ getData(data?): object
get options
| Name | Type | Description |
|---|---|---|
Optional data | unknown | how to extract data, null by default |
object
▸ getDesiredHeight(): string | number
Returns desired height of the group as a layoutable object This method is a helper method to get access to getLayoutStyle()
string | number
desired height ("undefined" by default)
AnnotatedWidget.getDesiredHeight
▸ getDesiredWidth(): string | number
Returns desired width of the group as a layoutable object. This method is a helper method to get access to getLayoutStyle()
string | number
desired width ("undefined" by default)
AnnotatedWidget.getDesiredWidth
▸ getDeviation(): Required<DeviationOptions>
Gets deviation properties
Required<DeviationOptions>
deviation options
▸ getDeviceLimits(): Rect
Return device limits
AnnotatedWidget.getDeviceLimits
▸ getDevicePoint(modelPoint, devicePoint?): Point
Gets device coordinates at given model ones
| Name | Type | Description |
|---|---|---|
modelPoint | Point | source model point (where y-ordinate is true MD-value) |
Optional devicePoint | Point | destination device point |
▸ getExportElement(options?): CompositeDocumentElement
Returns exportable element
| Name | Type | Description |
|---|---|---|
Optional options | ExportElementOptions | options |
return exportable element
AnnotatedWidget.getExportElement
▸ getExportLimits(): Rect
Return export limits
AnnotatedWidget.getExportLimits
▸ getExportScale(): Object
Gets export scale. By default scale is not set and equal to screen scale
Object
scale
| Name | Type | Description |
|---|---|---|
x | number | scale by x form model to device |
y | number | scale by y form model to device |
AnnotatedWidget.getExportScale
▸ Protected getExportState(): Record<string, any>
Returns export state
Record<string, any>
export state
AnnotatedWidget.getExportState
▸ getFillStyle(): FillStyle
Return fill style
fillStyle current fill style
▸ getId(): string | number
Returns the associated identifier of the node
string | number
The node's id
▸ getInfiniteMode(): boolean
Return infinity mode flag
boolean
flag
AnnotatedWidget.getInfiniteMode
▸ Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>
Gets invalidate method
AttributeCallback<EventDispatcher>
method to invalidate this object
AnnotatedWidget.getInvalidateMethod
▸ getLabelingStrategy(): LabelingStrategy
Gets labeling strategy
ISchematicsWidget.getLabelingStrategy
▸ getLayout(): Layout
Returns layout associated with the group
layout
▸ getLayoutStyle(): LayoutStyle<string | number>
return desired layout style
LayoutStyle<string | number>
AnnotatedWidget.getLayoutStyle
▸ getLegendLayer(): Group<Node>
Returns layer to keep legend on top of widget
AnnotatedWidget.getLegendLayer
▸ getLineStyle(): LineStyle
Return border style
▸ getLocalTransform(): Transformation
Retrieves the transformation of bounds to parent
transform the local transform.
AnnotatedWidget.getLocalTransform
▸ getManipulatorLayer(): CompositeNode<Node>
return manipulator layer
AnnotatedWidget.getManipulatorLayer
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
AnnotatedWidget.getMarginsStyle
get model node
▸ getModelLimits(): Rect
Gets model limits, the limits of this groups inside space
the current model limits
AnnotatedWidget.getModelLimits
▸ getModelPoint(devicePoint, modelPoint?): Point
Gets model coordinates (where y-ordinate is true MD-value) at given device ones.
If conversion fails then returned point contains NaN values as its x- and y- ordinates.
| Name | Type | Description |
|---|---|---|
devicePoint | Point | source device point |
Optional modelPoint | Point | destination model point |
▸ getName(): string
Returns the node name
string
The node name
▸ getOpacity(): number
Returns current node opacity
number
opacity
▸ getOpacityBlendMode(): BlendMode
Returns current node opacity
opacity blend mode
AnnotatedWidget.getOpacityBlendMode
▸ getOptions(): any
Gets widget options (see "setOptions" API for the options format)
any
widget options
▸ getOverlay(index): Node
Return overlay at specified index
| Name | Type | Description |
|---|---|---|
index | number | index at which to get the overlay for |
track
▸ getOverlayAt(index): Node
Return overlay at specified index
Deprecated
since 4.2 use getOverlay instead
| Name | Type | Description |
|---|---|---|
index | number | index at which to get the overlay for |
track
▸ getOverlayLayer(): Layer<Node>
Returns manipulator overlay to draw shapes that should move with the model
AnnotatedWidget.getOverlayLayer
▸ getOverlays<S>(predicate, modify?): Iterator<Node>
Return iterator by overlays nodes
| Name | Type |
|---|---|
S | extends Node<S> |
| Name | Type | Description |
|---|---|---|
predicate | (value: Node) => value is S | a filter function |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
▸ getOverlays(filter?, modify?): Iterator<Node>
Returns an iterator for child overlays. The iterator does not support adding or deleting items from overlays by default. If it is necessary to modify a collection of overlays, pass true as the last parameter.
Example
// Gets a writable iterator
const it = node.getOverlays(null, true);| Name | Type | Description |
|---|---|---|
Optional filter | (node: Node) => boolean | A filter function. Returns all overlays if null. |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
An iterator for child overlays.
▸ getOverlaysCount(): number
Returns amount of overlays
number
AnnotatedWidget.getOverlaysCount
▸ getPaddingStyle(): SpaceStyle<string | number>
Return padding style
SpaceStyle<string | number>
padding
AnnotatedWidget.getPaddingStyle
▸ getParent(): Node
Return parent node
parent node
▸ getPreferredSize(): Rect
Return preferred size to layout children
AnnotatedWidget.getPreferredSize
▸ getProperties(context?): OptionsOut
Gets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional context | ISerializationContext | serialization context |
properties object
▸ getProperty(name): any
Gets dynamic property by name. These properties can be used as a property bags
| Name | Type | Description |
|---|---|---|
name | string | property name |
any
▸ getPropertyKeys(): string[]
Returns known properties keys
string[]
AnnotatedWidget.getPropertyKeys
▸ getRenderingFilter(): IFilter
Return filter to be used for rendering and picking
current filter
AnnotatedWidget.getRenderingFilter
▸ getResponsiveStyle(): ResponsiveStyle
Return responsive style
AnnotatedWidget.getResponsiveStyle
▸ getRoot(): Node
Returns root node.
If node doesn't have parent then it returns itself.
the root node
▸ getScaleScrollStrategy(): Delegate
Gets ScaleScrollStrategy ("undefined" by default)
ScaleScrollStrategy (see "setScaleScrollStrategy" description for more info)
AnnotatedWidget.getScaleScrollStrategy
▸ getSceneTransform(): Transformation
Returns transformation from node to root scene
a transformation from node to root scene
AnnotatedWidget.getSceneTransform
▸ getSelectedComponentNodes(): ComponentNode[]
Gets selected component nodes
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getTool(): CompositeTool
Returns root tool associated to this widget
▸ getToolByName<T>(toolName): Tools[T]
Returns the tool matching the given name.
This function also accepts tool 'path' instead of absolute name.
For example:
getToolByName("compositeTool.panningTools.trackPanning.TrackPanning")
Would return the same tool as
getToolByName("TrackPanning")
As long as there is only one tool named "TrackPanning" in this composite
See listToolsNames()
| Name | Type |
|---|---|
T | extends string |
| Name | Type | Description |
|---|---|---|
toolName | T | The tool name or path |
Tools[T]
▸ getToolByType(toolType): AbstractTool
Returns the tool matching the given type. or null if nothing is matching the tool type
For example:
getToolByType(geotoolkit.controls.tools.Selection)
Would return the same tool as
getToolByName("pick")
| Name | Type | Description |
|---|---|---|
toolType | ClassType<any> | toolType of the tool |
▸ getToolsOptions(): ToolsOptionsOut
Gets Tools Options
JSON which defines tools options
AnnotatedWidget.getToolsOptions
▸ getViewMode(): ViewMode
Gets well bore view mode
viewMode
▸ getVisible(): boolean
Return visibility of the node
boolean
true if node is visible
▸ getVisibleCenterModelLimits(ignoreModelLimits?): Rect
Returns visible model limits of the center model
| Name | Type | Description |
|---|---|---|
Optional ignoreModelLimits | boolean | flag defines whether to ignore model limits or not. By default this option is false and visible limits will be intersected with center model limits |
AnnotatedWidget.getVisibleCenterModelLimits
▸ getVisibleDeviceLimits(ignoreModelLimits?): Rect
Return visible device limits
| Name | Type | Description |
|---|---|---|
Optional ignoreModelLimits | boolean | flag defines whether to ignore ModelLimits or not |
AnnotatedWidget.getVisibleDeviceLimits
▸ getVisibleModelLimits(ignoreModelLimits?): Rect
Return visible model limits
| Name | Type | Description |
|---|---|---|
Optional ignoreModelLimits | boolean | flag defines whether to ignore ModelLimits or not |
AnnotatedWidget.getVisibleModelLimits
▸ getWorldTransform(): Transformation
Retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.
AnnotatedWidget.getWorldTransform
▸ getZIndex(): number
Returns node z-index (null if not set)
number
▸ hasCssClass(cssClass): boolean
Check if node has specified css class
| Name | Type | Description |
|---|---|---|
cssClass | string | css class name |
boolean
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
AnnotatedWidget.hasEventListener
▸ indexOfBaseLayer(baseLayer): number
Return index of overlay ( index of the specified child or -1 if baseLayer is not found)
| Name | Type | Description |
|---|---|---|
baseLayer | Node | baseLayer to check index |
number
AnnotatedWidget.indexOfBaseLayer
▸ indexOfChild(node): number
Return index of child ( index of the specified child or -1 if node is not found)
| Name | Type | Description |
|---|---|---|
node | Node | node to check index |
number
▸ indexOfOverlay(overlay): number
Return index of overlay ( index of the specified child or -1 if overlay is not found)
| Name | Type | Description |
|---|---|---|
overlay | Node | overlay to check index |
number
AnnotatedWidget.indexOfOverlay
▸ Protected initializeFloatingAnnotationTool(): FloatingAnnotationTool
AnnotatedWidget.initializeFloatingAnnotationTool
▸ initializeLayout(settings): Group<Node>
| Name | Type |
|---|---|
settings | Options |
AnnotatedWidget.initializeLayout
▸ Protected initializeTools(options?): DeviatedSchematicsWidget
function call in the constructor to initialize tools in the widget
This widget contains by default :
- CrossHair tool
- RubberBand tool
- Panning tool
- HorizontalScroll
- VerticalScroll
| Name | Type | Description |
|---|---|---|
Optional options | Options | tools options |
this
AnnotatedWidget.initializeTools
▸ insertAxis(axisIndex, axis, location, connectedObject?): Object
Insert new axis and connect with object
| Name | Type | Description |
|---|---|---|
axisIndex | number | desired axis index |
axis | Axis | AxisOptions | new axis instance or options |
location | AnnotationLocation | location of annotation for adding new axis |
Optional connectedObject | Group<Node> | connected object of axis |
Object
▸ insertBaseLayer(index, baseLayer): DeviatedSchematicsWidget
Insert child baseLayer at specified index
| Name | Type | Description |
|---|---|---|
index | number | specified index |
baseLayer | Node | a baseLayer to add |
this
AnnotatedWidget.insertBaseLayer
▸ insertChild(index, node): DeviatedSchematicsWidget
Insert child node at specified index
| Name | Type | Description |
|---|---|---|
index | number | specified index |
node | Node | a child node to add |
this
▸ insertOverlay(index, overlay): DeviatedSchematicsWidget
Insert child overlay at specified index
| Name | Type | Description |
|---|---|---|
index | number | specified index |
overlay | Node | a overlay to add |
this
▸ invalidate(bounds?, force?): DeviatedSchematicsWidget
Invalidate node
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | optional rectangular area to be invalidated, or force flag if rectangle is empty |
Optional force | boolean | optional boolean parameter that can force invalidation |
this
▸ invalidateLayout(propagate?): DeviatedSchematicsWidget
Notify that layout is invalidated. Send event Events.LayoutInvalidated
| Name | Type | Description |
|---|---|---|
Optional propagate | boolean | propagate invalidate layout to parent |
this
AnnotatedWidget.invalidateLayout
▸ invalidateParent(bounds?, force?): DeviatedSchematicsWidget
Invalidate parent area
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | area to invalidate |
Optional force | boolean | force |
this
AnnotatedWidget.invalidateParent
▸ isClippingEnabled(): boolean
Returns if clipping is enabled or not for this node.
boolean
AnnotatedWidget.isClippingEnabled
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isEventPropagationEnabled(): boolean
Return true if event propagation is enabled from child to parent
boolean
AnnotatedWidget.isEventPropagationEnabled
▸ isHorizontalFlip(): boolean
Return true if the representation is flipped horizontally
boolean
flip
AnnotatedWidget.isHorizontalFlip
▸ isLayoutInvalidated(): boolean
Return true if layout is invalid
boolean
AnnotatedWidget.isLayoutInvalidated
▸ isNotificationEnabled(): boolean
return state of notification
boolean
current notification state
AnnotatedWidget.isNotificationEnabled
▸ isPickingChildrenEnabled(): boolean
Returns if picking children is enabled or not for this node.
boolean
pickingChildren
AnnotatedWidget.isPickingChildrenEnabled
▸ isSelectable(): boolean
Returns true if node can be picked/selected.
boolean
The selectable flag
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ isVerticalFlip(): boolean
Return true if the representation is flipped vertically
boolean
flip
AnnotatedWidget.isVerticalFlip
▸ listToolsNames(): string[]
List all the tools contained in this composite. Prepend their parent tools parent using a '.'.
string[]
AnnotatedWidget.listToolsNames
▸ loadTemplate(template, registry?): void
Load template loads the saved visual properties of the current template. It is only a visual representation of the current widget. It does not contain any data
| Name | Type | Description |
|---|---|---|
template | string | template to be applied to current widget |
Optional registry | Registry | registry |
void
▸ moveTo(area, vAlign?, hAlign?): DeviatedSchematicsWidget
MoveTo position of node to specified area
| Name | Type | Description |
|---|---|---|
area | Rect | specified area |
Optional vAlign | string | vertical alignment. It can be "top", "bottom", "center". |
Optional hAlign | string | horizontal alignment It can be "left", "right", "center". |
this
▸ notify<E>(type, source, args?): DeviatedSchematicsWidget
Notify listeners of the Node
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event |
source | AnnotatedWidget | source who called the event |
Optional args | EventMap[E] | event arguments |
this
▸ Protected notifyRoot(event, source, args?): Node
Notify an even to root node
| Name | Type | Description |
|---|---|---|
event | string | type of event |
source | Node | source who called the event |
Optional args | any | event arguments |
this
▸ off<E>(type?, callback?): DeviatedSchematicsWidget
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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
Optional type | E | type of the event |
Optional callback | (eventType: E, sender: DeviatedSchematicsWidget, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): DeviatedSchematicsWidget
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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: DeviatedSchematicsWidget, args: EventMap[E]) => void | to be called |
this
▸ Protected onBoundsChanged(bounds): DeviatedSchematicsWidget
Occurs when bounds has been changed
| Name | Type | Description |
|---|---|---|
bounds | Rect | bound of the node in the parent coordinates |
this
AnnotatedWidget.onBoundsChanged
▸ Protected onChildAdded(child): void
This method is called it child or children are added
void
▸ Protected onChildRemoved(child): void
This method is called it child or children are removed
| Name | Type | Description |
|---|---|---|
child | Node | removed child |
void
AnnotatedWidget.onChildRemoved
▸ Protected onParentChanged(node): DeviatedSchematicsWidget
This method is called when parent changes. Do not call it directly.
| Name | Type | Description |
|---|---|---|
node | Node | node to change parent |
this
AnnotatedWidget.onParentChanged
▸ Protected onVisibilityChanged(): void
This method is called if visibility is changed. Send event Events.VisibilityChanged
void
AnnotatedWidget.onVisibilityChanged
▸ pan(dx, dy): DeviatedSchematicsWidget
attempts to translate the model using the specific x, y translation
Fires
Events.ModelVisibleLimitsChanged
| Name | Type | Description |
|---|---|---|
dx | number | relative horizontal change |
dy | number | relative vertical change |
this
▸ panModelTo(target, animationOptions?): DeviatedSchematicsWidget
Pans the content to the point.
| Name | Type | Description |
|---|---|---|
target | Point | Point where to pan in model space |
Optional animationOptions | PanAnimationOptions | Animation options |
▸ Protected postRendering(context, callback?): void
To be called after rendering, used for PDF output
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
Optional callback | () => void | callback to be called after rendering |
void
▸ Protected preRendering(context, callback?): void
Occurs before child rendering
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
Optional callback | () => void | callback to be called after rendering of geometry |
void
▸ rebuild(force?, changes?): DeviatedSchematicsWidget
Rebuild node. This method resets state, cache, and invalidate node.
| Name | Type | Description |
|---|---|---|
Optional force | boolean | optional boolean parameter that can force invalidation |
Optional changes | StateChanges | optional parameter to specify a reason of changes |
this
▸ refreshLayout(): DeviatedSchematicsWidget
Refresh layout of inner components of the widget
▸ registerAnimationStyle(root): void
Register animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
AnnotatedWidget.registerAnimationStyle
▸ removeAxis(axis): void
remove axis
| Name | Type | Description |
|---|---|---|
axis | Axis | axis to be removed |
void
▸ removeBaseLayer(baseLayer): DeviatedSchematicsWidget
Remove child baseLayer
this
AnnotatedWidget.removeBaseLayer
▸ removeChild(node, disposeChildren?): DeviatedSchematicsWidget
Remove child node
| Name | Type | Description |
|---|---|---|
node | Node | Node[] | node or array of nodes to be removed |
Optional disposeChildren | boolean | automatically dispose children. If it is true then method dispose is called for each child. |
this
▸ removeCssClass(cssclass): DeviatedSchematicsWidget
Removes css class from node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
AnnotatedWidget.removeCssClass
▸ removeInvalidateHandler(handler): DeviatedSchematicsWidget
Remove invalidate handler
Deprecated
since 4.0, use Node.off instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
AnnotatedWidget.removeInvalidateHandler
▸ removeLegend(legendPanel): DeviatedSchematicsWidget
remove legend
| Name | Type |
|---|---|
legendPanel | LegendPanel |
▸ removeOverlay(overlay): DeviatedSchematicsWidget
Remove child overlay
this
▸ removeTitle(location): void
remove title in the location
| Name | Type | Description |
|---|---|---|
location | AnnotationLocation | of the title |
void
▸ render(context): void
Render group
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render group |
void
▸ renderAsync(context, callback): void
Render node in asynchronous mode. This implementation doesn't support cache for now.
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
callback | () => void | callback function |
void
▸ Protected renderBackground(context, bounds): DeviatedSchematicsWidget
Render background
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render background |
bounds | Rect | group bounds |
this
AnnotatedWidget.renderBackground
▸ Protected renderBaseLayers(context): DeviatedSchematicsWidget
Render baseLayers on bottom of cache. This method does nothing, but can be implemented to render graphics on bottom of cache and between borders
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render baseLayers |
this
AnnotatedWidget.renderBaseLayers
▸ Protected renderBaseLayersAsync(context, callback): void
Render baseLayers on bottom of cache in asynchronous mode. This method calls renderBaseLayers
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render overlays |
callback | () => void | callback function |
void
AnnotatedWidget.renderBaseLayersAsync
▸ Protected renderChildren(context): void
Render children
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
AnnotatedWidget.renderChildren
▸ Protected renderChildrenAsync(context, callback): void
Render children async
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
callback | () => void | callback function to be called then all children are rendered |
void
AnnotatedWidget.renderChildrenAsync
▸ Protected renderContent(context): void
render to specified context. This method calls preRendering, renderChildren, postRendering
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ Protected renderContentAsync(context, callback): void
Render children in asynchronous mode
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
callback | () => void | callback function to be called then all children are rendered |
void
AnnotatedWidget.renderContentAsync
▸ Protected renderOverlays(context): DeviatedSchematicsWidget
Render overlays on top of cache. This method does nothing, but can be implemented to render graphics on top of cache and between borders
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render overlays |
this
AnnotatedWidget.renderOverlays
▸ Protected renderOverlaysAsync(context, callback): void
Render overlays on top of cache in asynchronous mode. This method calls renderOverlays
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render overlays |
callback | () => void | callback function |
void
AnnotatedWidget.renderOverlaysAsync
▸ restoreToolState(): DeviatedSchematicsWidget
Restore tools state
this
AnnotatedWidget.restoreToolState
▸ resumeUpdate(rebuild?, changes?): DeviatedSchematicsWidget
Resume auto update
| Name | Type | Description |
|---|---|---|
Optional rebuild | boolean | force rebuild |
Optional changes | StateChanges | optional parameter to specify a reason of changes |
this
▸ rotate(theta, x, y): DeviatedSchematicsWidget
Rotate bounds around a given coordinate
| Name | Type | Description |
|---|---|---|
theta | number | angle to rotate node, in radians |
x | number | x coordinate to rotate around |
y | number | y coordinate to rotate around |
this
▸ saveTemplate(registry?): string
Save template saves visual properties of the current template. It is only a visual representation of the current widget. It does not contain any data
| Name | Type | Description |
|---|---|---|
Optional registry | Registry | registry |
string
▸ saveToolsState(): DeviatedSchematicsWidget
Saves tools state
this
AnnotatedWidget.saveToolsState
▸ scale(xx, yy): DeviatedSchematicsWidget
Scale node
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
this
▸ scaleModel(xx, yy, posX?, posY?): DeviatedSchematicsWidget
Scale node's contents.
Fires
Events.ModelVisibleLimitsChanged
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
Optional posX | number | x position to scale from (in pxl) |
Optional posY | number | y position to scale from (in pxl) |
▸ setAnimationStyle(animationStyle): DeviatedSchematicsWidget
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
AnnotatedWidget.setAnimationStyle
▸ setAnnotationSize(annotationSize?): DeviatedSchematicsWidget
apply size (width or height) to annotation (convenience method)
Example
{
* west : 50,
* east : '10%',
* south: 'auto'
* }| Name | Type | Description |
|---|---|---|
Optional annotationSize | AnnotationSize | JSON to hold (width or height) of the annotation |
this
AnnotatedWidget.setAnnotationSize
▸ setAnnotationsOptions(options): DeviatedSchematicsWidget
Sets annotations' options. currently setAnnotationOptions can only modify existing annotation, while the constructor for the widget can create new ones.
| Name | Type | Description |
|---|---|---|
options | AnnotationOptions | JSON to hold annotations' options |
this
AnnotatedWidget.setAnnotationsOptions
▸ setAutoModelLimitsMode(mode): DeviatedSchematicsWidget
Set Model Limits Logics to use when no Model Limits have been set set to true: will use parents width and height, starting at 0 set to false: will use parents bounds. This is convenient method. It creates AutoModelLimitsStrategy
| Name | Type | Description |
|---|---|---|
mode | boolean | Model Limits Logics to be used |
this
AnnotatedWidget.setAutoModelLimitsMode
▸ setAutoModelLimitsStrategy(strategy): DeviatedSchematicsWidget
Set Model Limits Logics Strategy
| Name | Type | Description |
|---|---|---|
strategy | ModelLimitsStrategy | Model Limits logic strategy to use |
this
AnnotatedWidget.setAutoModelLimitsStrategy
▸ setBounds(bounds): DeviatedSchematicsWidget
Sets bounds of the node in the parent coordinates
this
▸ setCache(cache, rebuild?): DeviatedSchematicsWidget
Sets cache to be used to cache
| Name | Type | Description |
|---|---|---|
cache | Cache | cache to be used |
Optional rebuild | boolean | rebuild cache |
this
▸ setCenterModelLimits(modellimits): DeviatedSchematicsWidget
Set the model limits of center model
Fires
Events.ModelVisibleLimitsChanged
Example
//artificially expand the widget model limits
import {Rect} from '@int/geotoolkit/util/Rect';
const newLimits = new Rect(0,0,10,10);
widget.setCenterModelLimits(newLimits);| Name | Type | Description |
|---|---|---|
modellimits | Rect | model limits |
AnnotatedWidget.setCenterModelLimits
▸ setChild(index, node): DeviatedSchematicsWidget
Replace child node by index
| Name | Type | Description |
|---|---|---|
index | number | index of the node |
node | Node | node |
this
▸ setClipStyle(style): DeviatedSchematicsWidget
Sets a new clipping style
| Name | Type | Description |
|---|---|---|
style | GraphicsPath | ClipStyle | Options | a new clipping style |
this
▸ setContentOrientation(orientation): DeviatedSchematicsWidget
Set content orientation
| Name | Type | Description |
|---|---|---|
orientation | Orientation | content orientation |
this
AnnotatedWidget.setContentOrientation
▸ setCss(style, merge?): DeviatedSchematicsWidget
Sets CSS style. This style will be applied for all inserted elements
| Name | Type | Description |
|---|---|---|
style | Type | CSS style to be applied to inserted elements |
Optional merge | boolean | merge flag |
this
▸ setCssClass(name): DeviatedSchematicsWidget
Sets css class name of the node to be used to apply CSS style
| Name | Type | Description |
|---|---|---|
name | string | css class name of the node |
this
▸ setCssTransform(transform): DeviatedSchematicsWidget
Set CSS transformation
| Name | Type | Description |
|---|---|---|
transform | string | Transformation | transformation css transformation instruction or Transformation instance |
this
AnnotatedWidget.setCssTransform
▸ setData(data): DeviatedSchematicsWidget
Sets data
| Name | Type | Description |
|---|---|---|
data | Data | data object |
▸ setDesiredHeight(value, silent?): DeviatedSchematicsWidget
Sets desired height of the group as a layoutable object
| Name | Type | Description |
|---|---|---|
value | string | number | desired height to set, use 'auto' for automatic desired height |
Optional silent | boolean | silent setting |
this
AnnotatedWidget.setDesiredHeight
▸ setDesiredWidth(value, silent?): DeviatedSchematicsWidget
Sets desired width of the group as a layoutable object
| Name | Type | Description |
|---|---|---|
value | string | number | desired width to set |
Optional silent | boolean | silent setting |
this
AnnotatedWidget.setDesiredWidth
▸ setDeviation(options): DeviatedSchematicsWidget
Set deviation properties
| Name | Type | Description |
|---|---|---|
options | DeviationOptions | deviation options |
this
▸ setExportLimits(limits): DeviatedSchematicsWidget
Sets export limits
| Name | Type | Description |
|---|---|---|
limits | Rect | export limits |
AnnotatedWidget.setExportLimits
▸ setExportScale(scale): DeviatedSchematicsWidget
Sets export scale.
| Name | Type | Description |
|---|---|---|
scale | Object | scale |
scale.x | number | scale by x form model to device |
scale.y | number | scale by y form model to device |
AnnotatedWidget.setExportScale
▸ setFillStyle(fillStyle, merge?): DeviatedSchematicsWidget
Sets fill style
| Name | Type | Description |
|---|---|---|
fillStyle | Type | a new fill style |
Optional merge | boolean | true if you want to merge fillStyle with existing attribute, false by default |
this
▸ setHorizontalFlip(enable): DeviatedSchematicsWidget
Set horizontal flip of the representation
| Name | Type | Description |
|---|---|---|
enable | boolean | enable flip |
this
AnnotatedWidget.setHorizontalFlip
▸ setId(id): DeviatedSchematicsWidget
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setInfiniteMode(infinityMode): DeviatedSchematicsWidget
Set infinity mode flag to draw composite without collision check
| Name | Type | Description |
|---|---|---|
infinityMode | boolean | infinity mode flag |
this
AnnotatedWidget.setInfiniteMode
▸ setLabelsMode(mode): DeviatedSchematicsWidget
Sets labeling mode (convenience method with all labeling default settings).
For fine tuning use "setOptions" with "labeling" customized parameters section
| Name | Type | Description |
|---|---|---|
mode | Mode | labeling mode |
this
▸ setLayout(layout): DeviatedSchematicsWidget
Associate layout with a group.
| Name | Type | Description |
|---|---|---|
layout | Record<string, any> | Layout | layout instance to be set or layout properties to apply |
this
▸ Protected setLayoutInvalidated(invalidated): void
Set invalidation status
| Name | Type | Description |
|---|---|---|
invalidated | boolean | invalidated layout |
void
AnnotatedWidget.setLayoutInvalidated
▸ setLayoutStyle(layoutStyle, silent?, merge?): DeviatedSchematicsWidget
specify desired layout style
| Name | Type | Description |
|---|---|---|
layoutStyle | LayoutStyle<string | number> | Options<string | number> | desired layout style |
Optional silent | boolean | silent setting |
Optional merge | boolean | true if you want to merge layoutStyle with existing attribute, false by default |
this
AnnotatedWidget.setLayoutStyle
▸ setLineStyle(lineStyle, merge?): DeviatedSchematicsWidget
Sets border color Returns this
| Name | Type | Description |
|---|---|---|
lineStyle | Type | line style or options |
Optional merge | boolean | true if you want to merge lineStyle with existing attribute, false by default |
this
▸ setLocalTransform(localTransform, force?): DeviatedSchematicsWidget
Sets local transformation to be used to transform from local to parent coordinate
| Name | Type | Description |
|---|---|---|
localTransform | Transformation | local transformation for this node |
Optional force | boolean | boolean flag to force update event if transformations are equal, false by default |
this
AnnotatedWidget.setLocalTransform
▸ setMarginsStyle(margins, merge?): DeviatedSchematicsWidget
Sets margins style
| Name | Type | Description |
|---|---|---|
margins | Type<string | number> | margins style |
Optional merge | boolean | true if you want to merge marginsStyle with existing attribute, false by default |
this
AnnotatedWidget.setMarginsStyle
▸ setModelLimits(limits): DeviatedSchematicsWidget
Sets inner model limits
| Name | Type | Description |
|---|---|---|
limits | Type | inner limits |
this
AnnotatedWidget.setModelLimits
▸ setModelTransformation(transformation): DeviatedSchematicsWidget
Attempts to set local transformation for the model. NOTE: the local transformation set may not be equal to transformation passed - it depends on current ScaleScrollStrategy set on the node.
| Name | Type | Description |
|---|---|---|
transformation | Transformation | transformation to set |
AnnotatedWidget.setModelTransformation
▸ setName(name): DeviatedSchematicsWidget
Sets name of the node
| Name | Type | Description |
|---|---|---|
name | string | The node name |
this
▸ setNotification(notify, force?): DeviatedSchematicsWidget
set notification state
| Name | Type | Description |
|---|---|---|
notify | boolean | flag set to invalidate parent or not |
Optional force | boolean | true if parent should be invalidated immediately |
this
AnnotatedWidget.setNotification
▸ setOpacity(opacity, blendMode?): DeviatedSchematicsWidget
Sets node opacity
| Name | Type | Description |
|---|---|---|
opacity | number | node opacity from 0 to 1 |
Optional blendMode | BlendMode | opacity blend mode. If it is normal, opacity will be replaced. |
this
▸ setOptions(options?): DeviatedSchematicsWidget
Sets options
| Name | Type | Description |
|---|---|---|
Optional options | OptionsBase | options object |
this
▸ setPaddingStyle(paddingStyle, merge?): DeviatedSchematicsWidget
Sets padding style
| Name | Type | Description |
|---|---|---|
paddingStyle | Type<string | number> | padding style |
Optional merge | boolean | true if you want to merge paddingStyle with existing attribute, false by default |
this
AnnotatedWidget.setPaddingStyle
▸ setProperties(options?): DeviatedSchematicsWidget
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional options | Options | options object |
this
▸ setProperty(name, value): DeviatedSchematicsWidget
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
▸ setRenderingFilter(filter): DeviatedSchematicsWidget
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
AnnotatedWidget.setRenderingFilter
▸ setResponsiveStyle(style): DeviatedSchematicsWidget
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
AnnotatedWidget.setResponsiveStyle
▸ setScaleScrollStrategy(delegate): DeviatedSchematicsWidget
set the scale scroll strategy to apply to the widget
| Name | Type | Description |
|---|---|---|
delegate | Delegate | scaleScrollStrategy to set |
this
AnnotatedWidget.setScaleScrollStrategy
▸ setSelectable(selectable): DeviatedSchematicsWidget
Allows to select node. If node is not selectable then child node is not selectable.
| Name | Type | Description |
|---|---|---|
selectable | boolean | flag to allow node selection |
this
▸ setSelectedComponentNodes(selectedComponentNodes): DeviatedSchematicsWidget
Sets selected component nodes
| Name | Type | Description |
|---|---|---|
selectedComponentNodes | ComponentNode[] | selected component nodes |
this
▸ setSilent(bool): DeviatedSchematicsWidget
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setTag(tag): DeviatedSchematicsWidget
Allows the user to associate any arbitrary object with the node.
| Name | Type | Description |
|---|---|---|
tag | any | The object to be associated with the node. |
this
▸ setTitleOptions(location, options): DeviatedSchematicsWidget
set options for title
| Name | Type | Description |
|---|---|---|
location | AnnotationLocation | of the title |
options | Omit<TitleOptions, "location"> | title options |
AnnotatedWidget.setTitleOptions
▸ Protected setTool(tool): DeviatedSchematicsWidget
Set root tool associated to this widget
| Name | Type | Description |
|---|---|---|
tool | CompositeTool | tool to be set |
▸ setToolsOptions(options): DeviatedSchematicsWidget
Sets tools options
| Name | Type | Description |
|---|---|---|
options | any | options (see AnnotatedWidget.setToolsOptions for inherited options) |
this
AnnotatedWidget.setToolsOptions
▸ setVerticalFlip(flip): DeviatedSchematicsWidget
Set vertical flip of the representation
| Name | Type | Description |
|---|---|---|
flip | boolean | flag to set the vertical flip of the representation |
this
AnnotatedWidget.setVerticalFlip
▸ setViewMode(viewMode): Object
Sets well bore view mode
| Name | Type | Description |
|---|---|---|
viewMode | ViewMode | ViewModeInfo | well bore view mode |
Object
"model limits to bounds" depths mapping
| Name | Type | Description |
|---|---|---|
boundsdepths | number[] | bounds depths |
modellimitsdepths | number[] | model limits depths |
▸ setVisible(value): DeviatedSchematicsWidget
Sets visibility of the node. Send event Events.VisibilityChanged
| Name | Type | Description |
|---|---|---|
value | boolean | flag specifying visibility of the node |
this
▸ setVisibleCenterModelLimits(newVisibleModelLimits): DeviatedSchematicsWidget
Attempts to set model's visible limits to specified limits. NOTE: the limits set may not be equal to the limit passed - it depends on current ScaleScrollStrategy set on the node.
Fires
Events.ModelVisibleLimitsChanged
| Name | Type | Description |
|---|---|---|
newVisibleModelLimits | Rect | limits to set |
AnnotatedWidget.setVisibleCenterModelLimits
▸ setVisibleModelLimits(newVisibleModelLimits): DeviatedSchematicsWidget
Attempts to set model's visible limits to specified limits. NOTE: the limits set may not be equal to the limit passed - it depends on current ScaleScrollStrategy set on the node.
| Name | Type | Description |
|---|---|---|
newVisibleModelLimits | Rect | limits to set |
AnnotatedWidget.setVisibleModelLimits
▸ setZIndex(value): DeviatedSchematicsWidget
Sets z-index for node (set null for default)
| Name | Type | Description |
|---|---|---|
value | number | index determining node z-position |
this
▸ shear(shx, shy): DeviatedSchematicsWidget
Shear this node's bounds
| Name | Type | Description |
|---|---|---|
shx | number | x-axis shear |
shy | number | y-axis shear |
this
▸ suspendUpdate(): DeviatedSchematicsWidget
Suspend auto update
this
▸ Protected synchronizeViewLimits(): DeviatedSchematicsWidget
AnnotatedWidget.synchronizeViewLimits
▸ toString(): string
Returns a string representation of this object (generally the classname)
string
A string representation
▸ transformDepth(val, mdToLinear?): number
Transforms depth value between linear and MD model space.
If not possible returns NaN
| Name | Type | Description |
|---|---|---|
val | number | depth value to transform |
Optional mdToLinear | boolean | direction of transformation |
number
transformed value
▸ translate(tx, ty): DeviatedSchematicsWidget
Translate bounds
| Name | Type | Description |
|---|---|---|
tx | number | x translation |
ty | number | y translation |
this
▸ translateModel(tx, ty): DeviatedSchematicsWidget
Translates widget's contents.
Fires
Events.ModelVisibleLimitsChanged
| Name | Type | Description |
|---|---|---|
tx | number | x translation |
ty | number | y translation |
AnnotatedWidget.translateModel
▸ unregisterAnimationStyle(root): void
Unregister animation style.
| Name | Type | Description |
|---|---|---|
root | AnimatedNode | root node for node |
void
AnnotatedWidget.unregisterAnimationStyle
▸ updateLayout(targets?, point?): DeviatedSchematicsWidget
Updates layout(s)
| Name | Type | Description |
|---|---|---|
Optional targets | ILayoutable[] | optional parameter about which element to layout |
Optional point | Point | device point to keep position |
this
▸ updateSceneTransformation(): DeviatedSchematicsWidget
Update scene transformation
this
AnnotatedWidget.updateSceneTransformation
▸ updateState(regions?, changes?): DeviatedSchematicsWidget
Update state. These methods reset node state and update state for children. this method is useful to refresh a scene graph
| Name | Type | Description |
|---|---|---|
Optional regions | Rect[] | optional array to return invalid rectangles in the parent coordinates |
Optional changes | StateChanges | optional parameter to specify a reason of changes |
this
▸ updateSuspended(): boolean
Return state of suspend state
boolean
state of update
AnnotatedWidget.updateSuspended
▸ Protected updateTimeStamp(): DeviatedSchematicsWidget
Update time stamp to indicate that Node or Children has been changed.
this
AnnotatedWidget.updateTimeStamp
▸ zoomIn(): DeviatedSchematicsWidget
zoom in, with default factor = 5/4
this
▸ zoomOut(): DeviatedSchematicsWidget
zoom out, with default factor = 5/4
this
▸ zoomToRect(limits?): void
Sets visible model limits
Fires
Events.ModelVisibleLimitsChanged
| Name | Type | Description |
|---|---|---|
Optional limits | Rect | the visible model limits |
void
▸ Static enableSceneGraphNotification(enabled): void
Enable / disable all notifications
| Name | Type | Description |
|---|---|---|
enabled | boolean | sets if this object sends notifications |
void
AnnotatedWidget.enableSceneGraphNotification
▸ Static findParent<T>(node, classType, filter?): InstanceType<T>
Find root of the node with specified type
| Name | Type |
|---|---|
T | extends Constructor<any> |
| Name | Type | Description |
|---|---|---|
node | Node | node to start search |
classType | T | type of the class to search for |
Optional filter | (node: Node) => boolean | additional filter to apply |
InstanceType<T>
▸ Static findParent(node, classType, filter?): Node
Find root of the node with specified type
| Name | Type | Description |
|---|---|---|
node | Node | node to start search |
classType | string | interface name to search for |
Optional filter | (node: Node) => boolean | additional filter to apply |
▸ Static getClassName(): string
string
▸ Static isSceneGraphNotificationEnabled(): boolean
Return status of the global notification for all nodes.
boolean