API / geotoolkit / welllog / LogAnnotation / LogAnnotation
welllog.LogAnnotation.LogAnnotation
Defines annotation visual. It is defined by a string and a rectangle to set its bounds.
Example
// How to create annotation
// Use setFixedHeight to false to locate
// annotation precisely by provided bounds
import {LogAnnotation} from '@int/geotoolkit/welllog/LogAnnotation';
import {AnchorType} from '@int/geotoolkit/util/AnchorType';
import {Rect} from '@int/geotoolkit/util/Rect';
...
const annotation = new LogAnnotation({
'bounds': new Rect(0, 100, 1, 200),
'text': 'Text1',
'textstyle': '#7cb342',
'fillstyle': '#fdd835',
'textposition': AnchorType.Center,
'padding': '1mm'
}).setFixedHeight(false)↳
LogAnnotation
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
autobounds | boolean | Enables or disables auto bounds |
autoheight | boolean | Auto height flag |
basename | string | The base name |
bounds | Rect | The rectangle specifying position of the visual in the track. If set, autobounds will be switched off |
bounds-height | number | Height |
bounds-readonly | boolean | Readonly |
bounds-width | number | Width |
bounds-x | number | Left |
bounds-y | number | Top |
clipstyle | ClipStyle | Clipping style |
clipstyle-evenodd | boolean | True if evenodd mode is on ('nonzero' mode otherwise) |
clipstyle-geometry | GraphicsPath | Clipping geometry |
clipstyle-geometry-bounds | Rect | Bounds |
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 |
description | string | The description |
fillstyle | string | FillStyle |
fillstyle | FillStyle | FillStyle |
fillstyle-color | string | Color in CSS form |
fillstyle-evenoddmode | boolean | Even-odd fill mode |
fillstyle-fillpattern | Pattern | Pattern |
fillstyle-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 |
fillstyle-fillpattern-patternname | string | Name of this pattern for indexing |
fillstyle-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
fillstyle-foreground | string | Foreground color |
fillstyle-pattern | Pattern | Pattern |
fillstyle | string | FillStyle |
fillstyle | FillStyle | FillStyle |
fixedheight | boolean | Enables height of the frame to be fixed in the device coordinates |
fixedheight | boolean | Enables height of the frame to be fixed in the device coordinates |
id | string | number | Id of the node, its a unique identifier |
linestyle | string | Linestyle |
linestyle | LineStyle | Linestyle |
linestyle-color | string | Color in CSS form |
linestyle-fill | string | Optional fill style to be used to fill lines generated with this style |
linestyle-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
linestyle-linecap | CapStyle | The line cap style |
linestyle-linedashoffset | number | Line dash offset of dashed line |
linestyle-linejoin | JoinStyle | The line join style |
linestyle-pixelsnapmode | boolean | Pixel Snap Mode, default( |
linestyle-scalable | boolean | True if width should depend on transformation |
linestyle-unit | string | Optional unit for the width |
linestyle-width | number | string | The line thickness |
localtransform | Transformation | Local transformation |
localtransform-dx | number | X axis translation |
localtransform-dy | number | Y axis translation |
localtransform-xx | number | X scale |
localtransform-xy | number | Xy skew |
localtransform-yx | number | Yx skew |
localtransform-yy | number | Y scale |
margins | number | string | It has properties for specifying the margins for each side |
microposleft | number | Left micro position |
microposright | number | Right micro position |
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 |
padding | number | string | It has properties for specifying the padding for each side |
scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
scalescrollstrategy-enabled | boolean | Enable flag |
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 |
text | string | Text to be displayed |
textalignment | TextAlignment | Text alignment |
textautorotation | boolean | Text auto rotation |
textellipsis | boolean | Text ellipsis |
textorientation | TextOrientation | Text orientation |
textposition | AnchorType | Text anchor type specified position of the text inside the bounds and it can be placed in any one of 9 places. These values include LeftTop, TopCenter, RightTop, LeftCenter, Center,RightCenter, LeftBottom, BottomCenter, RightBottom |
textsizemode | SizeMode | Enum of size modes |
textstyle | string | The style of the text |
textstyle | TextStyle | The style of the text |
textstyle-alignment | AlignmentStyle | Alignment |
textstyle-autosize | boolean | Auto font size on high definition display |
textstyle-background | string | Background style |
textstyle-background | FillStyle | Background style |
textstyle-baseline | BaseLineStyle | Base line |
textstyle-color | string | Color in CSS form |
textstyle-fill | FillStyle | Text fill style |
textstyle-font | string | Font see |
textstyle-fonturl | string | The place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword |
textstyle-lineheight | string | number | Line height |
textstyle-multiline | boolean | Allow multi-line text |
textstyle-outline | string | Outline style |
textstyle-outline | LineStyle | Outline style |
textstyle-overflowwrap | OverflowWrapStyle | Overflow wrap |
textstyle-strikethrough | string | Strikethrough style |
textstyle-strikethrough | LineStyle | Strikethrough style |
textstyle-textoverflow | TextOverflowStyle | Text overflow |
textstyle-underline | string | Underline style |
textstyle-underline | LineStyle | Underline style |
textstyle-underlineoffset | string | number | Underline offset distance |
textstyle-whitespace | WhiteSpaceStyle | White space |
textstyle-wordbreak | WordBreakStyle | Word break |
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 |
Constructors
• new LogAnnotation(options?, text?)
| Name | Type | Description |
|---|---|---|
Optional options | Rect | Options | bounds of the visual or properties object |
Optional text | string | the text to be displayed |
LogFrameVisual.constructor
Methods
▸ addCssClass(cssclass): LogAnnotation
Adds new css class to node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ addInvalidateHandler(handler): LogAnnotation
Add invalidate handler
Deprecated
since 4.0, use Node.on instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
LogFrameVisual.addInvalidateHandler
▸ Protected applyOpacity(context): LogAnnotation
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
LogFrameVisual.applyResponsiveStyle
▸ checkCollision(context): boolean
Checks culling Returns true if object is inside of renderable area
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
▸ clone(): LogAnnotation
All subclasses should override copyConstructor or provide custom implementation for this method
clone
▸ connectStyle(style, type, callback): LogAnnotation
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?): LogAnnotation
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 | LogAnnotation | Source to copy from |
Optional deepCopy | boolean | deep copy |
this
LogFrameVisual.copyConstructor
▸ disconnectStyle(style, type, callback): LogAnnotation
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
LogFrameVisual.disconnectStyle
▸ dispose(): void
Disposes this node, once disposes a node should not be used anymore.
Clear all listeners, and disconnect styles to avoid memory leaks.
Also aggressively 'cleanup' this node by setting some of its members to null.
void
▸ enableEventPropagation(enable): LogAnnotation
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
LogFrameVisual.enableEventPropagation
▸ execute(delegate): LogAnnotation
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: LogAnnotation) => void | Function to execute |
The result if any or this
▸ execute<T>(delegate): T
| Name |
|---|
T |
| Name | Type |
|---|---|
delegate | (this: LogAnnotation) => T |
T
▸ 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
LogFrameVisual.getAnimationStyle
▸ getAutoHeight(): boolean
Returns auto height flag
boolean
▸ getBaseName(): string
Returns the base name
string
The base name
▸ getBounds(context?): Rect
Returns calculated bounds
| Name | Type | Description |
|---|---|---|
Optional context | RenderingContext | Rendering Context |
▸ getClassName(): string
string
▸ getClipStyle(): ClipStyle
Gets the current clipping style
clipping style
▸ getContentsTransform(): Transformation
Retrieves the world transformation of the spatial
LogFrameVisual.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
LogFrameVisual.getCssTransform
▸ getDataLimits(fullLimits?): Rect
Return meaning data limits
| Name | Type | Description |
|---|---|---|
Optional fullLimits | boolean | default value is false |
▸ getDescription(): string
Gets the description
string
The description
▸ getFillStyle(): FillStyle
Return fill style
▸ getHeader(name): LogVisualHeader<Node>
Return the header registered by the name
| Name | Type | Description |
|---|---|---|
name | string | header name |
header
▸ getHeaders(): Record<string, LogVisualHeader<Node>>
Return an object that contains all headers registered with the visual
Record<string, LogVisualHeader<Node>>
headers
▸ getId(): string | number
Returns the associated identifier of the node
string | number
The node's id
▸ Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>
Gets invalidate method
AttributeCallback<EventDispatcher>
method to invalidate this object
LogFrameVisual.getInvalidateMethod
▸ getLineStyle(): LineStyle
Returns line style
▸ getLocalTransform(): Transformation
Retrieves the transformation of bounds to parent
transform the local transform.
LogFrameVisual.getLocalTransform
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
LogFrameVisual.getMarginsStyle
▸ getMicroPositionLeft(): number
Returns micro position left
number
LogFrameVisual.getMicroPositionLeft
▸ getMicroPositionRight(): number
Returns micro position right
number
LogFrameVisual.getMicroPositionRight
▸ Protected getMicroPositionTransformation(): Transformation
Returns micro position transformation
micro position transformation
LogFrameVisual.getMicroPositionTransformation
▸ getModelLimits(): Rect
Returns parent 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
LogFrameVisual.getOpacityBlendMode
▸ getPaddingStyle(): SpaceStyle<string | number>
Returns padding style
SpaceStyle<string | number>
padding
▸ getParent(): Node
Return parent node
parent node
▸ getProperties(): OptionsOut
Gets all the properties pertaining to this object
An object containing the properties to set
▸ 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[]
LogFrameVisual.getPropertyKeys
▸ getRect(): Rect
Return rectangle geometry
▸ getRenderingFilter(): IFilter
Return filter to be used for rendering and picking
current filter
LogFrameVisual.getRenderingFilter
▸ getResponsiveStyle(): ResponsiveStyle
Return responsive style
LogFrameVisual.getResponsiveStyle
▸ 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
LogFrameVisual.getScaleScrollStrategy
▸ getSceneTransform(): Transformation
Returns transformation from node to root scene
a transformation from node to root scene
LogFrameVisual.getSceneTransform
▸ getShowEllipsis(): boolean
Returns ellipsis flag
boolean
ellipsis flag
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getText(): string
Returns the current text
string
▸ getTextAlignment(): TextAlignment
Return text alignment
▸ getTextAutoRotation(): boolean
Return text autorotation
boolean
▸ getTextOrientation(): TextOrientation
Return text orientation
▸ getTextPosition(): AnchorType
Returns text position inside the bounds
text anchor type
▸ getTextSizeMode(): SizeMode
Returns how the size is computed
returns textSizeMode
▸ getTextStyle(): TextStyle
Returns text style
▸ getTrack(): ITrack
Returns parent track if LogTrack
▸ getVisible(): boolean
Return visibility of the node
boolean
true if node is visible
▸ getWorldTransform(): Transformation
Retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.
LogFrameVisual.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
LogFrameVisual.hasEventListener
▸ invalidate(bounds?, force?): LogAnnotation
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
▸ invalidateParent(bounds?, force?): LogAnnotation
Invalidate bounds
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | model bounds |
Optional force | boolean | force if null is provided then cache (if any will be completely refreshed) otherwise only specified rect or node.bounds will be refreshed |
this
LogFrameVisual.invalidateParent
▸ isAutoBounds(): boolean
Returns auto bounds value
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
LogFrameVisual.isEventPropagationEnabled
▸ isFixedHeight(): boolean
Returns true if height is fixed in the device coordinates
boolean
▸ isHorizontalFlip(): boolean
Return true if the representation is flipped horizontally
boolean
horizontal flip
LogFrameVisual.isHorizontalFlip
▸ isNotificationEnabled(): boolean
return state of notification
boolean
current notification state
LogFrameVisual.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
▸ notify<E>(type, source, args?): LogAnnotation
Notify listeners of the Node
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event |
source | LogAbstractVisual | source who called the event |
Optional args | EventMap[E] | event arguments |
this
▸ off<E>(type?, callback?): LogAnnotation
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: LogAnnotation, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): LogAnnotation
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: LogAnnotation, args: EventMap[E]) => void | to be called |
this
▸ Protected onHeaderSet(name, headerInstance, silent?): void
This method is called if header is set. Send event Events.HeaderSet
| Name | Type | Description |
|---|---|---|
name | string | of the container. The 'header' and 'footer' is used. |
headerInstance | LogVisualHeader<Node> | the header instance |
Optional silent | boolean | silent node to avoid sending events that header is created |
void
▸ Protected onMicroPositionChanged(): LogAnnotation
calls when microPosition has been changed
this
LogFrameVisual.onMicroPositionChanged
▸ Protected onParentChanged(node): LogAnnotation
This method is called when parent changes. Do not call it directly.
| Name | Type | Description |
|---|---|---|
node | Node | node to change parent |
this
LogFrameVisual.onParentChanged
▸ Protected onVisibilityChanged(): void
This method is called if visibility is changed. Send event Events.VisibilityChanged
void
LogFrameVisual.onVisibilityChanged
▸ Protected postRendering(context): void
To be called after rendering. Call this method if you override method render
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ Protected preRendering(context): void
Occurs before rendering this method sets clipping by default. Call this method if you override method render
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ registerAnimationStyle(root): void
Register animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
LogFrameVisual.registerAnimationStyle
▸ removeCssClass(cssclass): LogAnnotation
Removes css class from node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ removeInvalidateHandler(handler): LogAnnotation
Remove invalidate handler
Deprecated
since 4.0, use Node.off instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
LogFrameVisual.removeInvalidateHandler
▸ render(context): void
Renders node
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
void
▸ renderAsync(context, callback): void
Render node in asynchronous mode. Default implementation creates call method "render" inside
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
callback | () => void | callback function |
void
▸ Protected renderContent(context): void
Renders node content
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
void
▸ rotate(theta, x, y): LogAnnotation
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): LogAnnotation
Scale node
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
this
▸ setAnimationStyle(animationStyle): LogAnnotation
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
LogFrameVisual.setAnimationStyle
▸ setAutoBounds(enable): LogAnnotation
Enables or disables auto bounds. If auto bounds is enabled then it equals to parent model limits
| Name | Type | Description |
|---|---|---|
enable | boolean | Enables or disables auto bounds |
this
▸ setAutoHeight(enable): LogAnnotation
Set auto height flag
| Name | Type | Description |
|---|---|---|
enable | boolean | flag |
this
▸ setBaseName(name): LogAnnotation
Sets base name of the visual
| Name | Type | Description |
|---|---|---|
name | string | The base name |
this
▸ setBounds(bounds): LogAnnotation
Sets bounds of the visual in the parent coordinates and sets up auto bounds to false
| Name | Type | Description |
|---|---|---|
bounds | Rect | the rectangle specifying position of the visual in the track. |
this
▸ setClipStyle(style): LogAnnotation
Sets a new clipping style
| Name | Type | Description |
|---|---|---|
style | GraphicsPath | ClipStyle | Options | a new clipping style |
this
▸ setCss(style, merge?): LogAnnotation
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): LogAnnotation
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): LogAnnotation
Set CSS transformation
| Name | Type | Description |
|---|---|---|
transform | string | Transformation | transformation css transformation instruction or Transformation instance |
this
LogFrameVisual.setCssTransform
▸ setDescription(description): LogAnnotation
Sets the description
| Name | Type | Description |
|---|---|---|
description | string | The visual description |
this
▸ setFillStyle(fillStyle, merge?): LogAnnotation
Sets fill style
| Name | Type | Description |
|---|---|---|
fillStyle | Type | a new fill style |
Optional merge | boolean | true if you want to merge lineStyle with existing attribute, false by default |
this
▸ setFixedHeight(enable): LogAnnotation
Enables height of the frame to be fixed in the device coordinates
| Name | Type | Description |
|---|---|---|
enable | boolean | Enables height of the frame to be fixed in the device coordinates |
this
▸ setHeader(name, headerInstance, silent?): LogAnnotation
Sets header instance with specified name. This name usually defines header or footer.
Throws
if header name is null
| Name | Type | Description |
|---|---|---|
name | string | of the container. The 'header' and 'footer' is used. |
headerInstance | LogVisualHeader<Node> | the header instance |
Optional silent | boolean | silent node to avoid sending events that header is created |
this
▸ setId(id): LogAnnotation
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setLineStyle(lineStyle, merge?): LogAnnotation
Sets line style
| Name | Type | Description |
|---|---|---|
lineStyle | Type | The style in which the line is displayed object can be in format of constructor of LineStyle |
Optional merge | boolean | true if you want to merge lineStyle with existing attribute, false by default |
this
▸ setLocalTransform(localTransform, force?): LogAnnotation
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
LogFrameVisual.setLocalTransform
▸ setMarginsStyle(margins, merge?): LogAnnotation
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
LogFrameVisual.setMarginsStyle
▸ setMicroPosition(left, right): LogAnnotation
Sets micro position (0 - 1). It allows application code to display the visual in a subarea of the track.
By default log visuals uses all space of the trace in the horizontal direction, but micro position allows to place log visual in the specified position of the track in horizontal direction. See example below
Example
// The following code places curve 20% from left and 20% from right.
curve.setMicroPosition(0.2,0.8);| Name | Type | Description |
|---|---|---|
left | number | left position |
right | number | right position |
this
LogFrameVisual.setMicroPosition
▸ setName(name): LogAnnotation
Sets name of the node
| Name | Type | Description |
|---|---|---|
name | string | The node name |
this
▸ setNotification(notify, force?): LogAnnotation
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
LogFrameVisual.setNotification
▸ setOpacity(opacity, blendMode?): LogAnnotation
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
▸ setPaddingStyle(paddingStyle, merge?): LogAnnotation
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
▸ setProperties(properties?): LogAnnotation
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): LogAnnotation
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
▸ setRect(rect): LogAnnotation
Sets rectangle geometry
| Name | Type | Description |
|---|---|---|
rect | Rect | Sets rectangle geometry based on bounds of the visual |
this
▸ setRenderingFilter(filter): LogAnnotation
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
LogFrameVisual.setRenderingFilter
▸ setResponsiveStyle(style): LogAnnotation
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
LogFrameVisual.setResponsiveStyle
▸ setScaleScrollStrategy(strategy?): LogAnnotation
Sets scale scroll strategy
| Name | Type | Description |
|---|---|---|
Optional strategy | Delegate | scale scroll strategy |
this
LogFrameVisual.setScaleScrollStrategy
▸ setSelectable(selectable): LogAnnotation
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
▸ setShowEllipsis(showTextEllipsis): LogAnnotation
Set show ellipsis
| Name | Type | Description |
|---|---|---|
showTextEllipsis | boolean | if flag equal true then show ellipsis text |
this
▸ setSilent(bool): LogAnnotation
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setTag(tag): LogAnnotation
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
▸ setText(text): LogAnnotation
Sets text
| Name | Type | Description |
|---|---|---|
text | string | text to be displayed |
▸ setTextAlignment(alignment): LogAnnotation
Sets text alignment.
| Name | Type | Description |
|---|---|---|
alignment | TextAlignment | text alignment |
▸ setTextAutoRotation(autoRotation): LogAnnotation
Sets text autorotation.
| Name | Type |
|---|---|
autoRotation | boolean |
▸ setTextOrientation(orientation): LogAnnotation
Sets text orientation. if text orientation is regular then text follows the widgets orientation if text is rotated then text is always rotated on 90 degree.
| Name | Type | Description |
|---|---|---|
orientation | TextOrientation | text orientation |
▸ setTextPosition(anchorType): LogAnnotation
Specifies text position inside the bounds
| Name | Type | Description |
|---|---|---|
anchorType | AnchorType | text anchor type specified position of the text inside the bounds and it can be placed in any one of 9 places. These values include LeftTop, TopCenter, RightTop, LeftCenter, Center,RightCenter, LeftBottom, BottomCenter, RightBottom |
this
▸ setTextSizeMode(textSizeMode): LogAnnotation
Sets how text size is computed
| Name | Type | Description |
|---|---|---|
textSizeMode | SizeMode | Enum of size modes |
this
▸ setTextStyle(textStyle, merge?): LogAnnotation
Sets text style
| Name | Type | Description |
|---|---|---|
textStyle | Type | a new shape text style |
Optional merge | boolean | true if you want to merge textStyle with existing attribute, false by default |
▸ setVisible(value): LogAnnotation
Sets visibility of the node. Send event Events.VisibilityChanged
| Name | Type | Description |
|---|---|---|
value | boolean | flag specifying visibility of the node |
this
▸ setZIndex(value): LogAnnotation
Sets z-index for node (set null for default)
| Name | Type | Description |
|---|---|---|
value | number | index determining node z-position |
this
▸ shear(shx, shy): LogAnnotation
Shear this node's bounds
| Name | Type | Description |
|---|---|---|
shx | number | x-axis shear |
shy | number | y-axis shear |
this
▸ toString(): string
Returns a string representation of this object (generally the classname)
string
A string representation
▸ translate(tx, ty): LogAnnotation
Translate bounds
| Name | Type | Description |
|---|---|---|
tx | number | x translation |
ty | number | y translation |
this
▸ unregisterAnimationStyle(root): void
Unregister animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
LogFrameVisual.unregisterAnimationStyle
▸ updateSceneTransformation(): LogAnnotation
Update scene transformation
this
LogFrameVisual.updateSceneTransformation
▸ updateState(regions?, changes?): LogAnnotation
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(): LogAnnotation
Update time stamp to indicate that Node or Children has been changed.
this
LogFrameVisual.updateTimeStamp
▸ Static enableSceneGraphNotification(enabled): void
Enable / disable all notifications
| Name | Type | Description |
|---|---|---|
enabled | boolean | sets if this object sends notifications |
void
LogFrameVisual.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