aldehyde 0.2.518 → 0.2.520

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.
Files changed (90) hide show
  1. package/lib/controls/icon-selector/icon/phonenode-menu-icon/iconfont.css +99 -99
  2. package/lib/detail/view/act-dtmpl-view.d.ts +3 -1
  3. package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
  4. package/lib/detail/view/act-dtmpl-view.js +5 -2
  5. package/lib/detail/view/act-dtmpl-view.js.map +1 -1
  6. package/lib/detail/view/audit-data-popover.d.ts +11 -0
  7. package/lib/detail/view/audit-data-popover.d.ts.map +1 -0
  8. package/lib/detail/view/audit-data-popover.js +48 -0
  9. package/lib/detail/view/audit-data-popover.js.map +1 -0
  10. package/lib/detail/view/dtmpl-view.d.ts +3 -9
  11. package/lib/detail/view/dtmpl-view.d.ts.map +1 -1
  12. package/lib/detail/view/dtmpl-view.js +2 -1
  13. package/lib/detail/view/dtmpl-view.js.map +1 -1
  14. package/lib/draw-canvas-edit/components/asset-bar/index.less +35 -35
  15. package/lib/draw-canvas-edit/components/main-header/index.less +23 -23
  16. package/lib/form/dtmpl-form.d.ts +1 -0
  17. package/lib/form/dtmpl-form.d.ts.map +1 -1
  18. package/lib/form/dtmpl-form.js +24 -4
  19. package/lib/form/dtmpl-form.js.map +1 -1
  20. package/lib/lowcode-components/base-table/index.less +61 -61
  21. package/lib/lowcode-components/data-number/index.less +10 -10
  22. package/lib/lowcode-components/date-time/index.less +4 -4
  23. package/lib/lowcode-components/four-angle-glow-border/index.less +49 -49
  24. package/lib/lowcode-components/lowcode-view/component/font/FontGlobal.css +26 -26
  25. package/lib/lowcode-components/lowcode-view/component/screen-fit/index.less +13 -13
  26. package/lib/lowcode-components/text-scroller/index.less +28 -28
  27. package/lib/tmpl/interface.d.ts +8 -0
  28. package/lib/tmpl/interface.d.ts.map +1 -1
  29. package/lib/tmpl/interface.js +1 -0
  30. package/lib/tmpl/interface.js.map +1 -1
  31. package/lib/units/index.d.ts.map +1 -1
  32. package/lib/units/index.js +3 -2
  33. package/lib/units/index.js.map +1 -1
  34. package/package.json +1 -1
  35. package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.css +99 -99
  36. package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.json +156 -156
  37. package/src/aldehyde/detail/view/act-dtmpl-view.tsx +7 -2
  38. package/src/aldehyde/detail/view/audit-data-popover.tsx +70 -0
  39. package/src/aldehyde/detail/view/dtmpl-view.tsx +5 -3
  40. package/src/aldehyde/draw-canvas-edit/components/asset-bar/index.less +35 -35
  41. package/src/aldehyde/draw-canvas-edit/components/asset-bar/index.tsx +110 -110
  42. package/src/aldehyde/draw-canvas-edit/components/main-header/index.less +23 -23
  43. package/src/aldehyde/draw-canvas-edit/components/main-header/index.tsx +263 -263
  44. package/src/aldehyde/draw-canvas-edit/components/render/draws/index.ts +7 -7
  45. package/src/aldehyde/draw-canvas-edit/components/render/graphs/base-graph.ts +241 -241
  46. package/src/aldehyde/draw-canvas-edit/components/render/graphs/circle.ts +699 -699
  47. package/src/aldehyde/draw-canvas-edit/components/render/graphs/curve.ts +500 -500
  48. package/src/aldehyde/draw-canvas-edit/components/render/graphs/index.ts +5 -5
  49. package/src/aldehyde/draw-canvas-edit/components/render/graphs/line.ts +493 -493
  50. package/src/aldehyde/draw-canvas-edit/components/render/graphs/rect.ts +680 -680
  51. package/src/aldehyde/draw-canvas-edit/components/render/handlers/drag-handlers.ts +68 -68
  52. package/src/aldehyde/draw-canvas-edit/components/render/handlers/graph-handlers.ts +113 -113
  53. package/src/aldehyde/draw-canvas-edit/components/render/handlers/index.ts +9 -9
  54. package/src/aldehyde/draw-canvas-edit/components/render/handlers/key-move-handlers.ts +49 -49
  55. package/src/aldehyde/draw-canvas-edit/components/render/handlers/link-handlers.ts +45 -45
  56. package/src/aldehyde/draw-canvas-edit/components/render/handlers/shutcut-handlers.ts +45 -45
  57. package/src/aldehyde/draw-canvas-edit/components/render/handlers/text-handlers.ts +81 -81
  58. package/src/aldehyde/draw-canvas-edit/components/render/handlers/zoom-handlers.ts +59 -59
  59. package/src/aldehyde/draw-canvas-edit/components/render/tools/align-tool.ts +89 -89
  60. package/src/aldehyde/draw-canvas-edit/components/render/tools/asset-tool.ts +154 -154
  61. package/src/aldehyde/draw-canvas-edit/components/render/tools/link-tool.ts +222 -222
  62. package/src/aldehyde/draw-canvas-edit/components/render/tools/z-index-tool.ts +224 -224
  63. package/src/aldehyde/draw-canvas-edit/components/render/utils/a-star.ts +116 -116
  64. package/src/aldehyde/draw-canvas-edit/components/render/utils/bezier-scene-func.ts +72 -72
  65. package/src/aldehyde/draw-canvas-edit/components/setting-form/imag-upload.tsx +119 -119
  66. package/src/aldehyde/form/dtmpl-form.tsx +26 -4
  67. package/src/aldehyde/layout4/imgs/user.svg +26 -26
  68. package/src/aldehyde/lowcode-components/base-color-block/index.tsx +31 -31
  69. package/src/aldehyde/lowcode-components/base-table/index.less +61 -61
  70. package/src/aldehyde/lowcode-components/data-number/index.less +10 -10
  71. package/src/aldehyde/lowcode-components/date-time/index.less +4 -4
  72. package/src/aldehyde/lowcode-components/date-time/index.tsx +64 -64
  73. package/src/aldehyde/lowcode-components/four-angle-glow-border/index.less +49 -49
  74. package/src/aldehyde/lowcode-components/four-angle-glow-border/index.tsx +53 -53
  75. package/src/aldehyde/lowcode-components/lowcode-view/component/abstract-controller.ts +64 -64
  76. package/src/aldehyde/lowcode-components/lowcode-view/component/abstract-definition.ts +77 -77
  77. package/src/aldehyde/lowcode-components/lowcode-view/component/abstract-designer-loader.ts +36 -36
  78. package/src/aldehyde/lowcode-components/lowcode-view/component/component-container.tsx +144 -144
  79. package/src/aldehyde/lowcode-components/lowcode-view/component/font/FontGlobal.css +26 -26
  80. package/src/aldehyde/lowcode-components/lowcode-view/component/group-layer/controller.ts +36 -36
  81. package/src/aldehyde/lowcode-components/lowcode-view/component/group-layer/definition.ts +53 -53
  82. package/src/aldehyde/lowcode-components/lowcode-view/component/group-layer/index.tsx +15 -15
  83. package/src/aldehyde/lowcode-components/lowcode-view/component/layer-builder.tsx +98 -98
  84. package/src/aldehyde/lowcode-components/lowcode-view/component/screen-fit/index.less +13 -13
  85. package/src/aldehyde/lowcode-components/lowcode-view/component/screen-fit/index.tsx +121 -121
  86. package/src/aldehyde/lowcode-components/placeholder-component/index.tsx +81 -81
  87. package/src/aldehyde/lowcode-components/text-scroller/index.less +28 -28
  88. package/src/aldehyde/lowcode-components/text-scroller/index.tsx +173 -173
  89. package/src/aldehyde/tmpl/interface.tsx +10 -1
  90. package/src/aldehyde/units/index.tsx +2 -1
@@ -1,81 +1,81 @@
1
- import Konva from 'konva';
2
- import { Render } from '../index';
3
- import { Handler } from '../types';
4
-
5
- // 文本创建操作
6
-
7
- export class TextHandlers implements Handler {
8
- static readonly NAME = 'TextHandlers';
9
- private render: Render;
10
- constructor(render: Render) {
11
- this.render = render;
12
- }
13
- // 获取鼠标位置,并处理为相对大小
14
- getStagePoint(attract = false) {
15
- const pos = this.render.stage.getPointerPosition();
16
- if (pos) {
17
- const stageState = this.render.getStageState();
18
- if (attract) {
19
- const { pos: transformerPos } = this.render.attractTool.attractPoint(pos);
20
- return {
21
- x: this.render.toStageValue(transformerPos.x - stageState.x),
22
- y: this.render.toStageValue(transformerPos.y - stageState.y)
23
- };
24
- } else {
25
- return {
26
- x: this.render.toStageValue(pos.x - stageState.x),
27
- y: this.render.toStageValue(pos.y - stageState.y)
28
- };
29
- }
30
- }
31
- return null;
32
- }
33
- group: Konva.Group | null = null;
34
- handlers = {
35
- stage: {
36
- mousedown: (e: Konva.KonvaEventObject<MouseEvent>) => {
37
- // 只有在 texting 模式且点击空白区域时才创建文本
38
- if (!this.render.texting) return;
39
- const target = e.target;
40
- // 检查是否点击在 stage 背景上(不是其他元素)
41
- const isBackground = target === this.render.stage ||
42
- (target.attrs && target.attrs.name && target.attrs.name.includes('background'));
43
- if (!isBackground) return;
44
- try {
45
- // 清除当前选择
46
- this.render.selectionTool.selectingClear();
47
- this.render.linkTool.selectingClear();
48
- const point = this.getStagePoint();
49
- if (point) {
50
- this.group = this.render.importExportTool.addTextAsset(point);
51
- if (this.group) {
52
- // 创建成功后立即选中文本
53
- this.render.selectionTool.select([this.group]);
54
- }
55
- }
56
- } catch (err) {
57
- console.error('Failed to create text asset:', err);
58
- this.group = null;
59
- }
60
- },
61
- mouseup: () => { // 重置 texting 状态
62
- this.render.changeTexting(false);
63
- this.group = null;
64
- },
65
- click: (e: Konva.KonvaEventObject<MouseEvent>) => { // 点击空白区域时,如果有文本创建了一半,也取消
66
- if (!this.render.texting) return;
67
- const target = e.target;
68
- const isBackground = target === this.render.stage ||
69
- (target.attrs && target.attrs.name && target.attrs.name.includes('background'));
70
- if (isBackground) {
71
- this.render.changeTexting(false);
72
- }
73
- }
74
- },
75
- transformer: {
76
- dblclick: () => {
77
- // 双击文本时显示编辑面板
78
- }
79
- }
80
- }
81
- }
1
+ import Konva from 'konva';
2
+ import { Render } from '../index';
3
+ import { Handler } from '../types';
4
+
5
+ // 文本创建操作
6
+
7
+ export class TextHandlers implements Handler {
8
+ static readonly NAME = 'TextHandlers';
9
+ private render: Render;
10
+ constructor(render: Render) {
11
+ this.render = render;
12
+ }
13
+ // 获取鼠标位置,并处理为相对大小
14
+ getStagePoint(attract = false) {
15
+ const pos = this.render.stage.getPointerPosition();
16
+ if (pos) {
17
+ const stageState = this.render.getStageState();
18
+ if (attract) {
19
+ const { pos: transformerPos } = this.render.attractTool.attractPoint(pos);
20
+ return {
21
+ x: this.render.toStageValue(transformerPos.x - stageState.x),
22
+ y: this.render.toStageValue(transformerPos.y - stageState.y)
23
+ };
24
+ } else {
25
+ return {
26
+ x: this.render.toStageValue(pos.x - stageState.x),
27
+ y: this.render.toStageValue(pos.y - stageState.y)
28
+ };
29
+ }
30
+ }
31
+ return null;
32
+ }
33
+ group: Konva.Group | null = null;
34
+ handlers = {
35
+ stage: {
36
+ mousedown: (e: Konva.KonvaEventObject<MouseEvent>) => {
37
+ // 只有在 texting 模式且点击空白区域时才创建文本
38
+ if (!this.render.texting) return;
39
+ const target = e.target;
40
+ // 检查是否点击在 stage 背景上(不是其他元素)
41
+ const isBackground = target === this.render.stage ||
42
+ (target.attrs && target.attrs.name && target.attrs.name.includes('background'));
43
+ if (!isBackground) return;
44
+ try {
45
+ // 清除当前选择
46
+ this.render.selectionTool.selectingClear();
47
+ this.render.linkTool.selectingClear();
48
+ const point = this.getStagePoint();
49
+ if (point) {
50
+ this.group = this.render.importExportTool.addTextAsset(point);
51
+ if (this.group) {
52
+ // 创建成功后立即选中文本
53
+ this.render.selectionTool.select([this.group]);
54
+ }
55
+ }
56
+ } catch (err) {
57
+ console.error('Failed to create text asset:', err);
58
+ this.group = null;
59
+ }
60
+ },
61
+ mouseup: () => { // 重置 texting 状态
62
+ this.render.changeTexting(false);
63
+ this.group = null;
64
+ },
65
+ click: (e: Konva.KonvaEventObject<MouseEvent>) => { // 点击空白区域时,如果有文本创建了一半,也取消
66
+ if (!this.render.texting) return;
67
+ const target = e.target;
68
+ const isBackground = target === this.render.stage ||
69
+ (target.attrs && target.attrs.name && target.attrs.name.includes('background'));
70
+ if (isBackground) {
71
+ this.render.changeTexting(false);
72
+ }
73
+ }
74
+ },
75
+ transformer: {
76
+ dblclick: () => {
77
+ // 双击文本时显示编辑面板
78
+ }
79
+ }
80
+ }
81
+ }
@@ -1,59 +1,59 @@
1
- import Konva from 'konva';
2
- import { Render } from '../index';
3
- import { Handler } from '../types';
4
- import { GraphDraw, LinkDraw, RulerDraw, PreviewDraw, RefLineDraw, BgDraw } from '../draws';
5
-
6
- // 缩放
7
-
8
- export class ZoomHandlers implements Handler {
9
- static readonly NAME = 'ZoomHandlers';
10
- private render: Render;
11
- constructor(render: Render) {
12
- this.render = render;
13
- }
14
- scaleBy = 0.1; // zoom 速度
15
- // zoom 范围
16
- scaleMin = 0.2;
17
- scaleMax = 5;
18
-
19
- handlers = {
20
- stage: {
21
- wheel: (e: Konva.KonvaEventObject<GlobalEventHandlersEventMap['wheel']>) => {
22
- const { scale: oldScale } = this.render.getStageState();
23
- const isPinchToZoom = e.evt.ctrlKey;
24
- const newScale = isPinchToZoom ? oldScale + (e.evt.deltaY < 0 ? this.scaleBy : -this.scaleBy) : oldScale;
25
- const finalScale = Math.max(this.scaleMin, Math.min(this.scaleMax, newScale));
26
- if (finalScale !== oldScale) {
27
- const position = this.render.stage.getPosition();
28
- const point = { x: e.evt.offsetX, y: e.evt.offsetY };
29
- const mousePointTo = {
30
- x: (point.x - position.x) / oldScale,
31
- y: (point.y - position.y) / oldScale
32
- };
33
- const newPosition = {
34
- x: -(mousePointTo.x * finalScale - point.x),
35
- y: -(mousePointTo.y * finalScale - point.y)
36
- };
37
- this.render.emit('scale-change', finalScale);
38
- this.render.stage.scale({ x: finalScale, y: finalScale });
39
- this.render.stage.position(newPosition);
40
- } else if (!isPinchToZoom) {
41
- const position = this.render.stage.getPosition();
42
- this.render.stage.position({
43
- x: position.x - e.evt.deltaX,
44
- y: position.y - e.evt.deltaY
45
- });
46
- }
47
- // 重绘
48
- this.render.redraw([
49
- BgDraw.NAME,
50
- GraphDraw.NAME,
51
- LinkDraw.NAME,
52
- RulerDraw.NAME,
53
- RefLineDraw.NAME,
54
- PreviewDraw.NAME
55
- ]);
56
- }
57
- }
58
- }
59
- }
1
+ import Konva from 'konva';
2
+ import { Render } from '../index';
3
+ import { Handler } from '../types';
4
+ import { GraphDraw, LinkDraw, RulerDraw, PreviewDraw, RefLineDraw, BgDraw } from '../draws';
5
+
6
+ // 缩放
7
+
8
+ export class ZoomHandlers implements Handler {
9
+ static readonly NAME = 'ZoomHandlers';
10
+ private render: Render;
11
+ constructor(render: Render) {
12
+ this.render = render;
13
+ }
14
+ scaleBy = 0.1; // zoom 速度
15
+ // zoom 范围
16
+ scaleMin = 0.2;
17
+ scaleMax = 5;
18
+
19
+ handlers = {
20
+ stage: {
21
+ wheel: (e: Konva.KonvaEventObject<GlobalEventHandlersEventMap['wheel']>) => {
22
+ const { scale: oldScale } = this.render.getStageState();
23
+ const isPinchToZoom = e.evt.ctrlKey;
24
+ const newScale = isPinchToZoom ? oldScale + (e.evt.deltaY < 0 ? this.scaleBy : -this.scaleBy) : oldScale;
25
+ const finalScale = Math.max(this.scaleMin, Math.min(this.scaleMax, newScale));
26
+ if (finalScale !== oldScale) {
27
+ const position = this.render.stage.getPosition();
28
+ const point = { x: e.evt.offsetX, y: e.evt.offsetY };
29
+ const mousePointTo = {
30
+ x: (point.x - position.x) / oldScale,
31
+ y: (point.y - position.y) / oldScale
32
+ };
33
+ const newPosition = {
34
+ x: -(mousePointTo.x * finalScale - point.x),
35
+ y: -(mousePointTo.y * finalScale - point.y)
36
+ };
37
+ this.render.emit('scale-change', finalScale);
38
+ this.render.stage.scale({ x: finalScale, y: finalScale });
39
+ this.render.stage.position(newPosition);
40
+ } else if (!isPinchToZoom) {
41
+ const position = this.render.stage.getPosition();
42
+ this.render.stage.position({
43
+ x: position.x - e.evt.deltaX,
44
+ y: position.y - e.evt.deltaY
45
+ });
46
+ }
47
+ // 重绘
48
+ this.render.redraw([
49
+ BgDraw.NAME,
50
+ GraphDraw.NAME,
51
+ LinkDraw.NAME,
52
+ RulerDraw.NAME,
53
+ RefLineDraw.NAME,
54
+ PreviewDraw.NAME
55
+ ]);
56
+ }
57
+ }
58
+ }
59
+ }
@@ -1,89 +1,89 @@
1
- import Konva from 'konva';
2
- import { Render } from '../index';
3
- import { AlignType } from '../types';
4
- import { GraphDraw, LinkDraw, RulerDraw, PreviewDraw } from '../draws';
5
-
6
- // 工具栏对齐
7
-
8
- export class AlignTool {
9
- private render: Render;
10
- constructor(render: Render) {
11
- this.render = render;
12
- }
13
-
14
- getAlignRect(node: Konva.Node | Konva.Transformer) {
15
- const stageState = this.render.getStageState();
16
- let width = 0, height = 0, x = 0, y = 0;
17
- const result = node.getClientRect();
18
- // 转为 逻辑觉尺寸
19
- [width, height, x, y] = [
20
- this.render.toStageValue(result.width),
21
- this.render.toStageValue(result.height),
22
- this.render.toStageValue(result.x - stageState.x),
23
- this.render.toStageValue(result.y - stageState.y)
24
- ];
25
- return { width, height, x, y };
26
- }
27
-
28
- // 对齐参考点
29
- getAlignPoints(node?: Konva.Node | Konva.Transformer): { [index: string]: number } {
30
- let width = 0, height = 0, x = 0, y = 0;
31
- if (node !== void 0) {
32
- // 选择器 / 基于节点 逻辑觉尺寸
33
- const rect = this.getAlignRect(node);
34
- [width, height, x, y] = [rect.width, rect.height, rect.x, rect.y];
35
- } else { // 默认为选择器
36
- return this.getAlignPoints(this.render.transformer);
37
- }
38
- return {
39
- Middle: x + width / 2,
40
- Left: x,
41
- Right: x + width,
42
- Center: y + height / 2,
43
- Top: y,
44
- Bottom: y + height
45
- };
46
- }
47
-
48
- align(type: AlignType, target?: Konva.Node) {
49
- // 对齐参考点(所有)
50
- const points = this.getAlignPoints(target);
51
- // 对齐参考点
52
- const point = points[type];
53
- // 需要移动的节点
54
- const nodes = this.render.transformer.nodes().filter((node) => node !== target);
55
- // 移动逻辑
56
- for (const node of nodes) {
57
- // 逻辑觉尺寸
58
- const rect = this.getAlignRect(node);
59
- const [width, height, x, y] = [rect.width, rect.height, rect.x, rect.y];
60
- switch (type) {
61
- case "Middle":
62
- case "Left":
63
- case "Right":
64
- {
65
- const cx = type === "Middle" ? x + width / 2 : type === "Left" ? x : x + width;
66
- node.x(node.x() + (point - cx));
67
- }
68
- break;
69
- case "Center":
70
- case "Top":
71
- case "Bottom":
72
- {
73
- const cy = type === "Center" ? y + height / 2 : type === "Top" ? y : y + height;
74
- node.y(node.y() + (point - cy));
75
- }
76
- break;
77
- }
78
- }
79
- // 更新历史
80
- this.render.updateHistory();
81
- // 重绘
82
- this.render.redraw([
83
- GraphDraw.NAME,
84
- LinkDraw.NAME,
85
- RulerDraw.NAME,
86
- PreviewDraw.NAME
87
- ]);
88
- }
89
- }
1
+ import Konva from 'konva';
2
+ import { Render } from '../index';
3
+ import { AlignType } from '../types';
4
+ import { GraphDraw, LinkDraw, RulerDraw, PreviewDraw } from '../draws';
5
+
6
+ // 工具栏对齐
7
+
8
+ export class AlignTool {
9
+ private render: Render;
10
+ constructor(render: Render) {
11
+ this.render = render;
12
+ }
13
+
14
+ getAlignRect(node: Konva.Node | Konva.Transformer) {
15
+ const stageState = this.render.getStageState();
16
+ let width = 0, height = 0, x = 0, y = 0;
17
+ const result = node.getClientRect();
18
+ // 转为 逻辑觉尺寸
19
+ [width, height, x, y] = [
20
+ this.render.toStageValue(result.width),
21
+ this.render.toStageValue(result.height),
22
+ this.render.toStageValue(result.x - stageState.x),
23
+ this.render.toStageValue(result.y - stageState.y)
24
+ ];
25
+ return { width, height, x, y };
26
+ }
27
+
28
+ // 对齐参考点
29
+ getAlignPoints(node?: Konva.Node | Konva.Transformer): { [index: string]: number } {
30
+ let width = 0, height = 0, x = 0, y = 0;
31
+ if (node !== void 0) {
32
+ // 选择器 / 基于节点 逻辑觉尺寸
33
+ const rect = this.getAlignRect(node);
34
+ [width, height, x, y] = [rect.width, rect.height, rect.x, rect.y];
35
+ } else { // 默认为选择器
36
+ return this.getAlignPoints(this.render.transformer);
37
+ }
38
+ return {
39
+ Middle: x + width / 2,
40
+ Left: x,
41
+ Right: x + width,
42
+ Center: y + height / 2,
43
+ Top: y,
44
+ Bottom: y + height
45
+ };
46
+ }
47
+
48
+ align(type: AlignType, target?: Konva.Node) {
49
+ // 对齐参考点(所有)
50
+ const points = this.getAlignPoints(target);
51
+ // 对齐参考点
52
+ const point = points[type];
53
+ // 需要移动的节点
54
+ const nodes = this.render.transformer.nodes().filter((node) => node !== target);
55
+ // 移动逻辑
56
+ for (const node of nodes) {
57
+ // 逻辑觉尺寸
58
+ const rect = this.getAlignRect(node);
59
+ const [width, height, x, y] = [rect.width, rect.height, rect.x, rect.y];
60
+ switch (type) {
61
+ case "Middle":
62
+ case "Left":
63
+ case "Right":
64
+ {
65
+ const cx = type === "Middle" ? x + width / 2 : type === "Left" ? x : x + width;
66
+ node.x(node.x() + (point - cx));
67
+ }
68
+ break;
69
+ case "Center":
70
+ case "Top":
71
+ case "Bottom":
72
+ {
73
+ const cy = type === "Center" ? y + height / 2 : type === "Top" ? y : y + height;
74
+ node.y(node.y() + (point - cy));
75
+ }
76
+ break;
77
+ }
78
+ }
79
+ // 更新历史
80
+ this.render.updateHistory();
81
+ // 重绘
82
+ this.render.redraw([
83
+ GraphDraw.NAME,
84
+ LinkDraw.NAME,
85
+ RulerDraw.NAME,
86
+ PreviewDraw.NAME
87
+ ]);
88
+ }
89
+ }