@eclipse-glsp/client 2.1.0-next.301 → 2.1.0-next.303
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/css/glsp-sprotty.css +1 -0
- package/css/helper-lines.css +33 -0
- package/lib/base/auto-complete/index.d.ts +21 -0
- package/lib/base/auto-complete/index.d.ts.map +1 -0
- package/lib/base/auto-complete/index.js +37 -0
- package/lib/base/auto-complete/index.js.map +1 -0
- package/lib/base/feedback/index.d.ts +20 -0
- package/lib/base/feedback/index.d.ts.map +1 -0
- package/lib/base/feedback/index.js +36 -0
- package/lib/base/feedback/index.js.map +1 -0
- package/lib/base/focus/index.d.ts +18 -0
- package/lib/base/focus/index.d.ts.map +1 -0
- package/lib/base/focus/index.js +34 -0
- package/lib/base/focus/index.js.map +1 -0
- package/lib/base/index.d.ts +32 -0
- package/lib/base/index.d.ts.map +1 -0
- package/lib/base/index.js +48 -0
- package/lib/base/index.js.map +1 -0
- package/lib/base/model/index.d.ts +20 -0
- package/lib/base/model/index.d.ts.map +1 -0
- package/lib/base/model/index.js +36 -0
- package/lib/base/model/index.js.map +1 -0
- package/lib/base/tool-manager/index.d.ts +18 -0
- package/lib/base/tool-manager/index.d.ts.map +1 -0
- package/lib/base/tool-manager/index.js +34 -0
- package/lib/base/tool-manager/index.js.map +1 -0
- package/lib/base/view/index.d.ts +19 -0
- package/lib/base/view/index.d.ts.map +1 -0
- package/lib/base/view/index.js +35 -0
- package/lib/base/view/index.js.map +1 -0
- package/lib/default-modules.js +4 -4
- package/lib/default-modules.js.map +1 -1
- package/lib/features/accessibility/edge-autocomplete/index.d.ts +20 -0
- package/lib/features/accessibility/edge-autocomplete/index.d.ts.map +1 -0
- package/lib/features/accessibility/edge-autocomplete/index.js +36 -0
- package/lib/features/accessibility/edge-autocomplete/index.js.map +1 -0
- package/lib/features/accessibility/element-navigation/index.d.ts +22 -0
- package/lib/features/accessibility/element-navigation/index.d.ts.map +1 -0
- package/lib/features/accessibility/element-navigation/index.js +38 -0
- package/lib/features/accessibility/element-navigation/index.js.map +1 -0
- package/lib/features/accessibility/focus-tracker/index.d.ts +18 -0
- package/lib/features/accessibility/focus-tracker/index.d.ts.map +1 -0
- package/lib/features/accessibility/focus-tracker/index.js +34 -0
- package/lib/features/accessibility/focus-tracker/index.js.map +1 -0
- package/lib/features/accessibility/index.d.ts +31 -0
- package/lib/features/accessibility/index.d.ts.map +1 -0
- package/lib/features/accessibility/index.js +47 -0
- package/lib/features/accessibility/index.js.map +1 -0
- package/lib/features/accessibility/key-shortcut/index.d.ts +19 -0
- package/lib/features/accessibility/key-shortcut/index.d.ts.map +1 -0
- package/lib/features/accessibility/key-shortcut/index.js +35 -0
- package/lib/features/accessibility/key-shortcut/index.js.map +1 -0
- package/lib/features/accessibility/keyboard-grid/index.d.ts +21 -0
- package/lib/features/accessibility/keyboard-grid/index.d.ts.map +1 -0
- package/lib/features/accessibility/keyboard-grid/index.js +37 -0
- package/lib/features/accessibility/keyboard-grid/index.js.map +1 -0
- package/lib/features/accessibility/keyboard-pointer/index.d.ts +22 -0
- package/lib/features/accessibility/keyboard-pointer/index.d.ts.map +1 -0
- package/lib/features/accessibility/keyboard-pointer/index.js +38 -0
- package/lib/features/accessibility/keyboard-pointer/index.js.map +1 -0
- package/lib/features/accessibility/keyboard-tool-palette/index.d.ts +18 -0
- package/lib/features/accessibility/keyboard-tool-palette/index.d.ts.map +1 -0
- package/lib/features/accessibility/keyboard-tool-palette/index.js +34 -0
- package/lib/features/accessibility/keyboard-tool-palette/index.js.map +1 -0
- package/lib/features/accessibility/move-zoom/index.d.ts +19 -0
- package/lib/features/accessibility/move-zoom/index.d.ts.map +1 -0
- package/lib/features/accessibility/move-zoom/index.js +35 -0
- package/lib/features/accessibility/move-zoom/index.js.map +1 -0
- package/lib/features/accessibility/resize-key-tool/index.d.ts +19 -0
- package/lib/features/accessibility/resize-key-tool/index.d.ts.map +1 -0
- package/lib/features/accessibility/resize-key-tool/index.js +35 -0
- package/lib/features/accessibility/resize-key-tool/index.js.map +1 -0
- package/lib/features/accessibility/search/index.d.ts +19 -0
- package/lib/features/accessibility/search/index.d.ts.map +1 -0
- package/lib/features/accessibility/search/index.js +35 -0
- package/lib/features/accessibility/search/index.js.map +1 -0
- package/lib/features/accessibility/toast/index.d.ts +19 -0
- package/lib/features/accessibility/toast/index.d.ts.map +1 -0
- package/lib/features/accessibility/toast/index.js +35 -0
- package/lib/features/accessibility/toast/index.js.map +1 -0
- package/lib/features/accessibility/view-key-tools/index.d.ts +20 -0
- package/lib/features/accessibility/view-key-tools/index.d.ts.map +1 -0
- package/lib/features/accessibility/view-key-tools/index.js +36 -0
- package/lib/features/accessibility/view-key-tools/index.js.map +1 -0
- package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts +6 -3
- package/lib/features/accessibility/view-key-tools/movement-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/movement-key-tool.js +12 -17
- package/lib/features/accessibility/view-key-tools/movement-key-tool.js.map +1 -1
- package/lib/features/bounds/bounds-module.d.ts.map +1 -1
- package/lib/features/bounds/bounds-module.js +3 -1
- package/lib/features/bounds/bounds-module.js.map +1 -1
- package/lib/features/bounds/index.d.ts +24 -0
- package/lib/features/bounds/index.d.ts.map +1 -0
- package/lib/features/bounds/index.js +40 -0
- package/lib/features/bounds/index.js.map +1 -0
- package/lib/features/bounds/local-bounds.d.ts +2 -1
- package/lib/features/bounds/local-bounds.d.ts.map +1 -1
- package/lib/features/bounds/local-bounds.js +7 -0
- package/lib/features/bounds/local-bounds.js.map +1 -1
- package/lib/features/bounds/set-bounds-feedback-command.d.ts +1 -1
- package/lib/features/bounds/set-bounds-feedback-command.d.ts.map +1 -1
- package/lib/features/bounds/set-bounds-feedback-command.js +7 -7
- package/lib/features/bounds/set-bounds-feedback-command.js.map +1 -1
- package/lib/features/change-bounds/index.d.ts +21 -0
- package/lib/features/change-bounds/index.d.ts.map +1 -0
- package/lib/features/change-bounds/index.js +37 -0
- package/lib/features/change-bounds/index.js.map +1 -0
- package/lib/features/change-bounds/model.d.ts +4 -0
- package/lib/features/change-bounds/model.d.ts.map +1 -1
- package/lib/features/change-bounds/model.js +14 -2
- package/lib/features/change-bounds/model.js.map +1 -1
- package/lib/features/change-bounds/point-position-updater.d.ts +63 -0
- package/lib/features/change-bounds/point-position-updater.d.ts.map +1 -0
- package/lib/features/change-bounds/point-position-updater.js +87 -0
- package/lib/features/change-bounds/point-position-updater.js.map +1 -0
- package/lib/features/change-bounds/position-snapper.d.ts +28 -0
- package/lib/features/change-bounds/position-snapper.d.ts.map +1 -0
- package/lib/features/change-bounds/position-snapper.js +88 -0
- package/lib/features/change-bounds/position-snapper.js.map +1 -0
- package/lib/features/change-bounds/snap.d.ts +19 -42
- package/lib/features/change-bounds/snap.d.ts.map +1 -1
- package/lib/features/change-bounds/snap.js +9 -92
- package/lib/features/change-bounds/snap.js.map +1 -1
- package/lib/features/change-bounds/snap.spec.js +6 -5
- package/lib/features/change-bounds/snap.spec.js.map +1 -1
- package/lib/features/command-palette/index.d.ts +19 -0
- package/lib/features/command-palette/index.d.ts.map +1 -0
- package/lib/features/command-palette/index.js +35 -0
- package/lib/features/command-palette/index.js.map +1 -0
- package/lib/features/context-menu/index.d.ts +20 -0
- package/lib/features/context-menu/index.d.ts.map +1 -0
- package/lib/features/context-menu/index.js +36 -0
- package/lib/features/context-menu/index.js.map +1 -0
- package/lib/features/copy-paste/index.d.ts +20 -0
- package/lib/features/copy-paste/index.d.ts.map +1 -0
- package/lib/features/copy-paste/index.js +36 -0
- package/lib/features/copy-paste/index.js.map +1 -0
- package/lib/features/decoration/index.d.ts +18 -0
- package/lib/features/decoration/index.d.ts.map +1 -0
- package/lib/features/decoration/index.js +34 -0
- package/lib/features/decoration/index.js.map +1 -0
- package/lib/features/element-template/index.d.ts +20 -0
- package/lib/features/element-template/index.d.ts.map +1 -0
- package/lib/features/element-template/index.js +36 -0
- package/lib/features/element-template/index.js.map +1 -0
- package/lib/features/element-template/mouse-tracking-element-position-listener.d.ts +6 -3
- package/lib/features/element-template/mouse-tracking-element-position-listener.d.ts.map +1 -1
- package/lib/features/element-template/mouse-tracking-element-position-listener.js +23 -18
- package/lib/features/element-template/mouse-tracking-element-position-listener.js.map +1 -1
- package/lib/features/export/index.d.ts +19 -0
- package/lib/features/export/index.d.ts.map +1 -0
- package/lib/features/export/index.js +35 -0
- package/lib/features/export/index.js.map +1 -0
- package/lib/features/helper-lines/helper-line-feedback.d.ts +64 -0
- package/lib/features/helper-lines/helper-line-feedback.d.ts.map +1 -0
- package/lib/features/helper-lines/helper-line-feedback.js +218 -0
- package/lib/features/helper-lines/helper-line-feedback.js.map +1 -0
- package/lib/features/helper-lines/helper-line-manager-default.d.ts +46 -0
- package/lib/features/helper-lines/helper-line-manager-default.d.ts.map +1 -0
- package/lib/features/helper-lines/helper-line-manager-default.js +122 -0
- package/lib/features/helper-lines/helper-line-manager-default.js.map +1 -0
- package/lib/features/helper-lines/helper-line-manager.d.ts +21 -0
- package/lib/features/helper-lines/helper-line-manager.d.ts.map +1 -0
- package/lib/features/helper-lines/helper-line-manager.js +3 -0
- package/lib/features/helper-lines/helper-line-manager.js.map +1 -0
- package/lib/features/helper-lines/helper-line-module.d.ts +18 -0
- package/lib/features/helper-lines/helper-line-module.d.ts.map +1 -0
- package/lib/features/helper-lines/helper-line-module.js +39 -0
- package/lib/features/helper-lines/helper-line-module.js.map +1 -0
- package/lib/features/helper-lines/index.d.ts +22 -0
- package/lib/features/helper-lines/index.d.ts.map +1 -0
- package/lib/features/helper-lines/index.js +38 -0
- package/lib/features/helper-lines/index.js.map +1 -0
- package/lib/features/helper-lines/model.d.ts +62 -0
- package/lib/features/helper-lines/model.d.ts.map +1 -0
- package/lib/features/helper-lines/model.js +123 -0
- package/lib/features/helper-lines/model.js.map +1 -0
- package/lib/features/helper-lines/view.d.ts +25 -0
- package/lib/features/helper-lines/view.d.ts.map +1 -0
- package/lib/features/helper-lines/view.js +52 -0
- package/lib/features/helper-lines/view.js.map +1 -0
- package/lib/features/hints/index.d.ts +19 -0
- package/lib/features/hints/index.d.ts.map +1 -0
- package/lib/features/hints/index.js +35 -0
- package/lib/features/hints/index.js.map +1 -0
- package/lib/features/hover/index.d.ts +18 -0
- package/lib/features/hover/index.d.ts.map +1 -0
- package/lib/features/hover/index.js +34 -0
- package/lib/features/hover/index.js.map +1 -0
- package/lib/features/index.d.ts +43 -0
- package/lib/features/index.d.ts.map +1 -0
- package/lib/features/index.js +59 -0
- package/lib/features/index.js.map +1 -0
- package/lib/features/label-edit/index.d.ts +19 -0
- package/lib/features/label-edit/index.d.ts.map +1 -0
- package/lib/features/label-edit/index.js +35 -0
- package/lib/features/label-edit/index.js.map +1 -0
- package/lib/features/layout/index.d.ts +18 -0
- package/lib/features/layout/index.d.ts.map +1 -0
- package/lib/features/layout/index.js +34 -0
- package/lib/features/layout/index.js.map +1 -0
- package/lib/features/navigation/index.d.ts +19 -0
- package/lib/features/navigation/index.d.ts.map +1 -0
- package/lib/features/navigation/index.js +35 -0
- package/lib/features/navigation/index.js.map +1 -0
- package/lib/features/reconnect/index.d.ts +17 -0
- package/lib/features/reconnect/index.d.ts.map +1 -0
- package/lib/features/reconnect/index.js +33 -0
- package/lib/features/reconnect/index.js.map +1 -0
- package/lib/features/routing/index.d.ts +18 -0
- package/lib/features/routing/index.d.ts.map +1 -0
- package/lib/features/routing/index.js +34 -0
- package/lib/features/routing/index.js.map +1 -0
- package/lib/features/save/index.d.ts +18 -0
- package/lib/features/save/index.d.ts.map +1 -0
- package/lib/features/save/index.js +34 -0
- package/lib/features/save/index.js.map +1 -0
- package/lib/features/select/index.d.ts +19 -0
- package/lib/features/select/index.d.ts.map +1 -0
- package/lib/features/select/index.js +35 -0
- package/lib/features/select/index.js.map +1 -0
- package/lib/features/source-model-watcher/index.d.ts +18 -0
- package/lib/features/source-model-watcher/index.d.ts.map +1 -0
- package/lib/features/source-model-watcher/index.js +34 -0
- package/lib/features/source-model-watcher/index.js.map +1 -0
- package/lib/features/source-model-watcher/{source-model-wacher-module.d.ts → source-model-watcher-module.d.ts} +1 -1
- package/lib/features/source-model-watcher/source-model-watcher-module.d.ts.map +1 -0
- package/lib/features/source-model-watcher/{source-model-wacher-module.js → source-model-watcher-module.js} +1 -1
- package/lib/features/source-model-watcher/source-model-watcher-module.js.map +1 -0
- package/lib/features/status/index.d.ts +18 -0
- package/lib/features/status/index.d.ts.map +1 -0
- package/lib/features/status/index.js +34 -0
- package/lib/features/status/index.js.map +1 -0
- package/lib/features/svg-metadata/index.d.ts +18 -0
- package/lib/features/svg-metadata/index.d.ts.map +1 -0
- package/lib/features/svg-metadata/index.js +34 -0
- package/lib/features/svg-metadata/index.js.map +1 -0
- package/lib/features/tool-palette/index.d.ts +18 -0
- package/lib/features/tool-palette/index.d.ts.map +1 -0
- package/lib/features/tool-palette/index.js +34 -0
- package/lib/features/tool-palette/index.js.map +1 -0
- package/lib/features/tools/change-bounds/change-bounds-tool-feedback.d.ts +28 -12
- package/lib/features/tools/change-bounds/change-bounds-tool-feedback.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-feedback.js +91 -51
- package/lib/features/tools/change-bounds/change-bounds-tool-feedback.js.map +1 -1
- package/lib/features/tools/change-bounds/{change-boounds-tool-module.d.ts → change-bounds-tool-module.d.ts} +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-module.d.ts.map +1 -0
- package/lib/features/tools/change-bounds/{change-boounds-tool-module.js → change-bounds-tool-module.js} +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-module.js.map +1 -0
- package/lib/features/tools/change-bounds/change-bounds-tool.d.ts +4 -4
- package/lib/features/tools/change-bounds/change-bounds-tool.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool.js +11 -13
- package/lib/features/tools/change-bounds/change-bounds-tool.js.map +1 -1
- package/lib/features/tools/change-bounds/index.d.ts +20 -0
- package/lib/features/tools/change-bounds/index.d.ts.map +1 -0
- package/lib/features/tools/change-bounds/index.js +36 -0
- package/lib/features/tools/change-bounds/index.js.map +1 -0
- package/lib/features/tools/deletion/index.d.ts +18 -0
- package/lib/features/tools/deletion/index.d.ts.map +1 -0
- package/lib/features/tools/deletion/index.js +34 -0
- package/lib/features/tools/deletion/index.js.map +1 -0
- package/lib/features/tools/edge-creation/index.d.ts +21 -0
- package/lib/features/tools/edge-creation/index.d.ts.map +1 -0
- package/lib/features/tools/edge-creation/index.js +37 -0
- package/lib/features/tools/edge-creation/index.js.map +1 -0
- package/lib/features/tools/edge-edit/edge-edit-tool-feedback.d.ts +20 -6
- package/lib/features/tools/edge-edit/edge-edit-tool-feedback.d.ts.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-tool-feedback.js +10 -14
- package/lib/features/tools/edge-edit/edge-edit-tool-feedback.js.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-tool.d.ts +18 -2
- package/lib/features/tools/edge-edit/edge-edit-tool.d.ts.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-tool.js +6 -6
- package/lib/features/tools/edge-edit/edge-edit-tool.js.map +1 -1
- package/lib/features/tools/edge-edit/index.d.ts +19 -0
- package/lib/features/tools/edge-edit/index.d.ts.map +1 -0
- package/lib/features/tools/edge-edit/index.js +35 -0
- package/lib/features/tools/edge-edit/index.js.map +1 -0
- package/lib/features/tools/index.d.ts +24 -0
- package/lib/features/tools/index.d.ts.map +1 -0
- package/lib/features/tools/index.js +40 -0
- package/lib/features/tools/index.js.map +1 -0
- package/lib/features/tools/marquee-selection/index.d.ts +23 -0
- package/lib/features/tools/marquee-selection/index.d.ts.map +1 -0
- package/lib/features/tools/marquee-selection/index.js +39 -0
- package/lib/features/tools/marquee-selection/index.js.map +1 -0
- package/lib/features/tools/marquee-selection/marquee-tool.d.ts +20 -1
- package/lib/features/tools/marquee-selection/marquee-tool.d.ts.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-tool.js +19 -7
- package/lib/features/tools/marquee-selection/marquee-tool.js.map +1 -1
- package/lib/features/tools/node-creation/index.d.ts +18 -0
- package/lib/features/tools/node-creation/index.d.ts.map +1 -0
- package/lib/features/tools/node-creation/index.js +34 -0
- package/lib/features/tools/node-creation/index.js.map +1 -0
- package/lib/features/tools/node-creation/node-creation-tool.d.ts +3 -2
- package/lib/features/tools/node-creation/node-creation-tool.d.ts.map +1 -1
- package/lib/features/tools/node-creation/node-creation-tool.js +11 -15
- package/lib/features/tools/node-creation/node-creation-tool.js.map +1 -1
- package/lib/features/undo-redo/index.d.ts +18 -0
- package/lib/features/undo-redo/index.d.ts.map +1 -0
- package/lib/features/undo-redo/index.js +34 -0
- package/lib/features/undo-redo/index.js.map +1 -0
- package/lib/features/validation/index.d.ts +20 -0
- package/lib/features/validation/index.d.ts.map +1 -0
- package/lib/features/validation/index.js +36 -0
- package/lib/features/validation/index.js.map +1 -0
- package/lib/features/viewport/index.d.ts +20 -0
- package/lib/features/viewport/index.d.ts.map +1 -0
- package/lib/features/viewport/index.js +36 -0
- package/lib/features/viewport/index.js.map +1 -0
- package/lib/index.d.ts +5 -139
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +19 -157
- package/lib/index.js.map +1 -1
- package/lib/re-exports.d.ts +17 -0
- package/lib/re-exports.d.ts.map +1 -0
- package/lib/re-exports.js +33 -0
- package/lib/re-exports.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/geometry-util.d.ts +38 -0
- package/lib/utils/geometry-util.d.ts.map +1 -0
- package/lib/utils/geometry-util.js +103 -0
- package/lib/utils/geometry-util.js.map +1 -0
- package/lib/utils/gmodel-util.d.ts +3 -1
- package/lib/utils/gmodel-util.d.ts.map +1 -1
- package/lib/utils/gmodel-util.js +27 -1
- package/lib/utils/gmodel-util.js.map +1 -1
- package/lib/utils/html-utils.d.ts +1 -15
- package/lib/utils/html-utils.d.ts.map +1 -1
- package/lib/utils/html-utils.js +6 -1
- package/lib/utils/html-utils.js.map +1 -1
- package/lib/utils/index.d.ts +23 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +39 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/viewpoint-util.d.ts +1 -0
- package/lib/utils/viewpoint-util.d.ts.map +1 -1
- package/lib/utils/viewpoint-util.js +8 -1
- package/lib/utils/viewpoint-util.js.map +1 -1
- package/lib/views/index.d.ts +2 -2
- package/lib/views/index.d.ts.map +1 -1
- package/lib/views/index.js +2 -2
- package/lib/views/index.js.map +1 -1
- package/package.json +3 -3
- package/src/base/auto-complete/index.ts +20 -0
- package/src/base/feedback/index.ts +19 -0
- package/src/base/focus/index.ts +17 -0
- package/src/base/index.ts +31 -0
- package/src/base/model/index.ts +19 -0
- package/src/base/tool-manager/index.ts +17 -0
- package/src/base/view/index.ts +18 -0
- package/src/default-modules.ts +2 -2
- package/src/features/accessibility/edge-autocomplete/index.ts +19 -0
- package/src/features/accessibility/element-navigation/index.ts +21 -0
- package/src/features/accessibility/focus-tracker/index.ts +17 -0
- package/src/features/accessibility/index.ts +30 -0
- package/src/features/accessibility/key-shortcut/index.ts +18 -0
- package/src/features/accessibility/keyboard-grid/index.ts +20 -0
- package/src/features/accessibility/keyboard-pointer/index.ts +21 -0
- package/src/features/accessibility/keyboard-tool-palette/index.ts +17 -0
- package/src/features/accessibility/move-zoom/index.ts +18 -0
- package/src/features/accessibility/resize-key-tool/index.ts +18 -0
- package/src/features/accessibility/search/index.ts +18 -0
- package/src/features/accessibility/toast/index.ts +18 -0
- package/src/features/accessibility/view-key-tools/index.ts +19 -0
- package/src/features/accessibility/view-key-tools/movement-key-tool.ts +15 -19
- package/src/features/bounds/bounds-module.ts +5 -2
- package/src/features/bounds/index.ts +23 -0
- package/src/features/bounds/local-bounds.ts +7 -1
- package/src/features/bounds/set-bounds-feedback-command.ts +1 -1
- package/src/features/change-bounds/index.ts +20 -0
- package/src/features/change-bounds/model.ts +18 -2
- package/src/features/change-bounds/point-position-updater.ts +120 -0
- package/src/features/change-bounds/position-snapper.ts +69 -0
- package/src/features/change-bounds/snap.spec.ts +3 -2
- package/src/features/change-bounds/snap.ts +8 -82
- package/src/features/command-palette/index.ts +18 -0
- package/src/features/context-menu/index.ts +19 -0
- package/src/features/copy-paste/index.ts +19 -0
- package/src/features/decoration/index.ts +17 -0
- package/src/features/element-template/index.ts +19 -0
- package/src/features/element-template/mouse-tracking-element-position-listener.ts +29 -22
- package/src/features/export/index.ts +18 -0
- package/src/features/helper-lines/helper-line-feedback.ts +269 -0
- package/src/features/helper-lines/helper-line-manager-default.ts +114 -0
- package/src/features/helper-lines/helper-line-manager.ts +21 -0
- package/src/features/helper-lines/helper-line-module.ts +47 -0
- package/src/features/helper-lines/index.ts +21 -0
- package/src/features/helper-lines/model.ts +140 -0
- package/src/features/helper-lines/view.tsx +60 -0
- package/src/features/hints/index.ts +18 -0
- package/src/features/hover/index.ts +17 -0
- package/src/features/index.ts +42 -0
- package/src/features/label-edit/index.ts +18 -0
- package/src/features/layout/index.ts +17 -0
- package/src/features/navigation/index.ts +18 -0
- package/src/features/reconnect/index.ts +16 -0
- package/src/features/routing/index.ts +17 -0
- package/src/features/save/index.ts +17 -0
- package/src/features/select/index.ts +18 -0
- package/src/features/source-model-watcher/index.ts +17 -0
- package/src/features/status/index.ts +17 -0
- package/src/features/svg-metadata/index.ts +17 -0
- package/src/features/tool-palette/index.ts +17 -0
- package/src/features/tools/change-bounds/change-bounds-tool-feedback.ts +99 -69
- package/src/features/tools/change-bounds/change-bounds-tool.ts +12 -11
- package/src/features/tools/change-bounds/index.ts +19 -0
- package/src/features/tools/deletion/index.ts +17 -0
- package/src/features/tools/edge-creation/index.ts +20 -0
- package/src/features/tools/edge-edit/edge-edit-tool-feedback.ts +20 -21
- package/src/features/tools/edge-edit/edge-edit-tool.ts +5 -6
- package/src/features/tools/edge-edit/index.ts +18 -0
- package/src/features/tools/index.ts +23 -0
- package/src/features/tools/marquee-selection/index.ts +22 -0
- package/src/features/tools/marquee-selection/marquee-tool.ts +14 -4
- package/src/features/tools/node-creation/index.ts +17 -0
- package/src/features/tools/node-creation/node-creation-tool.ts +9 -13
- package/src/features/undo-redo/index.ts +17 -0
- package/src/features/validation/index.ts +19 -0
- package/src/features/viewport/index.ts +19 -0
- package/src/index.ts +5 -147
- package/src/re-exports.ts +16 -0
- package/src/utils/geometry-util.ts +101 -0
- package/src/utils/gmodel-util.ts +41 -10
- package/src/utils/html-utils.ts +6 -0
- package/src/utils/index.ts +22 -0
- package/src/utils/viewpoint-util.ts +8 -0
- package/src/views/index.ts +2 -2
- package/lib/features/source-model-watcher/source-model-wacher-module.d.ts.map +0 -1
- package/lib/features/source-model-watcher/source-model-wacher-module.js.map +0 -1
- package/lib/features/tools/change-bounds/change-boounds-tool-module.d.ts.map +0 -1
- package/lib/features/tools/change-bounds/change-boounds-tool-module.js.map +0 -1
- /package/src/features/source-model-watcher/{source-model-wacher-module.ts → source-model-watcher-module.ts} +0 -0
- /package/src/features/tools/change-bounds/{change-boounds-tool-module.ts → change-bounds-tool-module.ts} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './model';
|
|
17
|
+
export * from './type-hint-provider';
|
|
18
|
+
export * from './type-hints-module';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './hover-module';
|
|
17
|
+
export * from './hover';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './accessibility';
|
|
17
|
+
export * from './bounds';
|
|
18
|
+
export * from './change-bounds';
|
|
19
|
+
export * from './command-palette';
|
|
20
|
+
export * from './context-menu';
|
|
21
|
+
export * from './copy-paste';
|
|
22
|
+
export * from './decoration';
|
|
23
|
+
export * from './element-template';
|
|
24
|
+
export * from './export';
|
|
25
|
+
export * from './helper-lines';
|
|
26
|
+
export * from './hints';
|
|
27
|
+
export * from './hover';
|
|
28
|
+
export * from './label-edit';
|
|
29
|
+
export * from './layout';
|
|
30
|
+
export * from './navigation';
|
|
31
|
+
export * from './reconnect';
|
|
32
|
+
export * from './routing';
|
|
33
|
+
export * from './save';
|
|
34
|
+
export * from './select';
|
|
35
|
+
export * from './source-model-watcher';
|
|
36
|
+
export * from './status';
|
|
37
|
+
export * from './svg-metadata';
|
|
38
|
+
export * from './tool-palette';
|
|
39
|
+
export * from './tools';
|
|
40
|
+
export * from './undo-redo';
|
|
41
|
+
export * from './validation';
|
|
42
|
+
export * from './viewport';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './edit-label-tool';
|
|
17
|
+
export * from './edit-label-validator';
|
|
18
|
+
export * from './label-edit-module';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './layout-elements-action';
|
|
17
|
+
export * from './layout-module';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './navigation-action-handler';
|
|
17
|
+
export * from './navigation-module';
|
|
18
|
+
export * from './navigation-target-resolver';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './model';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './glsp-manhattan-edge-router';
|
|
17
|
+
export * from './routing-module';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './save-keylistener';
|
|
17
|
+
export * from './save-module';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './select-feedback-command';
|
|
17
|
+
export * from './select-module';
|
|
18
|
+
export * from './select-mouse-listener';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './source-model-changed-action-handler';
|
|
17
|
+
export * from './source-model-watcher-module';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './status-module';
|
|
17
|
+
export * from './status-overlay';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './metadata-placer';
|
|
17
|
+
export * from './svg-metadata-module';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
3
|
+
*
|
|
4
|
+
* This program and the accompanying materials are made available under the
|
|
5
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
*
|
|
8
|
+
* This Source Code may also be made available under the following Secondary
|
|
9
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
* with the GNU Classpath Exception which is available at
|
|
12
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
*
|
|
14
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
|
+
********************************************************************************/
|
|
16
|
+
export * from './tool-palette-module';
|
|
17
|
+
export * from './tool-palette';
|
|
@@ -22,24 +22,24 @@ import {
|
|
|
22
22
|
GChildElement,
|
|
23
23
|
GModelElement,
|
|
24
24
|
GModelRoot,
|
|
25
|
-
MouseListener,
|
|
26
25
|
MoveAction,
|
|
27
26
|
Point,
|
|
28
27
|
TYPES,
|
|
29
28
|
findParentByFeature,
|
|
30
29
|
hasStringProp,
|
|
31
30
|
isMoveable,
|
|
32
|
-
isSelectable
|
|
33
|
-
isViewport
|
|
31
|
+
isSelectable
|
|
34
32
|
} from '@eclipse-glsp/sprotty';
|
|
35
33
|
import { inject, injectable } from 'inversify';
|
|
36
|
-
import { VNode } from 'snabbdom';
|
|
37
34
|
|
|
35
|
+
import { DebouncedFunc, debounce } from 'lodash';
|
|
36
|
+
import { DragAwareMouseListener } from '../../../base/drag-aware-mouse-listener';
|
|
38
37
|
import { CursorCSS, cursorFeedbackAction } from '../../../base/feedback/css-feedback';
|
|
39
38
|
import { FeedbackCommand } from '../../../base/feedback/feedback-command';
|
|
40
39
|
import { forEachElement } from '../../../utils/gmodel-util';
|
|
41
40
|
import { SResizeHandle, addResizeHandles, isResizable, removeResizeHandles } from '../../change-bounds/model';
|
|
42
41
|
import { createMovementRestrictionFeedback, removeMovementRestrictionFeedback } from '../../change-bounds/movement-restrictor';
|
|
42
|
+
import { PointPositionUpdater } from '../../change-bounds/point-position-updater';
|
|
43
43
|
import { ChangeBoundsTool } from './change-bounds-tool';
|
|
44
44
|
|
|
45
45
|
export interface ShowChangeBoundsToolResizeFeedbackAction extends Action {
|
|
@@ -113,6 +113,38 @@ export class HideChangeBoundsToolResizeFeedbackCommand extends FeedbackCommand {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
export interface MoveInitializedEventAction extends Action {
|
|
117
|
+
kind: typeof MoveInitializedEventAction.KIND;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export namespace MoveInitializedEventAction {
|
|
121
|
+
export const KIND = 'move-initialized-event';
|
|
122
|
+
|
|
123
|
+
export function is(object: any): object is MoveInitializedEventAction {
|
|
124
|
+
return Action.hasKind(object, KIND);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function create(): MoveInitializedEventAction {
|
|
128
|
+
return { kind: KIND };
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface MoveFinishedEventAction extends Action {
|
|
133
|
+
kind: typeof MoveFinishedEventAction.KIND;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export namespace MoveFinishedEventAction {
|
|
137
|
+
export const KIND = 'move-finished-event';
|
|
138
|
+
|
|
139
|
+
export function is(object: any): object is MoveFinishedEventAction {
|
|
140
|
+
return Action.hasKind(object, KIND);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function create(): MoveFinishedEventAction {
|
|
144
|
+
return { kind: KIND };
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
116
148
|
/**
|
|
117
149
|
* This mouse listener provides visual feedback for moving by sending client-side
|
|
118
150
|
* `MoveAction`s while elements are selected and dragged. This will also update
|
|
@@ -120,45 +152,57 @@ export class HideChangeBoundsToolResizeFeedbackCommand extends FeedbackCommand {
|
|
|
120
152
|
* the visual feedback but also the basis for sending the change to the server
|
|
121
153
|
* (see also `tools/MoveTool`).
|
|
122
154
|
*/
|
|
123
|
-
export class FeedbackMoveMouseListener extends
|
|
124
|
-
protected hasDragged = false;
|
|
155
|
+
export class FeedbackMoveMouseListener extends DragAwareMouseListener implements Disposable {
|
|
125
156
|
protected rootElement?: GModelRoot;
|
|
126
|
-
protected
|
|
157
|
+
protected positionUpdater;
|
|
127
158
|
protected elementId2startPos = new Map<string, Point>();
|
|
159
|
+
protected pendingMoveInitialized?: DebouncedFunc<() => void>;
|
|
128
160
|
|
|
129
161
|
constructor(protected tool: ChangeBoundsTool) {
|
|
130
162
|
super();
|
|
163
|
+
this.positionUpdater = new PointPositionUpdater(tool.positionSnapper);
|
|
131
164
|
}
|
|
132
165
|
|
|
133
166
|
override mouseDown(target: GModelElement, event: MouseEvent): Action[] {
|
|
134
167
|
if (event.button === 0 && !(target instanceof SResizeHandle)) {
|
|
135
168
|
const moveable = findParentByFeature(target, isMoveable);
|
|
136
|
-
if (moveable !== undefined) {
|
|
137
|
-
this.
|
|
169
|
+
if (moveable !== undefined && !(target instanceof SResizeHandle)) {
|
|
170
|
+
this.positionUpdater.updateLastDragPosition(event);
|
|
171
|
+
this.scheduleMoveInitialized();
|
|
138
172
|
} else {
|
|
139
|
-
this.
|
|
173
|
+
this.positionUpdater.resetPosition();
|
|
140
174
|
}
|
|
141
|
-
this.
|
|
175
|
+
this._isMouseDrag = false;
|
|
142
176
|
}
|
|
143
177
|
return [];
|
|
144
178
|
}
|
|
145
179
|
|
|
180
|
+
protected scheduleMoveInitialized(): void {
|
|
181
|
+
this.pendingMoveInitialized?.cancel();
|
|
182
|
+
this.pendingMoveInitialized = debounce(() => {
|
|
183
|
+
this.tool.registerFeedback([MoveInitializedEventAction.create()], this);
|
|
184
|
+
this.pendingMoveInitialized = undefined;
|
|
185
|
+
}, 750);
|
|
186
|
+
this.pendingMoveInitialized();
|
|
187
|
+
}
|
|
188
|
+
|
|
146
189
|
override mouseMove(target: GModelElement, event: MouseEvent): Action[] {
|
|
147
190
|
const result: Action[] = [];
|
|
148
191
|
if (event.buttons === 0) {
|
|
149
192
|
this.mouseUp(target, event);
|
|
150
|
-
} else if (this.
|
|
193
|
+
} else if (!this.positionUpdater.isLastDragPositionUndefined()) {
|
|
194
|
+
this.pendingMoveInitialized?.cancel();
|
|
151
195
|
if (this.elementId2startPos.size === 0) {
|
|
152
196
|
this.collectStartPositions(target.root);
|
|
153
197
|
}
|
|
154
|
-
this.
|
|
198
|
+
this._isMouseDrag = true;
|
|
155
199
|
const moveAction = this.getElementMoves(target, event, false);
|
|
156
200
|
if (moveAction) {
|
|
157
201
|
result.push(moveAction);
|
|
158
202
|
result.push(cursorFeedbackAction(CursorCSS.MOVE));
|
|
203
|
+
this.tool.registerFeedback(result, this);
|
|
159
204
|
}
|
|
160
205
|
}
|
|
161
|
-
this.tool.registerFeedback(result, this);
|
|
162
206
|
return [];
|
|
163
207
|
}
|
|
164
208
|
|
|
@@ -186,18 +230,11 @@ export class FeedbackMoveMouseListener extends MouseListener implements Disposab
|
|
|
186
230
|
}
|
|
187
231
|
|
|
188
232
|
protected getElementMoves(target: GModelElement, event: MouseEvent, finished: boolean): MoveAction | undefined {
|
|
189
|
-
|
|
233
|
+
const delta = this.positionUpdater.updatePosition(target, event);
|
|
234
|
+
if (!delta) {
|
|
190
235
|
return undefined;
|
|
191
236
|
}
|
|
192
|
-
|
|
193
|
-
const viewport = findParentByFeature(target, isViewport);
|
|
194
|
-
const zoom = viewport ? viewport.zoom : 1;
|
|
195
|
-
const delta = {
|
|
196
|
-
x: (event.pageX - this.startDragPosition.x) / zoom,
|
|
197
|
-
y: (event.pageY - this.startDragPosition.y) / zoom
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
const elementMoves: ElementMove[] = this.getElementMovesForDelta(target, delta, !event.altKey, finished);
|
|
237
|
+
const elementMoves: ElementMove[] = this.getElementMovesForDelta(target, delta, finished);
|
|
201
238
|
if (elementMoves.length > 0) {
|
|
202
239
|
return MoveAction.create(elementMoves, { animate: false, finished });
|
|
203
240
|
} else {
|
|
@@ -205,35 +242,15 @@ export class FeedbackMoveMouseListener extends MouseListener implements Disposab
|
|
|
205
242
|
}
|
|
206
243
|
}
|
|
207
244
|
|
|
208
|
-
protected getElementMovesForDelta(
|
|
209
|
-
target: GModelElement,
|
|
210
|
-
delta: { x: number; y: number },
|
|
211
|
-
isSnap: boolean,
|
|
212
|
-
finished: boolean
|
|
213
|
-
): ElementMove[] {
|
|
245
|
+
protected getElementMovesForDelta(target: GModelElement, delta: Point, finished: boolean): ElementMove[] {
|
|
214
246
|
const elementMoves: ElementMove[] = [];
|
|
215
247
|
this.elementId2startPos.forEach((startPosition, elementId) => {
|
|
216
248
|
const element = target.root.index.getById(elementId);
|
|
217
249
|
if (element) {
|
|
218
|
-
let toPosition = this.snap(
|
|
219
|
-
{
|
|
220
|
-
x: startPosition.x + delta.x,
|
|
221
|
-
y: startPosition.y + delta.y
|
|
222
|
-
},
|
|
223
|
-
element,
|
|
224
|
-
isSnap
|
|
225
|
-
);
|
|
226
|
-
|
|
227
250
|
if (isMoveable(element)) {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
fromPosition: {
|
|
232
|
-
x: element.position.x,
|
|
233
|
-
y: element.position.y
|
|
234
|
-
},
|
|
235
|
-
toPosition
|
|
236
|
-
});
|
|
251
|
+
const targetPosition = Point.add(element.position, delta);
|
|
252
|
+
const toPosition = this.validateMove(startPosition, targetPosition, element, finished);
|
|
253
|
+
elementMoves.push({ elementId: element.id, fromPosition: element.position, toPosition });
|
|
237
254
|
}
|
|
238
255
|
}
|
|
239
256
|
});
|
|
@@ -247,7 +264,6 @@ export class FeedbackMoveMouseListener extends MouseListener implements Disposab
|
|
|
247
264
|
let action;
|
|
248
265
|
if (!valid) {
|
|
249
266
|
action = createMovementRestrictionFeedback(element, this.tool.movementRestrictor);
|
|
250
|
-
|
|
251
267
|
if (isFinished) {
|
|
252
268
|
newPosition = startPosition;
|
|
253
269
|
}
|
|
@@ -259,24 +275,24 @@ export class FeedbackMoveMouseListener extends MouseListener implements Disposab
|
|
|
259
275
|
return newPosition;
|
|
260
276
|
}
|
|
261
277
|
|
|
262
|
-
protected snap(position: Point, element: GModelElement, isSnap: boolean): Point {
|
|
263
|
-
if (isSnap && this.tool.snapper) {
|
|
264
|
-
return this.tool.snapper.snap(position, element);
|
|
265
|
-
} else {
|
|
266
|
-
return position;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
278
|
override mouseEnter(target: GModelElement, event: MouseEvent): Action[] {
|
|
271
|
-
if (target instanceof GModelRoot && event.buttons === 0 &&
|
|
279
|
+
if (target instanceof GModelRoot && event.buttons === 0 && this.positionUpdater.isLastDragPositionUndefined()) {
|
|
272
280
|
this.mouseUp(target, event);
|
|
273
281
|
}
|
|
274
282
|
return [];
|
|
275
283
|
}
|
|
276
284
|
|
|
277
|
-
override
|
|
285
|
+
override nonDraggingMouseUp(element: GModelElement, event: MouseEvent): Action[] {
|
|
286
|
+
this.reset(true);
|
|
287
|
+
return [];
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
override draggingMouseUp(target: GModelElement, event: MouseEvent): Action[] {
|
|
278
291
|
const result: Action[] = [];
|
|
279
|
-
if (this.
|
|
292
|
+
if (this.positionUpdater.isLastDragPositionUndefined()) {
|
|
293
|
+
this.reset(true);
|
|
294
|
+
return result;
|
|
295
|
+
} else {
|
|
280
296
|
const moveAction = this.getElementMoves(target, event, true);
|
|
281
297
|
if (moveAction) {
|
|
282
298
|
result.push(moveAction);
|
|
@@ -292,22 +308,36 @@ export class FeedbackMoveMouseListener extends MouseListener implements Disposab
|
|
|
292
308
|
return result;
|
|
293
309
|
}
|
|
294
310
|
|
|
311
|
+
protected resetMoveFeedback(): ElementMove[] {
|
|
312
|
+
const elementMoves: ElementMove[] = [];
|
|
313
|
+
this.elementId2startPos.forEach((startPosition, elementId) => {
|
|
314
|
+
const element = this.rootElement!.index.getById(elementId);
|
|
315
|
+
if (element) {
|
|
316
|
+
if (isMoveable(element)) {
|
|
317
|
+
elementMoves.push({ elementId: element.id, fromPosition: element.position, toPosition: startPosition });
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
return elementMoves;
|
|
322
|
+
}
|
|
323
|
+
|
|
295
324
|
protected reset(resetFeedback = false): void {
|
|
325
|
+
this.pendingMoveInitialized?.cancel();
|
|
296
326
|
if (this.rootElement && resetFeedback) {
|
|
297
|
-
const elementMoves: ElementMove[] = this.
|
|
298
|
-
|
|
299
|
-
|
|
327
|
+
const elementMoves: ElementMove[] = this.resetMoveFeedback();
|
|
328
|
+
if (elementMoves.length > 0) {
|
|
329
|
+
const moveAction = MoveAction.create(elementMoves, { animate: false, finished: true });
|
|
330
|
+
this.tool.deregisterFeedback(this, [moveAction]);
|
|
331
|
+
}
|
|
332
|
+
} else if (resetFeedback) {
|
|
333
|
+
this.tool.deregisterFeedback(this, [MoveFinishedEventAction.create()]);
|
|
300
334
|
}
|
|
301
|
-
this.
|
|
302
|
-
this.
|
|
335
|
+
this.positionUpdater.resetPosition();
|
|
336
|
+
this._isMouseDrag = false;
|
|
303
337
|
this.rootElement = undefined;
|
|
304
338
|
this.elementId2startPos.clear();
|
|
305
339
|
}
|
|
306
340
|
|
|
307
|
-
override decorate(vnode: VNode, _element: GModelElement): VNode {
|
|
308
|
-
return vnode;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
341
|
dispose(): void {
|
|
312
342
|
this.reset(true);
|
|
313
343
|
}
|
|
@@ -32,7 +32,6 @@ import {
|
|
|
32
32
|
GModelElement,
|
|
33
33
|
GModelRoot,
|
|
34
34
|
GParentElement,
|
|
35
|
-
ISnapper,
|
|
36
35
|
MouseListener,
|
|
37
36
|
Operation,
|
|
38
37
|
Point,
|
|
@@ -43,7 +42,7 @@ import {
|
|
|
43
42
|
import { DragAwareMouseListener } from '../../../base/drag-aware-mouse-listener';
|
|
44
43
|
import { CursorCSS, applyCssClasses, cursorFeedbackAction, deleteCssClasses } from '../../../base/feedback/css-feedback';
|
|
45
44
|
import { ISelectionListener, SelectionService } from '../../../base/selection-service';
|
|
46
|
-
import { PointPositionUpdater } from '../../../features/change-bounds/
|
|
45
|
+
import { PointPositionUpdater } from '../../../features/change-bounds/point-position-updater';
|
|
47
46
|
import {
|
|
48
47
|
calcElementAndRoutingPoints,
|
|
49
48
|
forEachElement,
|
|
@@ -58,6 +57,8 @@ import {
|
|
|
58
57
|
createMovementRestrictionFeedback,
|
|
59
58
|
removeMovementRestrictionFeedback
|
|
60
59
|
} from '../../change-bounds/movement-restrictor';
|
|
60
|
+
import { PositionSnapper } from '../../change-bounds/position-snapper';
|
|
61
|
+
import { getDirectionFrom } from '../../helper-lines/model';
|
|
61
62
|
import { BaseEditTool } from '../base-tools';
|
|
62
63
|
import {
|
|
63
64
|
FeedbackMoveMouseListener,
|
|
@@ -84,8 +85,8 @@ export class ChangeBoundsTool extends BaseEditTool {
|
|
|
84
85
|
|
|
85
86
|
@inject(SelectionService) protected selectionService: SelectionService;
|
|
86
87
|
@inject(EdgeRouterRegistry) @optional() readonly edgeRouterRegistry?: EdgeRouterRegistry;
|
|
87
|
-
@inject(TYPES.ISnapper) @optional() readonly snapper?: ISnapper;
|
|
88
88
|
@inject(TYPES.IMovementRestrictor) @optional() readonly movementRestrictor?: IMovementRestrictor;
|
|
89
|
+
@inject(PositionSnapper) readonly positionSnapper: PositionSnapper;
|
|
89
90
|
|
|
90
91
|
get id(): string {
|
|
91
92
|
return ChangeBoundsTool.ID;
|
|
@@ -135,7 +136,7 @@ export class ChangeBoundsListener extends DragAwareMouseListener implements ISel
|
|
|
135
136
|
|
|
136
137
|
constructor(protected tool: ChangeBoundsTool) {
|
|
137
138
|
super();
|
|
138
|
-
this.pointPositionUpdater = new PointPositionUpdater(tool.
|
|
139
|
+
this.pointPositionUpdater = new PointPositionUpdater(tool.positionSnapper);
|
|
139
140
|
}
|
|
140
141
|
|
|
141
142
|
override mouseDown(target: GModelElement, event: MouseEvent): Action[] {
|
|
@@ -168,7 +169,11 @@ export class ChangeBoundsListener extends DragAwareMouseListener implements ISel
|
|
|
168
169
|
cursorFeedbackAction(this.activeResizeHandle.isNwSeResize() ? CursorCSS.RESIZE_NWSE : CursorCSS.RESIZE_NESW),
|
|
169
170
|
applyCssClasses(this.activeResizeHandle, ChangeBoundsListener.CSS_CLASS_ACTIVE)
|
|
170
171
|
];
|
|
171
|
-
const positionUpdate = this.pointPositionUpdater.updatePosition(
|
|
172
|
+
const positionUpdate = this.pointPositionUpdater.updatePosition(
|
|
173
|
+
target,
|
|
174
|
+
event,
|
|
175
|
+
getDirectionFrom(this.activeResizeHandle.location)
|
|
176
|
+
);
|
|
172
177
|
if (positionUpdate) {
|
|
173
178
|
const resizeActions = this.handleResizeOnClient(positionUpdate);
|
|
174
179
|
actions.push(...resizeActions);
|
|
@@ -242,7 +247,7 @@ export class ChangeBoundsListener extends DragAwareMouseListener implements ISel
|
|
|
242
247
|
const newRoutingPoints: ElementAndRoutingPoints[] = [];
|
|
243
248
|
const routerRegistry = this.tool.edgeRouterRegistry;
|
|
244
249
|
if (routerRegistry) {
|
|
245
|
-
// If client routing is enabled -> delegate
|
|
250
|
+
// If client routing is enabled -> delegate routing points of connected edges to server
|
|
246
251
|
forEachElement(target.index, isNonRoutableSelectedMovableBoundsAware, element => {
|
|
247
252
|
if (element instanceof GConnectableElement) {
|
|
248
253
|
element.incomingEdges
|
|
@@ -308,7 +313,7 @@ export class ChangeBoundsListener extends DragAwareMouseListener implements ISel
|
|
|
308
313
|
}
|
|
309
314
|
|
|
310
315
|
protected initPosition(event: MouseEvent): void {
|
|
311
|
-
this.pointPositionUpdater.updateLastDragPosition(
|
|
316
|
+
this.pointPositionUpdater.updateLastDragPosition(event);
|
|
312
317
|
if (this.activeResizeHandle) {
|
|
313
318
|
const resizeElement = findParentByFeature(this.activeResizeHandle, isResizable);
|
|
314
319
|
this.initialBounds = {
|
|
@@ -459,10 +464,6 @@ export class ChangeBoundsListener extends DragAwareMouseListener implements ISel
|
|
|
459
464
|
return result;
|
|
460
465
|
}
|
|
461
466
|
|
|
462
|
-
protected snap(position: Point, element: GModelElement, isSnap: boolean): Point {
|
|
463
|
-
return isSnap && this.tool.snapper ? this.tool.snapper.snap(position, element) : { x: position.x, y: position.y };
|
|
464
|
-
}
|
|
465
|
-
|
|
466
467
|
protected isValidBoundChange(element: GModelElement & BoundsAware, newPosition: Point, newSize: Dimension): boolean {
|
|
467
468
|
return this.isValidSize(element, newSize) && this.isValidMove(element, newPosition);
|
|
468
469
|
}
|