API / geotoolkit / welllog / StackedTrack / StackedTrack
welllog.StackedTrack.StackedTrack
The StackedTrack serves as a container for all kinds of tracks and visuals like curves, fill etc.
↳
StackedTrack
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
backgroundcolor | string | Background color fill style |
backgroundcolor | FillStyle | Background color fill style |
backgroundcolor-color | string | Color in CSS form |
backgroundcolor-evenoddmode | boolean | Even-odd fill mode |
backgroundcolor-fillpattern | Pattern | Pattern |
backgroundcolor-fillpattern-containername | string | An 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 |
backgroundcolor-fillpattern-patternname | string | Name of this pattern for indexing |
backgroundcolor-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
backgroundcolor-foreground | string | Foreground color |
backgroundcolor-pattern | Pattern | Pattern |
border | Border | Outline of the track |
border-borders | Visible | Style applied on borders, by default is |
border-borders-bottom | boolean | Visibility of bottom part |
border-borders-left | boolean | Visibility of left part |
border-borders-right | boolean | Visibility of right part |
border-borders-top | boolean | Visibility of top part |
border-borderstyle | BorderStyle | Style applied on borders |
border-clipstyle | ClipStyle | Clipping style |
border-clipstyle-evenodd | boolean | True if evenodd mode is on ('nonzero' mode otherwise) |
border-clipstyle-geometry | GraphicsPath | Clipping geometry |
border-clipstyle-geometry-bounds | Rect | Bounds |
border-clipstyle-geometry-bounds-height | number | Height |
border-clipstyle-geometry-bounds-readonly | boolean | Readonly |
border-clipstyle-geometry-bounds-width | number | Width |
border-clipstyle-geometry-bounds-x | number | Left |
border-clipstyle-geometry-bounds-y | number | Top |
border-clipstyle | GraphicsPath | Clipping style |
border-cssclass | string | The css class name of this node |
border-csscursor | string | CSS cursor associated with node |
border-cssstyle | string | CSS style to be applied to inserted elements |
border-fillstyle | string | Style applied on fill |
border-fillstyle | FillStyle | Style applied on fill |
border-id | string | number | Id of the node, its a unique identifier |
border-linestyle | string | Style applied on outline |
border-linestyle | LineStyle | Style applied on outline |
border-linestyle-color | string | Color in CSS form |
border-linestyle-fill | string | Optional fill style to be used to fill lines generated with this style |
border-linestyle-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
border-linestyle-linecap | CapStyle | The line cap style |
border-linestyle-linedashoffset | number | Line dash offset of dashed line |
border-linestyle-linejoin | JoinStyle | The line join style |
border-linestyle-pixelsnapmode | boolean | Pixel Snap Mode, default( |
border-linestyle-scalable | boolean | True if width should depend on transformation |
border-linestyle-unit | string | Optional unit for the width |
border-linestyle-width | number | string | The line thickness |
border-linestyles | Styles | Object with line styles |
border-linestyles-bottom | string | Bottom border style |
border-linestyles-bottom | LineStyle | Bottom border style |
border-linestyles-left | string | Left border style |
border-linestyles-left | LineStyle | Left border style |
border-linestyles-right | string | Right border style |
border-linestyles-right | LineStyle | Right border style |
border-linestyles-top | string | Top border style |
border-linestyles-top | LineStyle | Top border style |
border-localtransform | Transformation | Local transformation |
border-localtransform-dx | number | X axis translation |
border-localtransform-dy | number | Y axis translation |
border-localtransform-xx | number | X scale |
border-localtransform-xy | number | Xy skew |
border-localtransform-yx | number | Yx skew |
border-localtransform-yy | number | Y scale |
border-margins | number | string | It has properties for specifying the margins for each side |
border-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
border-opacity | number | Node opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context |
border-opacityblendmode | BlendMode | Node opacity mode to blend it |
border-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
border-scalescrollstrategy-enabled | boolean | Enable flag |
border-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
border-tag | any | Custom 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 |
border-transform | string | Additional CSS transformation applied to node or 'none' |
border-transform | Transformation | Additional CSS transformation applied to node or 'none' |
border-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
border-z-index | number | Define node z-index |
borderstrategy | BorderStrategy | Strategy on how to display the border of the track |
bounds | Rect | Bounds of the visual |
clipping | boolean | Enable clipping, this does not consider the clipstyle, it is related to bounds-clipping |
clipstyle | ClipStyle | Clipping style |
clipstyle | GraphicsPath | Clipping style |
cssclass | string | The css class name of this node |
csscursor | string | CSS cursor associated with node |
cssstyle | string | CSS style to be applied to inserted elements |
fillstyle | string | Background color fill style (alias for backgroundcolor) |
fillstyle | FillStyle | Background color fill style (alias for backgroundcolor) |
highlight | Border | Highlight outline of the track |
highlightstrategy | TrackHighlightStrategy | Track highlight strategy |
id | string | number | Id of the node, its a unique identifier |
infinity | boolean | Mode to render outside the model limits |
limits | Rect | Model limits |
linestyle | string | Line style or options |
linestyle | LineStyle | Line style or options |
localtransform | Transformation | Local transformation |
logblock | LogBlock | Log block |
logblock-autobounds | boolean | Enables or disables auto bounds |
logblock-basename | string | The base name |
logblock-bounds | Rect | The rectangle specifying position of the visual in the track. If set, autobounds will be switched off |
logblock-clipstyle | ClipStyle | Clipping style |
logblock-clipstyle | GraphicsPath | Clipping style |
logblock-cssclass | string | The css class name of this node |
logblock-csscursor | string | CSS cursor associated with node |
logblock-cssstyle | string | CSS style to be applied to inserted elements |
logblock-description | string | The description |
logblock-fillstyle | string | The fill style |
logblock-fillstyle | FillStyle | The fill style |
logblock-id | string | number | Id of the node, its a unique identifier |
logblock-linestyle | string | Linestyle |
logblock-linestyle | LineStyle | Linestyle |
logblock-localtransform | Transformation | Local transformation |
logblock-margins | number | string | It has properties for specifying the margins for each side |
logblock-microposleft | number | Left micro position |
logblock-microposright | number | Right micro position |
logblock-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
logblock-opacity | number | Node opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context |
logblock-opacityblendmode | BlendMode | Node opacity mode to blend it |
logblock-position | Position | Position (left or right or both) |
logblock-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
logblock-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
logblock-tag | any | Custom 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 |
logblock-transform | string | Additional CSS transformation applied to node or 'none' |
logblock-transform | Transformation | Additional CSS transformation applied to node or 'none' |
logblock-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
logblock-z-index | number | Define node z-index |
margins | number | string | It has properties for specifying the margins for each side |
name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
opacity | number | Node opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context |
opacityblendmode | BlendMode | Node opacity mode to blend it |
scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
tag | any | Custom 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 |
transform | string | Additional CSS transformation applied to node or 'none' |
transform | Transformation | Additional CSS transformation applied to node or 'none' |
visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
z-index | number | Define node z-index |
Methods
▸ addBaseLayer(baseLayer): StackedTrack
Add baseLayer to container
this
▸ addChild(node): StackedTrack
Add a child node
this
▸ addCssClass(cssclass): StackedTrack
Adds new css class to node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ addInvalidateHandler(handler): StackedTrack
Add invalidate handler
Deprecated
since 4.0, use Node.on instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
▸ addOverlay(overlay): StackedTrack
Add overlay to container
this
▸ addTrack(track): LogTrack | LogTrack[]
Add a track
Throws
Will throw an error if the track is not specified
▸ adjustPosition(area?, vAlign?, hAlign?): StackedTrack
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
▸ Protected applyOpacity(context): StackedTrack
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
▸ asNode(): Node
Return track as Node instance
▸ Protected calculateDataLimits(fullLimits?): Range
Return meaning data limits
| Name | Type | Description |
|---|---|---|
Optional fullLimits | boolean | default value is false |
▸ changeBaseLayerOrder(overlay, order, anchor?): StackedTrack
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
▸ changeChildOrder(node, order, anchor?): StackedTrack
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
▸ changeOverlayOrder(overlay, order, anchor?): StackedTrack
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
▸ changeTrackOrder(track, order, anchor?): StackedTrack
changes the layout order of the tracks being rendered.
| Name | Type | Description |
|---|---|---|
track | LogTrack | child track in the LogTrackContainer |
order | NodeOrder | position to be added |
Optional anchor | LogTrack | anchor track to specify changeOrder with respect to this track |
this
▸ 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
▸ clearBaseLayers(disposeBaseLayers?): StackedTrack
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
▸ clearChildren(disposeChildren?): StackedTrack
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?): StackedTrack
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
▸ clearTracks(disposeTracks?): StackedTrack
Remove all tracks from this widget
| Name | Type | Description |
|---|---|---|
Optional disposeTracks | boolean | automatically dispose tracks. If it is true then method dispose is called for each track. |
this
▸ clone(): StackedTrack
All subclasses should override copyConstructor or provide custom implementation for this method
clone
▸ connectStyle(style, type, callback): StackedTrack
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
▸ Protected copyConstructor(src, deepCopy?): StackedTrack
Copy constructor function.
Function used as part of the cloning mechanism.
Implementations should copy the given instance state to this instance.
| Name | Type | Description |
|---|---|---|
src | StackedTrack | Source to copy from |
Optional deepCopy | boolean | deep copy |
this
▸ disconnectStyle(style, type, callback): StackedTrack
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
▸ dispose(): void
Dispose node. Clear all listeners and disconnect style to avoid memory leaks
void
▸ enableClipping(doClip): StackedTrack
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
▸ enableEventPropagation(enable): StackedTrack
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
LogTrack.enableEventPropagation
▸ 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
▸ execute(delegate): StackedTrack
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: StackedTrack) => void | Function to execute |
The result if any or this
▸ execute<T>(delegate): T
| Name |
|---|
T |
| Name | Type |
|---|---|
delegate | (this: StackedTrack) => T |
T
▸ Protected fillHighlight(context, callback?): StackedTrack
Render highlight background
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
Optional callback | () => void | callback to be called after fill highlight |
this
▸ Protected filter(context): boolean
Filter node
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
flag filter flag ("true" to render node; "false" otherwise)
▸ getAnimationStyle(): AnimationStyle
Return animation style
animationStyle current animation style
▸ 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
▸ getBlock(): LogBlock
Return log block
▸ getBorder(): Border
return border visual
border
▸ getBorders(): Visible
Return an object where it is possible to specify the visibility of each border
▸ getBounds(): Rect
Gets bounds in the parent coordinates
▸ 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
▸ getClassName(): string
string
▸ getClipStyle(): ClipStyle
Gets the current clipping style
clipping style
▸ getContentsArea(transformation?): Rect
Return area of content. By default it is equal to bounds.
| Name | Type | Description |
|---|---|---|
Optional transformation | Transformation | scene transformation |
▸ getContentsTransform(): Transformation
Transformation of inner contents to content area
▸ 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
▸ getDataLimits(fullLimits?): Range
Return data limits
| Name | Type | Description |
|---|---|---|
Optional fullLimits | boolean | default value is false, true if you want to get full limits including trail NaN values |
▸ getDepthLimits(): Range
Returns depth range
▸ getDeviceLimits(): Rect
Return device limits
▸ getFillStyle(): FillStyle
Return background color
▸ getFooter(): LogTrackHeader
Returns the track footer if it exists
▸ getHeader(): LogTrackHeader
Returns the track header if it exists
▸ getId(): string | number
Returns the associated identifier of the node
string | number
The node's id
▸ getInfiniteMode(): boolean
Return infinity mode flag
boolean
flag
▸ Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>
Gets invalidate method
AttributeCallback<EventDispatcher>
method to invalidate this object
▸ getLayout(): Layout
Returns layout associated with the group
layout
▸ getLayoutStyle(): LayoutStyle<string | number>
Return desired layout style
LayoutStyle<string | number>
▸ getLineStyle(): LineStyle
Return border style
▸ getLocalTransform(): Transformation
Retrieves the transformation of bounds to parent
transform the local transform.
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
▸ getModelLimits(): Rect
Returns model limits
▸ 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
▸ 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
▸ 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
▸ getParent(): Node
Return parent node
parent node
▸ getProperties(): OptionsOut
Gets all the properties pertaining to this object
An object containing the properties to set
▸ getProperties(context): DeserializationOptionsOut
| Name | Type |
|---|---|
context | ISerializationContext |
▸ 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[]
▸ getRenderingFilter(): IFilter
Return filter to be used for rendering and picking
current filter
▸ getResponsiveStyle(): ResponsiveStyle
Return responsive style
▸ getRoot(): Node
Returns root node.
If node doesn't have parent then it returns itself.
the root node
▸ getScaleScrollStrategy(): Delegate
Gets scale scroll strategy
scale scroll strategy
LogTrack.getScaleScrollStrategy
▸ getSceneTransform(): Transformation
Returns transformation from node to root scene
a transformation from node to root scene
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getTrack(index): LogTrack
Returns LogTrack at specified index
| Name | Type | Description |
|---|---|---|
index | number | index to return track at |
▸ getTrackAt(index): LogTrack
Returns LogTrack at specified index
Deprecated
since 4.2 use getTrack instead
| Name | Type | Description |
|---|---|---|
index | number | index to return track at |
▸ getTrackContainer(): TrackContainer
Return parent track container or null
▸ getTrackIndex(track): number
Return index of track
Deprecated
since 4.2 use indexOfTrack instead
| Name | Type | Description |
|---|---|---|
track | LogTrack | to get index |
number
index of the track
▸ getTracks(filter?, modify?): Iterator<LogTrack>
Return iterator by child tracks
| Name | Type | Description |
|---|---|---|
Optional filter | (node: LogTrack) => boolean | a filter function. Returns all tracks if null |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
▸ getTracksCount(): number
Returns amount of tracks
number
amount of tracks
▸ getUnitInfo(): IUnitInfo
Returns an object that has getDeviceUnit and getScaleUnit functions
▸ getVisible(): boolean
Return visibility of the node
boolean
true if node is visible
▸ getVisibleDepthLimits(): Range
Returns visible depth range
LogTrack.getVisibleDepthLimits
▸ getVisibleDeviceLimits(ignoreModelLimits?): Rect
Return visible device limits
| Name | Type | Description |
|---|---|---|
Optional ignoreModelLimits | boolean | flag defines whether to ignore ModelLimits or not |
LogTrack.getVisibleDeviceLimits
▸ getVisibleModelLimits(ignoreModelLimits?): Rect
Return visible model limits
| Name | Type | Description |
|---|---|---|
Optional ignoreModelLimits | boolean | flag defines whether to ignore ModelLimits or not |
LogTrack.getVisibleModelLimits
▸ getWidth(): number
Returns track width
number
▸ getWorldTransform(): Transformation
Retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.
▸ 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
▸ 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
▸ 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
▸ indexOfTrack(track): number
Return index of track
| Name | Type | Description |
|---|---|---|
track | LogTrack | to get index |
number
index of the track
▸ insertBaseLayer(index, baseLayer): StackedTrack
Insert child baseLayer at specified index
| Name | Type | Description |
|---|---|---|
index | number | specified index |
baseLayer | Node | a baseLayer to add |
this
▸ insertChild(index, node): StackedTrack
Insert child node at specified index
| Name | Type | Description |
|---|---|---|
index | number | specified index |
node | Node | a child node to add |
this
▸ insertOverlay(index, overlay): StackedTrack
Insert child overlay at specified index
| Name | Type | Description |
|---|---|---|
index | number | specified index |
overlay | Node | a overlay to add |
this
▸ insertTrack(index, track, trackWidth?): LogTrack
Insert track to the container at specified index
Throws
Will throw an error if the track is not specified
Example
widget.insertTrack(0, track);| Name | Type | Description |
|---|---|---|
index | number | LogTrack | index of the track |
track | number | LogTrack | track to insert |
Optional trackWidth | number | optional track width |
▸ invalidate(bounds?, force?): StackedTrack
Invalidate area of the shape. This method invalidates parent by default. invalidated from parent to root node.
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | bounds of the invalid rectangle in the inner node coordinates |
Optional force | boolean | true if parent should be invalidated immediately if null is provided then cache (if any will be completely refreshed) otherwise only specified rect or node.bounds will be refreshed |
this
▸ invalidateLayout(propagate?): StackedTrack
Invalidate layout
| Name | Type | Description |
|---|---|---|
Optional propagate | boolean | propagate |
this
▸ invalidateParent(bounds?, force?): StackedTrack
Invalidate bounds
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | if null is provided then cache (if any will be completely refreshed) otherwise only specified rect or node.bounds will be refreshed |
Optional force | boolean | force invalidation |
this
▸ isClippingEnabled(): boolean
Returns if clipping is enabled or not for this node.
boolean
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isEventPropagationEnabled(): boolean
Return true if event propagation is enabled from child to parent
boolean
LogTrack.isEventPropagationEnabled
▸ isHorizontalFlip(): boolean
Return true if the representation is flipped horizontally
boolean
horizontal flip
▸ isLayoutInvalidated(): boolean
Return true if layout is invalid
boolean
▸ isNotificationEnabled(): boolean
return state of notification
boolean
current notification state
LogTrack.isNotificationEnabled
▸ 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
▸ moveTo(area, vAlign?, hAlign?): StackedTrack
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>(event, source, args?): StackedTrack
Notify listeners of the Node
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
event | E | type of event |
source | CompositeNode<Node> | 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?): StackedTrack
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: StackedTrack, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): StackedTrack
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: StackedTrack, args: EventMap[E]) => void | to be called |
this
▸ 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
▸ Protected onParentChanged(node): StackedTrack
This method is called when parent changes. Do not call it directly.
| Name | Type | Description |
|---|---|---|
node | Node | node to change parent |
this
▸ Protected onVisibilityChanged(): void
This method is called if visibility is changed. Send event Events.VisibilityChanged
void
▸ 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
▸ registerAnimationStyle(root): void
Register animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
LogTrack.registerAnimationStyle
▸ removeBaseLayer(baseLayer): StackedTrack
Remove child baseLayer
this
▸ removeChild(node, disposeChildren?): StackedTrack
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): StackedTrack
Removes css class from node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ removeInvalidateHandler(handler): StackedTrack
Remove invalidate handler
Deprecated
since 4.0, use Node.off instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
LogTrack.removeInvalidateHandler
▸ removeOverlay(overlay): StackedTrack
Remove child overlay
this
▸ removeTrack(track): StackedTrack
Remove the track
Throws
Will throw an error if the track is not specified
| Name | Type | Description |
|---|---|---|
track | LogTrack | track to remove |
this
▸ render(context): void
Render composite node and children
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ renderAsync(context, callback): void
Render node in asynchronous mode
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
callback | () => void | callback function |
void
▸ Protected renderBaseLayers(context): StackedTrack
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
▸ 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
LogTrack.renderBaseLayersAsync
▸ Protected renderChildren(context): void
Render children
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ 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
▸ 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
▸ Protected renderHighlight(context, callback?): StackedTrack
Render highlight shape
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
Optional callback | () => void | callback to be called after highlight renders |
this
▸ Protected renderOverlays(context): StackedTrack
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
▸ 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
▸ rotate(theta, x, y): StackedTrack
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
▸ scale(xx, yy): StackedTrack
Scale node
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
this
▸ setAnimationStyle(animationStyle): StackedTrack
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
▸ setBorders(borders): StackedTrack
set borders state
| Name | Type | Description |
|---|---|---|
borders | Visible | borders |
▸ setBounds(bounds): StackedTrack
Sets bounds of the node in the parent coordinates
| Name | Type | Description |
|---|---|---|
bounds | Rect | bound of the node in the parent coordinates |
this
▸ setChild(index, node): StackedTrack
Replace child node by index
| Name | Type | Description |
|---|---|---|
index | number | index of the node |
node | Node | node |
this
▸ setClipStyle(style): StackedTrack
Sets a new clipping style
| Name | Type | Description |
|---|---|---|
style | GraphicsPath | ClipStyle | Options | a new clipping style |
this
▸ setCss(style, merge?): StackedTrack
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): StackedTrack
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): StackedTrack
Set CSS transformation
| Name | Type | Description |
|---|---|---|
transform | string | Transformation | transformation css transformation instruction or Transformation instance |
this
▸ setDepthLimits(range): StackedTrack
Sets model depth range
| Name | Type | Description |
|---|---|---|
range | Range | a new depth range |
this
▸ setDepthLimits(minDepth, maxDepth): StackedTrack
Sets model minimum and maximum depth
| Name | Type | Description |
|---|---|---|
minDepth | number | minimum depth |
maxDepth | number | maximum depth |
this
▸ setFillStyle(fillStyle, merge?): StackedTrack
Sets background fill style Returns this track
| 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 |
▸ setHorizontalFlip(enable): StackedTrack
Set horizontal flip of the representation
| Name | Type | Description |
|---|---|---|
enable | boolean | enable flip |
this
▸ setId(id): StackedTrack
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setInfiniteMode(infinityMode): StackedTrack
Set infinity mode flag to draw composite without collision check
| Name | Type | Description |
|---|---|---|
infinityMode | boolean | infinity mode flag |
this
▸ setLayout(layout): StackedTrack
Associate layout with a track to layout children tracks
| Name | Type | Description |
|---|---|---|
layout | Layout | layout to be set |
this
▸ Protected setLayoutInvalidated(invalidated): void
Set invalidation status
| Name | Type | Description |
|---|---|---|
invalidated | boolean | invalidated layout |
void
▸ setLayoutStyle(layoutStyle, merge?): StackedTrack
Specify desired layout style
| Name | Type | Description |
|---|---|---|
layoutStyle | LayoutStyle<string | number> | Options<string | number> | desired layout style |
Optional merge | boolean | true if you want to merge layoutStyle with existing attribute, false by default |
▸ setLineStyle(lineStyle, merge?): StackedTrack
Sets border color Returns this track
| 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?): StackedTrack
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
▸ setMarginsStyle(margins, merge?): StackedTrack
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
▸ setName(name): StackedTrack
Sets name of the node
| Name | Type | Description |
|---|---|---|
name | string | The node name |
this
▸ setNotification(notify, force?): StackedTrack
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
▸ setOpacity(opacity, blendMode?): StackedTrack
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
▸ setProperties(properties?): StackedTrack
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional properties | Options | An object containing the properties to set |
this
▸ setProperty(name, value): StackedTrack
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
▸ setRenderingFilter(filter): StackedTrack
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
▸ setResponsiveStyle(style): StackedTrack
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
▸ setScaleScrollStrategy(strategy?): StackedTrack
Sets scale scroll strategy
| Name | Type | Description |
|---|---|---|
Optional strategy | Delegate | scale scroll strategy |
this
LogTrack.setScaleScrollStrategy
▸ setSelectable(selectable): StackedTrack
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
▸ setSilent(bool): StackedTrack
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setTag(tag): StackedTrack
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
▸ setUnitInfo(unitInfo): StackedTrack
Sets the track's unit info object, which holds getDeviceUnit and getScaleUnit functions
| Name | Type | Description |
|---|---|---|
unitInfo | IUnitInfo | track's unit info - device unit and the scaled unit |
this
▸ setVisible(value): StackedTrack
Sets visibility of the node. Send event Events.VisibilityChanged
| Name | Type | Description |
|---|---|---|
value | boolean | flag specifying visibility of the node |
this
▸ setVisibleModelLimits(visibleModelBounds, deviceBounds?): StackedTrack
Set visible model limits
| Name | Type | Description |
|---|---|---|
visibleModelBounds | Rect | visible model limits or bounds |
Optional deviceBounds | Rect | device bounds |
this
LogTrack.setVisibleModelLimits
▸ setWidth(width): StackedTrack
Set track width and layout remains tracks
| Name | Type | Description |
|---|---|---|
width | number | a new track width |
this
▸ setZIndex(value): StackedTrack
Sets z-index for node (set null for default)
| Name | Type | Description |
|---|---|---|
value | number | index determining node z-position |
this
▸ shear(shx, shy): StackedTrack
Shear this node's bounds
| Name | Type | Description |
|---|---|---|
shx | number | x-axis shear |
shy | number | y-axis shear |
this
▸ Protected strokeHighlight(context, callback?): StackedTrack
Render highlight border
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
Optional callback | () => void | callback to be called after stroke highlight |
this
▸ toString(): string
Returns a string representation of this object (generally the classname)
string
A string representation
▸ translate(tx, ty): StackedTrack
Translate bounds
| Name | Type | Description |
|---|---|---|
tx | number | x translation |
ty | number | y translation |
this
▸ unregisterAnimationStyle(root): void
Unregister animation style.
| Name | Type | Description |
|---|---|---|
root | AnimatedNode | root node for node |
void
LogTrack.unregisterAnimationStyle
▸ updateContentsTransform(): void
void
LogTrack.updateContentsTransform
▸ updateSceneTransformation(): StackedTrack
Update scene transformation
this
LogTrack.updateSceneTransformation
▸ updateState(regions?, changes?): StackedTrack
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
▸ Protected updateTimeStamp(): StackedTrack
Update time stamp to indicate that Node or Children has been changed.
this
▸ Static createLogOverlay(name, type?): Layer<Node>
Create a new layer, which always has coordinates from 0 to 1 in horizontal direction by default
| Name | Type | Description |
|---|---|---|
name | string | name of the layer |
Optional type | LayerType | layer type |
overlay
▸ Static enableSceneGraphNotification(enabled): void
Enable / disable all notifications
| Name | Type | Description |
|---|---|---|
enabled | boolean | sets if this object sends notifications |
void
LogTrack.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