@jnrs/lingshu-smart 2.2.43 → 2.2.44

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.
@@ -8,6 +8,10 @@ interface EditorOptions {
8
8
  onRotate?: (rotation: number) => void;
9
9
  onScale?: (width: number, height: number) => void;
10
10
  onMove?: (percentX: number, percentY: number) => void;
11
+ /** 拖拽开始(供 store 暂停回写/重建等重操作,避免拖拽掉帧) */
12
+ onDragStart?: () => void;
13
+ /** 拖拽结束(供 store 恢复回写并同步最终状态) */
14
+ onDragEnd?: () => void;
11
15
  }
12
16
  /**
13
17
  * EditorController 类负责管理图形编辑功能,包括设备的选择、旋转和缩放等操作。它通过监听编辑器的事件来更新当前选中的设备,并提供方法来设置缩放范围、标尺和点阵等功能。
@@ -25,10 +29,18 @@ export declare class EditorController {
25
29
  private onRotate?;
26
30
  private onScale?;
27
31
  private onMove?;
32
+ private onDragStart?;
33
+ private onDragEnd?;
28
34
  constructor(options: EditorOptions);
29
35
  selectEquipment(condition?: string): void;
30
36
  rerenderModel(modelConfig: ILayer): void;
31
37
  private addEvent;
38
+ /** MOVE 事件停止判定为拖拽结束的静默时长(ms) */
39
+ private static readonly DRAG_END_SILENCE;
40
+ private dragging;
41
+ private dragEndTimer;
42
+ /** 标记拖拽进行中:首次触发 onDragStart,并重置结束计时器 */
43
+ private markDragging;
32
44
  destroy(): void;
33
45
  }
34
46
  export {};
@@ -0,0 +1,35 @@
1
+ import { b as a } from "./index-8szZ-Zwj.js";
2
+ function t(s) {
3
+ return s?.className === a.MACHINE_TOOL;
4
+ }
5
+ function n(s) {
6
+ return s?.className === a.MACHINE_TOOL || s?.className === a.MARKING_MACHINE || s?.className === a.CLEANING_MACHINE || s?.className === a.LOADING_STATION || s?.className === a.RESOURCE_OPERATION_WINDOW;
7
+ }
8
+ function c(s) {
9
+ return s?.className === a.RESOURCE_STORE || s?.className === a.SINGLE_JOINT_ROBOT || s?.className === a.DOUBLE_JOINT_ROBOT || s?.className === a.RGV || s?.className === a.PALLET;
10
+ }
11
+ function O(s) {
12
+ return s?.className === a.SHUTTLE_STATION || s?.className === a.MATERIAL_TRACK;
13
+ }
14
+ function T(s) {
15
+ return s?.className === a.SINGLE_JOINT_ROBOT || s?.className === a.DOUBLE_JOINT_ROBOT;
16
+ }
17
+ function e(s) {
18
+ return s?.className === a.RAIL;
19
+ }
20
+ function o(s) {
21
+ return s?.className === a.SHUTTLE_STATION;
22
+ }
23
+ function i(s) {
24
+ return s?.className === a.PALLET;
25
+ }
26
+ export {
27
+ c as a,
28
+ O as b,
29
+ T as c,
30
+ e as d,
31
+ o as e,
32
+ i as f,
33
+ n as h,
34
+ t as i
35
+ };