Home Reference Source
import NodeStyles from 'potassium-es/src/style/NodeStyles.js'
public class | source

NodeStyles

NodeStyles is assigned to the styles attribute of each SOM node (which are THREE.Object3Ds).

It holds the KSS style information in `matchingRules, AssignedStyles, LocalStyles, and ComputedStyles.

It holds the Layout for the node.

It holds the bounding box information for the node.

It holds the layout-related flags for the node.

The calculation of the KSS cascade, layout, and bounds are controlled in Stylist and Stylesheet.

Constructor Summary

Public Constructor
public

constructor(node: THREE.Object3d)

Member Summary

Public Members
public

KSS declarations programatically set on this node

public
public
public
public

KSS declarations computed via the cascade

public
public
public
public
public get
public

layout: *

public
public

KSS declarations from rules that match this node

public
public

matchingRules(selector: SelectorFragmentList, rule: Object, stylesheet: Stylesheet): Object[]

KSS rules whose selectors match this node

public get
public

node: *

public
public

Method Summary

Public Methods
public
public
public
public
public

Sets dirty the hierarcy flag for all of the scene graph ancestors of this node and the node itself.

public

Sets dirty the layout flag for all of the scene graph ancestors of this node and the node itself.

public
public

Public Constructors

public constructor(node: THREE.Object3d) source

Params:

NameTypeAttributeDescription
node THREE.Object3d

Public Members

public assignedStyles: * source

KSS declarations programatically set on this node

public background: * source

public borderBounds: * source

public borderLine: * source

public computedStyles: * source

KSS declarations computed via the cascade

public contentBounds: * source

public geometryBounds: * source

public geometryIsDirty: boolean source

public hierarchyIsDirty: boolean source

public get isInAnyWayDirty: * source

public layout: * source

public layoutIsDirty: boolean source

public localStyles: * source

KSS declarations from rules that match this node

public marginBounds: * source

public matchingRules(selector: SelectorFragmentList, rule: Object, stylesheet: Stylesheet): Object[] source

KSS rules whose selectors match this node

public get needsStyleRefresh: * source

public node: * source

public paddingBounds: * source

public stylesAreDirty: boolean source

Public Methods

public calculateEdgeBounds() source

public calculateGeometryBounds() source

public clearDirtyFlags() source

public logFlags() source

public setAncestorsHierarchyDirty() source

Sets dirty the hierarcy flag for all of the scene graph ancestors of this node and the node itself. This method is usually used when in Object3D.add or Object3D.remove

public setAncestorsLayoutDirty() source

Sets dirty the layout flag for all of the scene graph ancestors of this node and the node itself. This method is usually used when this node's size has changed and the parent will need to run layout.

public setSubgraphStylesDirty() source

public updateShadowSOM() source