@logicflow/core 1.2.12 → 1.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logicflow/core",
3
- "version": "1.2.12",
3
+ "version": "1.2.13",
4
4
  "description": "LogicFlow core, to quickly build flowchart editor",
5
5
  "main": "dist/entry.js",
6
6
  "module": "dist/logic-flow.js",
@@ -1,6 +1,6 @@
1
1
  import { OutlineTheme } from '../../constant/DefaultTheme';
2
2
  import { ModelType, ElementType } from '../../constant/constant';
3
- import { AdditionData, NodeData, NodeConfig, NodeMoveRule, Bounds, AnchorConfig, PointAnchor, AnchorsOffsetItem, ShapeStyleAttribute, IsAllowMove, Point, AnchorInfo } from '../../type';
3
+ import { AdditionData, NodeData, NodeConfig, NodeMoveRule, Bounds, AnchorConfig, PointAnchor, AnchorsOffsetItem, ShapeStyleAttribute, IsAllowMove, Point, AnchorInfo, DomAttributes } from '../../type';
4
4
  import GraphModel from '../GraphModel';
5
5
  import { IBaseModel } from '../BaseModel';
6
6
  import { BaseEdgeModel } from '../edge';
@@ -118,6 +118,12 @@ export default class BaseNodeModel implements IBaseNodeModel {
118
118
  * 获取当前节点的properties
119
119
  */
120
120
  getProperties(): Record<string, any>;
121
+ /**
122
+ * @overridable 支持重写
123
+ * 获取当前节点最外层g标签Attributes, 例如className
124
+ * @returns 自定义节点样式
125
+ */
126
+ getOuterGAttributes(): DomAttributes;
121
127
  /**
122
128
  * @overridable 支持重写
123
129
  * 获取当前节点样式
@@ -389,6 +389,10 @@ export declare type NodeAttributes = {
389
389
  export declare type DiamondAttributes = {
390
390
  points: PointTuple[];
391
391
  } & NodeAttributes;
392
+ export declare type DomAttributes = {
393
+ className?: string;
394
+ [key: string]: string;
395
+ };
392
396
  export declare type ShapeStyleAttribute = CommonTheme;
393
397
  export declare type VirtualRectSize = {
394
398
  virtualRectWidth: number;
@@ -1,2 +1,5 @@
1
1
  export * from './uuid';
2
2
  export * from './drag';
3
+ export * from './edge';
4
+ export * from './geometry';
5
+ export * from './sampling';