Skip to content

@jtopo/core / ThemeContent

Class: ThemeContent ​

主题配置类型定义 该类型定义了不同图形元素(如区域、层、节点、链接等)的样式配置选项。 每个图形元素都对应一个样式配置对象(StyleOpt)。

Since

2.4.0

Table of contents ​

Constructors ​

Properties ​

Methods ​

Constructors ​

constructor ​

new ThemeContent(init?)

Parameters ​

NameType
init?ThemeContentType

Properties ​

Optional ArcLink: PartStyleOptionType


AutoFoldLink: PartStyleOptionType


BezierLink: PartStyleOptionType


CanvasNode ​

CanvasNode: PartStyleOptionType


DefaultConfig ​

Optional DefaultConfig: Object

图形默认的填充色(没有指定填充色时)

Type declaration ​

NameType
fillStylestring
strokeStylestring
font"12px sans-serif"
textAlign"center"
textBaseline"middle"

EllipseNode ​

EllipseNode: PartStyleOptionType


FoldLink: PartStyleOptionType


HtmlNode ​

HtmlNode: PartStyleOptionType


ImageNode ​

ImageNode: PartStyleOptionType


Link: PartStyleOptionType


Optional Link.Arrow: PartStyleOptionType

Link箭头的样式配置


Optional Link.Label: PartStyleOptionType

Link文本的样式配置


LinkSelectedStyle ​

Optional LinkSelectedStyle: LinkSelectedStyleOptionsType

选中节点的样式配置 该样式配置对象的属性值为选中节点的样式。


Node ​

Node: PartStyleOptionType


NodeSelectedStyle ​

Optional NodeSelectedStyle: NodeSelectedStyleOptionsType

选中节点的样式配置 该样式配置对象的属性值为选中节点的样式。

如果 borderWidth > 0, 则绘制一个矩形框


QuadBezierLink: PartStyleOptionType


RatioNode ​

RatioNode: PartStyleOptionType


SelectArea ​

Optional SelectArea: PartStyleOptionType

鼠标框选矩形的样式配置


ShapeNode ​

ShapeNode: PartStyleOptionType


TextNode ​

TextNode: PartStyleOptionType


TipNode ​

TipNode: PartStyleOptionType


VideoNode ​

VideoNode: PartStyleOptionType


Optional ZShapeLink: PartStyleOptionType

Methods ​

toJSON ​

toJSON(): Object

Returns ​

Object