string
Behavior key, that is, the unique identifier
Used to identify the behavior for further operations
// Update behavior optionsgraph.updateBehavior({key: 'key', ...});
string
Behavior type
Combo configuration for defining which combo attributes should remain fixed in size visually. By default, the entire combo will be fixed
(datum: ComboData) => boolean Default:
() = true
Combo filter for filtering which combos remain fixed in size during zooming
Edge configuration for defining which edge attributes should remain fixed in size visually. By default, the lineWidth and labelFontSize attributes are fixed
(datum: EdgeData) => boolean Default:
() = true
Edge filter for filtering which edges remain fixed in size during zooming
Whether to enable the fix element size behavior. Enabled by default when zooming out
Enabled by default when zooming out, set enable: (event) => event.data.scale < 1
; If you want to enable it when zooming in, set enable: (event) => event.data.scale > 1
; If you want to enable it when zooming in and out, set enable: true
Node configuration for defining which node attributes should remain fixed in size visually. If not specified (i.e., undefined), the entire node will be fixed in size.
Example
如果在缩放过程中希望固定节点主图形的 lineWidth,可以这样配置:
If you want to fix the lineWidth of the key shape of the node during zooming, you can configure it like this:
{node: [{ shape: 'key', fields: ['lineWidth'] }];}
如果在缩放过程中想保持元素标签大小不变,可以这样配置:
If you want to keep the label size of the element unchanged during zooming, you can configure it like this:
{shape: 'label';}
(datum: NodeData) => boolean Default:
() = true
Node filter for filtering which nodes remain fixed in size during zooming
boolean Default:
false
Whether to reset styles when elements are redrawn
string Default: ``
Specify the state of elements to be fixed in size
destroy(): void;