@logicflow/core 1.1.28 → 1.1.30

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.
@@ -32,9 +32,9 @@
32
32
  }
33
33
  .lf-edge-animation {
34
34
  stroke-dashoffset: 100%;
35
- animation: dash 5s linear infinite;
35
+ animation: lf_animate_dash 5s linear infinite;
36
36
  }
37
- @keyframes dash {
37
+ @keyframes lf_animate_dash {
38
38
  to {
39
39
  stroke-dashoffset: 0;
40
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logicflow/core",
3
- "version": "1.1.28",
3
+ "version": "1.1.30",
4
4
  "description": "LogicFlow core, to quickly build flowchart editor",
5
5
  "main": "dist/entry.js",
6
6
  "module": "dist/logic-flow.js",
@@ -116,8 +116,9 @@ export default class LogicFlow {
116
116
  * 将图形选中
117
117
  * @param id 选择元素ID
118
118
  * @param multiple 是否允许多选,如果为true,不会将上一个选中的元素重置
119
+ * @param toFront 是否将选中的元素置顶,默认为true
119
120
  */
120
- selectElementById(id: string, multiple?: boolean): void;
121
+ selectElementById(id: string, multiple?: boolean, toFront?: boolean): void;
121
122
  /**
122
123
  * 定位到画布视口中心
123
124
  * 支持用户传入图形当前的坐标或id,可以通过type来区分是节点还是边的id,也可以不传(兜底)
@@ -1,5 +1,5 @@
1
1
  import { Point } from '../type/index';
2
- export declare const getCorssPointOfLine: (a: Point, b: Point, c: Point, d: Point) => false | {
2
+ export declare const getCrossPointOfLine: (a: Point, b: Point, c: Point, d: Point) => false | {
3
3
  x: number;
4
4
  y: number;
5
5
  };
@@ -130,6 +130,7 @@ declare class BaseEdgeModel implements IBaseModel {
130
130
  setProperty(key: any, val: any): void;
131
131
  deleteProperty(key: string): void;
132
132
  setProperties(properties: any): void;
133
+ changeEdgeId(id: string): void;
133
134
  setStyle(key: any, val: any): void;
134
135
  setStyles(styles: any): void;
135
136
  updateStyles(styles: any): void;
@@ -50,7 +50,7 @@ export default class PolylineEdgeModel extends BaseEdgeModel {
50
50
  direction: any;
51
51
  };
52
52
  dragAppendEnd(): void;
53
- updatePointsAfterDrage(pointsList: any): void;
53
+ updatePointsAfterDrag(pointsList: any): void;
54
54
  getAdjustStart(): any;
55
55
  getAdjustEnd(): any;
56
56
  updateAfterAdjustStartAndEnd({ startPoint, endPoint, sourceNode, targetNode }: {
@@ -140,7 +140,7 @@ export default class BaseNodeModel implements IBaseNodeModel {
140
140
  * 获取当前节点锚点拖出连线样式
141
141
  * @returns 自定义锚点拖出样式
142
142
  */
143
- getAnchorLineStyle(): import("../../constant/DefaultTheme").CommonTheme;
143
+ getAnchorLineStyle(anchorInfo: any): import("../../constant/DefaultTheme").CommonTheme;
144
144
  /**
145
145
  * @overridable 支持重写
146
146
  * 获取outline样式,重写可以定义此类型节点outline样式, 默认使用主题样式
@@ -29,7 +29,7 @@ export default class BaseEdge extends Component<IProps> {
29
29
  handleContextMenu: (ev: MouseEvent) => void;
30
30
  handleMouseDown: (e: any) => void;
31
31
  handleMouseUp: (e: MouseEvent) => void;
32
- getIsDraging: () => boolean;
32
+ getIsDragging: () => boolean;
33
33
  toFront(): void;
34
34
  render(): h.JSX.Element;
35
35
  }
@@ -21,7 +21,7 @@ export default class PolylineEdge extends BaseEdge {
21
21
  }) => void;
22
22
  onDragEnd: () => void;
23
23
  beforeDragStart: (e: any, appendInfo: any) => void;
24
- getIsDraging: () => boolean;
24
+ getIsDragging: () => boolean;
25
25
  getEdge(): h.JSX.Element;
26
26
  getShape(): h.JSX.Element;
27
27
  getAnimation(): h.JSX.Element;
@@ -2,7 +2,7 @@ import { h } from 'preact';
2
2
  import BaseNode from './BaseNode';
3
3
  export default class HtmlNode extends BaseNode {
4
4
  ref: HTMLElement;
5
- currrentProperties: string;
5
+ currentProperties: string;
6
6
  preProperties: string;
7
7
  setRef: (dom: any) => void;
8
8
  get rootEl(): HTMLElement;
@@ -1,6 +1,6 @@
1
1
  import { h } from 'preact';
2
2
  import BaseNode from './BaseNode';
3
3
  export default class TextNode extends BaseNode {
4
- getBackgroud(): h.JSX.Element;
4
+ getBackground(): h.JSX.Element;
5
5
  getShape(): h.JSX.Element;
6
6
  }
@@ -2,7 +2,7 @@ import { h } from 'preact';
2
2
  import BaseText from './BaseText';
3
3
  export default class LineText extends BaseText {
4
4
  constructor(config: any);
5
- getBackgroud(): h.JSX.Element;
5
+ getBackground(): h.JSX.Element;
6
6
  setHoverON: () => void;
7
7
  setHoverOFF: () => void;
8
8
  getShape(): h.JSX.Element;