@eclipse-glsp/client 2.1.0-next.301 → 2.1.0-next.302
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,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/********************************************************************************
|
|
18
|
+
* Copyright (c) 2023 EclipseSource and others.
|
|
19
|
+
*
|
|
20
|
+
* This program and the accompanying materials are made available under the
|
|
21
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
22
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
23
|
+
*
|
|
24
|
+
* This Source Code may also be made available under the following Secondary
|
|
25
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
26
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
27
|
+
* with the GNU Classpath Exception which is available at
|
|
28
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
29
|
+
*
|
|
30
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
31
|
+
********************************************************************************/
|
|
32
|
+
__exportStar(require("./tool-palette-module"), exports);
|
|
33
|
+
__exportStar(require("./tool-palette"), exports);
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/tool-palette/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,wDAAsC;AACtC,iDAA+B"}
|
|
@@ -13,9 +13,11 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { Action, CommandExecutionContext, CommandReturn, Disposable, ElementMove, GModelElement, GModelRoot,
|
|
17
|
-
import {
|
|
16
|
+
import { Action, CommandExecutionContext, CommandReturn, Disposable, ElementMove, GModelElement, GModelRoot, MoveAction, Point } from '@eclipse-glsp/sprotty';
|
|
17
|
+
import { DebouncedFunc } from 'lodash';
|
|
18
|
+
import { DragAwareMouseListener } from '../../../base/drag-aware-mouse-listener';
|
|
18
19
|
import { FeedbackCommand } from '../../../base/feedback/feedback-command';
|
|
20
|
+
import { PointPositionUpdater } from '../../change-bounds/point-position-updater';
|
|
19
21
|
import { ChangeBoundsTool } from './change-bounds-tool';
|
|
20
22
|
export interface ShowChangeBoundsToolResizeFeedbackAction extends Action {
|
|
21
23
|
kind: typeof ShowChangeBoundsToolResizeFeedbackAction.KIND;
|
|
@@ -44,6 +46,22 @@ export declare class HideChangeBoundsToolResizeFeedbackCommand extends FeedbackC
|
|
|
44
46
|
protected action: HideChangeBoundsToolResizeFeedbackAction;
|
|
45
47
|
execute(context: CommandExecutionContext): CommandReturn;
|
|
46
48
|
}
|
|
49
|
+
export interface MoveInitializedEventAction extends Action {
|
|
50
|
+
kind: typeof MoveInitializedEventAction.KIND;
|
|
51
|
+
}
|
|
52
|
+
export declare namespace MoveInitializedEventAction {
|
|
53
|
+
const KIND = "move-initialized-event";
|
|
54
|
+
function is(object: any): object is MoveInitializedEventAction;
|
|
55
|
+
function create(): MoveInitializedEventAction;
|
|
56
|
+
}
|
|
57
|
+
export interface MoveFinishedEventAction extends Action {
|
|
58
|
+
kind: typeof MoveFinishedEventAction.KIND;
|
|
59
|
+
}
|
|
60
|
+
export declare namespace MoveFinishedEventAction {
|
|
61
|
+
const KIND = "move-finished-event";
|
|
62
|
+
function is(object: any): object is MoveFinishedEventAction;
|
|
63
|
+
function create(): MoveFinishedEventAction;
|
|
64
|
+
}
|
|
47
65
|
/**
|
|
48
66
|
* This mouse listener provides visual feedback for moving by sending client-side
|
|
49
67
|
* `MoveAction`s while elements are selected and dragged. This will also update
|
|
@@ -51,28 +69,26 @@ export declare class HideChangeBoundsToolResizeFeedbackCommand extends FeedbackC
|
|
|
51
69
|
* the visual feedback but also the basis for sending the change to the server
|
|
52
70
|
* (see also `tools/MoveTool`).
|
|
53
71
|
*/
|
|
54
|
-
export declare class FeedbackMoveMouseListener extends
|
|
72
|
+
export declare class FeedbackMoveMouseListener extends DragAwareMouseListener implements Disposable {
|
|
55
73
|
protected tool: ChangeBoundsTool;
|
|
56
|
-
protected hasDragged: boolean;
|
|
57
74
|
protected rootElement?: GModelRoot;
|
|
58
|
-
protected
|
|
75
|
+
protected positionUpdater: PointPositionUpdater;
|
|
59
76
|
protected elementId2startPos: Map<string, Point>;
|
|
77
|
+
protected pendingMoveInitialized?: DebouncedFunc<() => void>;
|
|
60
78
|
constructor(tool: ChangeBoundsTool);
|
|
61
79
|
mouseDown(target: GModelElement, event: MouseEvent): Action[];
|
|
80
|
+
protected scheduleMoveInitialized(): void;
|
|
62
81
|
mouseMove(target: GModelElement, event: MouseEvent): Action[];
|
|
63
82
|
protected collectStartPositions(root: GModelRoot): void;
|
|
64
83
|
protected isChildOfSelected(selectedElements: Set<GModelElement>, element: GModelElement): boolean;
|
|
65
84
|
protected getElementMoves(target: GModelElement, event: MouseEvent, finished: boolean): MoveAction | undefined;
|
|
66
|
-
protected getElementMovesForDelta(target: GModelElement, delta:
|
|
67
|
-
x: number;
|
|
68
|
-
y: number;
|
|
69
|
-
}, isSnap: boolean, finished: boolean): ElementMove[];
|
|
85
|
+
protected getElementMovesForDelta(target: GModelElement, delta: Point, finished: boolean): ElementMove[];
|
|
70
86
|
protected validateMove(startPosition: Point, toPosition: Point, element: GModelElement, isFinished: boolean): Point;
|
|
71
|
-
protected snap(position: Point, element: GModelElement, isSnap: boolean): Point;
|
|
72
87
|
mouseEnter(target: GModelElement, event: MouseEvent): Action[];
|
|
73
|
-
|
|
88
|
+
nonDraggingMouseUp(element: GModelElement, event: MouseEvent): Action[];
|
|
89
|
+
draggingMouseUp(target: GModelElement, event: MouseEvent): Action[];
|
|
90
|
+
protected resetMoveFeedback(): ElementMove[];
|
|
74
91
|
protected reset(resetFeedback?: boolean): void;
|
|
75
|
-
decorate(vnode: VNode, _element: GModelElement): VNode;
|
|
76
92
|
dispose(): void;
|
|
77
93
|
}
|
|
78
94
|
//# sourceMappingURL=change-bounds-tool-feedback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-bounds-tool-feedback.d.ts","sourceRoot":"","sources":["../../../../src/features/tools/change-bounds/change-bounds-tool-feedback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,MAAM,EACN,uBAAuB,EACvB,aAAa,EACb,UAAU,EACV,WAAW,EAEX,aAAa,EACb,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"change-bounds-tool-feedback.d.ts","sourceRoot":"","sources":["../../../../src/features/tools/change-bounds/change-bounds-tool-feedback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,MAAM,EACN,uBAAuB,EACvB,aAAa,EACb,UAAU,EACV,WAAW,EAEX,aAAa,EACb,UAAU,EACV,UAAU,EACV,KAAK,EAMR,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,aAAa,EAAY,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAEjF,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAI1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,WAAW,wCAAyC,SAAQ,MAAM;IACpE,IAAI,EAAE,OAAO,wCAAwC,CAAC,IAAI,CAAC;IAE3D,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,yBAAiB,wCAAwC,CAAC;IAC/C,MAAM,IAAI,uCAAuC,CAAC;IAEzD,SAAgB,EAAE,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,wCAAwC,CAElF;IAED,SAAgB,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,wCAAwC,CAKlF;CACJ;AAED,MAAM,WAAW,wCAAyC,SAAQ,MAAM;IACpE,IAAI,EAAE,OAAO,wCAAwC,CAAC,IAAI,CAAC;CAC9D;AAED,yBAAiB,wCAAwC,CAAC;IAC/C,MAAM,I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AAQ,GAAG,IAAI;IAiB5C,OAAO,IAAI,IAAI;CAGlB"}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.FeedbackMoveMouseListener = exports.HideChangeBoundsToolResizeFeedbackCommand = exports.ShowChangeBoundsToolResizeFeedbackCommand = exports.HideChangeBoundsToolResizeFeedbackAction = exports.ShowChangeBoundsToolResizeFeedbackAction = void 0;
|
|
12
|
+
exports.FeedbackMoveMouseListener = exports.MoveFinishedEventAction = exports.MoveInitializedEventAction = exports.HideChangeBoundsToolResizeFeedbackCommand = exports.ShowChangeBoundsToolResizeFeedbackCommand = exports.HideChangeBoundsToolResizeFeedbackAction = exports.ShowChangeBoundsToolResizeFeedbackAction = void 0;
|
|
13
13
|
/********************************************************************************
|
|
14
14
|
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
15
15
|
*
|
|
@@ -27,11 +27,14 @@ exports.FeedbackMoveMouseListener = exports.HideChangeBoundsToolResizeFeedbackCo
|
|
|
27
27
|
********************************************************************************/
|
|
28
28
|
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
|
+
const lodash_1 = require("lodash");
|
|
31
|
+
const drag_aware_mouse_listener_1 = require("../../../base/drag-aware-mouse-listener");
|
|
30
32
|
const css_feedback_1 = require("../../../base/feedback/css-feedback");
|
|
31
33
|
const feedback_command_1 = require("../../../base/feedback/feedback-command");
|
|
32
34
|
const gmodel_util_1 = require("../../../utils/gmodel-util");
|
|
33
35
|
const model_1 = require("../../change-bounds/model");
|
|
34
36
|
const movement_restrictor_1 = require("../../change-bounds/movement-restrictor");
|
|
37
|
+
const point_position_updater_1 = require("../../change-bounds/point-position-updater");
|
|
35
38
|
var ShowChangeBoundsToolResizeFeedbackAction;
|
|
36
39
|
(function (ShowChangeBoundsToolResizeFeedbackAction) {
|
|
37
40
|
ShowChangeBoundsToolResizeFeedbackAction.KIND = 'showChangeBoundsToolResizeFeedback';
|
|
@@ -97,6 +100,30 @@ __decorate([
|
|
|
97
100
|
exports.HideChangeBoundsToolResizeFeedbackCommand = HideChangeBoundsToolResizeFeedbackCommand = __decorate([
|
|
98
101
|
(0, inversify_1.injectable)()
|
|
99
102
|
], HideChangeBoundsToolResizeFeedbackCommand);
|
|
103
|
+
var MoveInitializedEventAction;
|
|
104
|
+
(function (MoveInitializedEventAction) {
|
|
105
|
+
MoveInitializedEventAction.KIND = 'move-initialized-event';
|
|
106
|
+
function is(object) {
|
|
107
|
+
return sprotty_1.Action.hasKind(object, MoveInitializedEventAction.KIND);
|
|
108
|
+
}
|
|
109
|
+
MoveInitializedEventAction.is = is;
|
|
110
|
+
function create() {
|
|
111
|
+
return { kind: MoveInitializedEventAction.KIND };
|
|
112
|
+
}
|
|
113
|
+
MoveInitializedEventAction.create = create;
|
|
114
|
+
})(MoveInitializedEventAction || (exports.MoveInitializedEventAction = MoveInitializedEventAction = {}));
|
|
115
|
+
var MoveFinishedEventAction;
|
|
116
|
+
(function (MoveFinishedEventAction) {
|
|
117
|
+
MoveFinishedEventAction.KIND = 'move-finished-event';
|
|
118
|
+
function is(object) {
|
|
119
|
+
return sprotty_1.Action.hasKind(object, MoveFinishedEventAction.KIND);
|
|
120
|
+
}
|
|
121
|
+
MoveFinishedEventAction.is = is;
|
|
122
|
+
function create() {
|
|
123
|
+
return { kind: MoveFinishedEventAction.KIND };
|
|
124
|
+
}
|
|
125
|
+
MoveFinishedEventAction.create = create;
|
|
126
|
+
})(MoveFinishedEventAction || (exports.MoveFinishedEventAction = MoveFinishedEventAction = {}));
|
|
100
127
|
/**
|
|
101
128
|
* This mouse listener provides visual feedback for moving by sending client-side
|
|
102
129
|
* `MoveAction`s while elements are selected and dragged. This will also update
|
|
@@ -104,43 +131,55 @@ exports.HideChangeBoundsToolResizeFeedbackCommand = HideChangeBoundsToolResizeFe
|
|
|
104
131
|
* the visual feedback but also the basis for sending the change to the server
|
|
105
132
|
* (see also `tools/MoveTool`).
|
|
106
133
|
*/
|
|
107
|
-
class FeedbackMoveMouseListener extends
|
|
134
|
+
class FeedbackMoveMouseListener extends drag_aware_mouse_listener_1.DragAwareMouseListener {
|
|
108
135
|
constructor(tool) {
|
|
109
136
|
super();
|
|
110
137
|
this.tool = tool;
|
|
111
|
-
this.hasDragged = false;
|
|
112
138
|
this.elementId2startPos = new Map();
|
|
139
|
+
this.positionUpdater = new point_position_updater_1.PointPositionUpdater(tool.positionSnapper);
|
|
113
140
|
}
|
|
114
141
|
mouseDown(target, event) {
|
|
115
142
|
if (event.button === 0 && !(target instanceof model_1.SResizeHandle)) {
|
|
116
143
|
const moveable = (0, sprotty_1.findParentByFeature)(target, sprotty_1.isMoveable);
|
|
117
|
-
if (moveable !== undefined) {
|
|
118
|
-
this.
|
|
144
|
+
if (moveable !== undefined && !(target instanceof model_1.SResizeHandle)) {
|
|
145
|
+
this.positionUpdater.updateLastDragPosition(event);
|
|
146
|
+
this.scheduleMoveInitialized();
|
|
119
147
|
}
|
|
120
148
|
else {
|
|
121
|
-
this.
|
|
149
|
+
this.positionUpdater.resetPosition();
|
|
122
150
|
}
|
|
123
|
-
this.
|
|
151
|
+
this._isMouseDrag = false;
|
|
124
152
|
}
|
|
125
153
|
return [];
|
|
126
154
|
}
|
|
155
|
+
scheduleMoveInitialized() {
|
|
156
|
+
var _a;
|
|
157
|
+
(_a = this.pendingMoveInitialized) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
158
|
+
this.pendingMoveInitialized = (0, lodash_1.debounce)(() => {
|
|
159
|
+
this.tool.registerFeedback([MoveInitializedEventAction.create()], this);
|
|
160
|
+
this.pendingMoveInitialized = undefined;
|
|
161
|
+
}, 750);
|
|
162
|
+
this.pendingMoveInitialized();
|
|
163
|
+
}
|
|
127
164
|
mouseMove(target, event) {
|
|
165
|
+
var _a;
|
|
128
166
|
const result = [];
|
|
129
167
|
if (event.buttons === 0) {
|
|
130
168
|
this.mouseUp(target, event);
|
|
131
169
|
}
|
|
132
|
-
else if (this.
|
|
170
|
+
else if (!this.positionUpdater.isLastDragPositionUndefined()) {
|
|
171
|
+
(_a = this.pendingMoveInitialized) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
133
172
|
if (this.elementId2startPos.size === 0) {
|
|
134
173
|
this.collectStartPositions(target.root);
|
|
135
174
|
}
|
|
136
|
-
this.
|
|
175
|
+
this._isMouseDrag = true;
|
|
137
176
|
const moveAction = this.getElementMoves(target, event, false);
|
|
138
177
|
if (moveAction) {
|
|
139
178
|
result.push(moveAction);
|
|
140
179
|
result.push((0, css_feedback_1.cursorFeedbackAction)(css_feedback_1.CursorCSS.MOVE));
|
|
180
|
+
this.tool.registerFeedback(result, this);
|
|
141
181
|
}
|
|
142
182
|
}
|
|
143
|
-
this.tool.registerFeedback(result, this);
|
|
144
183
|
return [];
|
|
145
184
|
}
|
|
146
185
|
collectStartPositions(root) {
|
|
@@ -165,16 +204,11 @@ class FeedbackMoveMouseListener extends sprotty_1.MouseListener {
|
|
|
165
204
|
return false;
|
|
166
205
|
}
|
|
167
206
|
getElementMoves(target, event, finished) {
|
|
168
|
-
|
|
207
|
+
const delta = this.positionUpdater.updatePosition(target, event);
|
|
208
|
+
if (!delta) {
|
|
169
209
|
return undefined;
|
|
170
210
|
}
|
|
171
|
-
const
|
|
172
|
-
const zoom = viewport ? viewport.zoom : 1;
|
|
173
|
-
const delta = {
|
|
174
|
-
x: (event.pageX - this.startDragPosition.x) / zoom,
|
|
175
|
-
y: (event.pageY - this.startDragPosition.y) / zoom
|
|
176
|
-
};
|
|
177
|
-
const elementMoves = this.getElementMovesForDelta(target, delta, !event.altKey, finished);
|
|
211
|
+
const elementMoves = this.getElementMovesForDelta(target, delta, finished);
|
|
178
212
|
if (elementMoves.length > 0) {
|
|
179
213
|
return sprotty_1.MoveAction.create(elementMoves, { animate: false, finished });
|
|
180
214
|
}
|
|
@@ -182,25 +216,15 @@ class FeedbackMoveMouseListener extends sprotty_1.MouseListener {
|
|
|
182
216
|
return undefined;
|
|
183
217
|
}
|
|
184
218
|
}
|
|
185
|
-
getElementMovesForDelta(target, delta,
|
|
219
|
+
getElementMovesForDelta(target, delta, finished) {
|
|
186
220
|
const elementMoves = [];
|
|
187
221
|
this.elementId2startPos.forEach((startPosition, elementId) => {
|
|
188
222
|
const element = target.root.index.getById(elementId);
|
|
189
223
|
if (element) {
|
|
190
|
-
let toPosition = this.snap({
|
|
191
|
-
x: startPosition.x + delta.x,
|
|
192
|
-
y: startPosition.y + delta.y
|
|
193
|
-
}, element, isSnap);
|
|
194
224
|
if ((0, sprotty_1.isMoveable)(element)) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
fromPosition: {
|
|
199
|
-
x: element.position.x,
|
|
200
|
-
y: element.position.y
|
|
201
|
-
},
|
|
202
|
-
toPosition
|
|
203
|
-
});
|
|
225
|
+
const targetPosition = sprotty_1.Point.add(element.position, delta);
|
|
226
|
+
const toPosition = this.validateMove(startPosition, targetPosition, element, finished);
|
|
227
|
+
elementMoves.push({ elementId: element.id, fromPosition: element.position, toPosition });
|
|
204
228
|
}
|
|
205
229
|
}
|
|
206
230
|
});
|
|
@@ -224,23 +248,23 @@ class FeedbackMoveMouseListener extends sprotty_1.MouseListener {
|
|
|
224
248
|
}
|
|
225
249
|
return newPosition;
|
|
226
250
|
}
|
|
227
|
-
snap(position, element, isSnap) {
|
|
228
|
-
if (isSnap && this.tool.snapper) {
|
|
229
|
-
return this.tool.snapper.snap(position, element);
|
|
230
|
-
}
|
|
231
|
-
else {
|
|
232
|
-
return position;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
251
|
mouseEnter(target, event) {
|
|
236
|
-
if (target instanceof sprotty_1.GModelRoot && event.buttons === 0 &&
|
|
252
|
+
if (target instanceof sprotty_1.GModelRoot && event.buttons === 0 && this.positionUpdater.isLastDragPositionUndefined()) {
|
|
237
253
|
this.mouseUp(target, event);
|
|
238
254
|
}
|
|
239
255
|
return [];
|
|
240
256
|
}
|
|
241
|
-
|
|
257
|
+
nonDraggingMouseUp(element, event) {
|
|
258
|
+
this.reset(true);
|
|
259
|
+
return [];
|
|
260
|
+
}
|
|
261
|
+
draggingMouseUp(target, event) {
|
|
242
262
|
const result = [];
|
|
243
|
-
if (this.
|
|
263
|
+
if (this.positionUpdater.isLastDragPositionUndefined()) {
|
|
264
|
+
this.reset(true);
|
|
265
|
+
return result;
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
244
268
|
const moveAction = this.getElementMoves(target, event, true);
|
|
245
269
|
if (moveAction) {
|
|
246
270
|
result.push(moveAction);
|
|
@@ -255,20 +279,36 @@ class FeedbackMoveMouseListener extends sprotty_1.MouseListener {
|
|
|
255
279
|
this.reset();
|
|
256
280
|
return result;
|
|
257
281
|
}
|
|
282
|
+
resetMoveFeedback() {
|
|
283
|
+
const elementMoves = [];
|
|
284
|
+
this.elementId2startPos.forEach((startPosition, elementId) => {
|
|
285
|
+
const element = this.rootElement.index.getById(elementId);
|
|
286
|
+
if (element) {
|
|
287
|
+
if ((0, sprotty_1.isMoveable)(element)) {
|
|
288
|
+
elementMoves.push({ elementId: element.id, fromPosition: element.position, toPosition: startPosition });
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
return elementMoves;
|
|
293
|
+
}
|
|
258
294
|
reset(resetFeedback = false) {
|
|
295
|
+
var _a;
|
|
296
|
+
(_a = this.pendingMoveInitialized) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
259
297
|
if (this.rootElement && resetFeedback) {
|
|
260
|
-
const elementMoves = this.
|
|
261
|
-
|
|
262
|
-
|
|
298
|
+
const elementMoves = this.resetMoveFeedback();
|
|
299
|
+
if (elementMoves.length > 0) {
|
|
300
|
+
const moveAction = sprotty_1.MoveAction.create(elementMoves, { animate: false, finished: true });
|
|
301
|
+
this.tool.deregisterFeedback(this, [moveAction]);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
else if (resetFeedback) {
|
|
305
|
+
this.tool.deregisterFeedback(this, [MoveFinishedEventAction.create()]);
|
|
263
306
|
}
|
|
264
|
-
this.
|
|
265
|
-
this.
|
|
307
|
+
this.positionUpdater.resetPosition();
|
|
308
|
+
this._isMouseDrag = false;
|
|
266
309
|
this.rootElement = undefined;
|
|
267
310
|
this.elementId2startPos.clear();
|
|
268
311
|
}
|
|
269
|
-
decorate(vnode, _element) {
|
|
270
|
-
return vnode;
|
|
271
|
-
}
|
|
272
312
|
dispose() {
|
|
273
313
|
this.reset(true);
|
|
274
314
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-bounds-tool-feedback.js","sourceRoot":"","sources":["../../../../src/features/tools/change-bounds/change-bounds-tool-feedback.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"change-bounds-tool-feedback.js","sourceRoot":"","sources":["../../../../src/features/tools/change-bounds/change-bounds-tool-feedback.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAgB+B;AAC/B,yCAA+C;AAE/C,mCAAiD;AACjD,uFAAiF;AACjF,sEAAsF;AACtF,8EAA0E;AAC1E,4DAA4D;AAC5D,qDAA8G;AAC9G,iFAA+H;AAC/H,uFAAkF;AASlF,IAAiB,wCAAwC,CAaxD;AAbD,WAAiB,wCAAwC;IACxC,6CAAI,GAAG,oCAAoC,CAAC;IAEzD,SAAgB,EAAE,CAAC,MAAW;QAC1B,OAAO,gBAAM,CAAC,OAAO,CAAC,MAAM,EAAE,yCAAA,IAAI,CAAC,IAAI,IAAA,uBAAa,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC9E,CAAC;IAFe,2CAAE,KAEjB,CAAA;IAED,SAAgB,MAAM,CAA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AAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;IACpC,CAAC;IAED,OAAO;QACH,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;CACJ;AA7LD,8DA6LC"}
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { FeatureModule } from '@eclipse-glsp/sprotty';
|
|
17
17
|
export declare const changeBoundsToolModule: FeatureModule;
|
|
18
|
-
//# sourceMappingURL=change-
|
|
18
|
+
//# sourceMappingURL=change-bounds-tool-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-bounds-tool-module.d.ts","sourceRoot":"","sources":["../../../../src/features/tools/change-bounds/change-bounds-tool-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,aAAa,EAAyD,MAAM,uBAAuB,CAAC;AAM7G,eAAO,MAAM,sBAAsB,eAMjC,CAAC"}
|
|
@@ -28,4 +28,4 @@ exports.changeBoundsToolModule = new sprotty_1.FeatureModule((bind, unbind, isBo
|
|
|
28
28
|
(0, sprotty_1.configureCommand)(context, change_bounds_tool_feedback_1.HideChangeBoundsToolResizeFeedbackCommand);
|
|
29
29
|
(0, sprotty_1.configureView)(context, model_1.SResizeHandle.TYPE, view_1.SResizeHandleView);
|
|
30
30
|
});
|
|
31
|
-
//# sourceMappingURL=change-
|
|
31
|
+
//# sourceMappingURL=change-bounds-tool-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-bounds-tool-module.js","sourceRoot":"","sources":["../../../../src/features/tools/change-bounds/change-bounds-tool-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAA6G;AAC7G,qDAA0D;AAC1D,6DAAwD;AACxD,+EAAqI;AACrI,iCAA2C;AAE9B,QAAA,sBAAsB,GAAG,IAAI,uBAAa,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IACtF,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClD,IAAA,uBAAa,EAAC,OAAO,EAAE,eAAK,CAAC,YAAY,EAAE,qCAAgB,CAAC,CAAC;IAC7D,IAAA,0BAAgB,EAAC,OAAO,EAAE,uEAAyC,CAAC,CAAC;IACrE,IAAA,0BAAgB,EAAC,OAAO,EAAE,uEAAyC,CAAC,CAAC;IACrE,IAAA,uBAAa,EAAC,OAAO,EAAE,qBAAa,CAAC,IAAI,EAAE,wBAAiB,CAAC,CAAC;AAClE,CAAC,CAAC,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Action, Bounds, BoundsAware, Dimension, Disposable, EdgeRouterRegistry, ElementAndBounds, GModelElement, GModelRoot, GParentElement,
|
|
1
|
+
import { Action, Bounds, BoundsAware, Dimension, Disposable, EdgeRouterRegistry, ElementAndBounds, GModelElement, GModelRoot, GParentElement, MouseListener, Operation, Point } from '@eclipse-glsp/sprotty';
|
|
2
2
|
import { DragAwareMouseListener } from '../../../base/drag-aware-mouse-listener';
|
|
3
3
|
import { ISelectionListener, SelectionService } from '../../../base/selection-service';
|
|
4
|
-
import { PointPositionUpdater } from '../../../features/change-bounds/
|
|
4
|
+
import { PointPositionUpdater } from '../../../features/change-bounds/point-position-updater';
|
|
5
5
|
import { Resizable, SResizeHandle } from '../../change-bounds/model';
|
|
6
6
|
import { IMovementRestrictor } from '../../change-bounds/movement-restrictor';
|
|
7
|
+
import { PositionSnapper } from '../../change-bounds/position-snapper';
|
|
7
8
|
import { BaseEditTool } from '../base-tools';
|
|
8
9
|
/**
|
|
9
10
|
* The change bounds tool has the license to move multiple elements or resize a single element by implementing the ChangeBounds operation.
|
|
@@ -22,8 +23,8 @@ export declare class ChangeBoundsTool extends BaseEditTool {
|
|
|
22
23
|
static ID: string;
|
|
23
24
|
protected selectionService: SelectionService;
|
|
24
25
|
readonly edgeRouterRegistry?: EdgeRouterRegistry;
|
|
25
|
-
readonly snapper?: ISnapper;
|
|
26
26
|
readonly movementRestrictor?: IMovementRestrictor;
|
|
27
|
+
readonly positionSnapper: PositionSnapper;
|
|
27
28
|
get id(): string;
|
|
28
29
|
enable(): void;
|
|
29
30
|
protected createMoveMouseListener(): MouseListener;
|
|
@@ -61,7 +62,6 @@ export declare class ChangeBoundsListener extends DragAwareMouseListener impleme
|
|
|
61
62
|
protected createChangeBoundsAction(element: GModelElement & BoundsAware): Action[];
|
|
62
63
|
protected createElementAndBounds(element: GModelElement & BoundsAware): ElementAndBounds[];
|
|
63
64
|
protected createSetBoundsAction(element: GModelElement & BoundsAware, x: number, y: number, width: number, height: number): Action[];
|
|
64
|
-
protected snap(position: Point, element: GModelElement, isSnap: boolean): Point;
|
|
65
65
|
protected isValidBoundChange(element: GModelElement & BoundsAware, newPosition: Point, newSize: Dimension): boolean;
|
|
66
66
|
protected isValidSize(element: GModelElement & BoundsAware, size: Dimension): boolean;
|
|
67
67
|
protected isValidMove(element: GModelElement & BoundsAware, newPosition: Point): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-bounds-tool.d.ts","sourceRoot":"","sources":["../../../../src/features/tools/change-bounds/change-bounds-tool.ts"],"names":[],"mappings":"AAiBA,OAAO,EACH,MAAM,EACN,MAAM,EACN,WAAW,EAIX,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAIhB,aAAa,EACb,UAAU,EACV,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"change-bounds-tool.d.ts","sourceRoot":"","sources":["../../../../src/features/tools/change-bounds/change-bounds-tool.ts"],"names":[],"mappings":"AAiBA,OAAO,EACH,MAAM,EACN,MAAM,EACN,WAAW,EAIX,SAAS,EACT,UAAU,EACV,kBAAkB,EA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ag_aware_mouse_listener_1 = require("../../../base/drag-aware-mouse-listener");
|
|
32
32
|
const css_feedback_1 = require("../../../base/feedback/css-feedback");
|
|
33
33
|
const selection_service_1 = require("../../../base/selection-service");
|
|
34
|
-
const
|
|
34
|
+
const point_position_updater_1 = require("../../../features/change-bounds/point-position-updater");
|
|
35
35
|
const gmodel_util_1 = require("../../../utils/gmodel-util");
|
|
36
36
|
const layout_utils_1 = require("../../../utils/layout-utils");
|
|
37
37
|
const set_bounds_feedback_command_1 = require("../../bounds/set-bounds-feedback-command");
|
|
38
38
|
const model_1 = require("../../change-bounds/model");
|
|
39
39
|
const movement_restrictor_1 = require("../../change-bounds/movement-restrictor");
|
|
40
|
+
const position_snapper_1 = require("../../change-bounds/position-snapper");
|
|
41
|
+
const model_2 = require("../../helper-lines/model");
|
|
40
42
|
const base_tools_1 = require("../base-tools");
|
|
41
43
|
const change_bounds_tool_feedback_1 = require("./change-bounds-tool-feedback");
|
|
42
44
|
/**
|
|
@@ -87,16 +89,15 @@ __decorate([
|
|
|
87
89
|
(0, inversify_1.optional)(),
|
|
88
90
|
__metadata("design:type", sprotty_1.EdgeRouterRegistry)
|
|
89
91
|
], ChangeBoundsTool.prototype, "edgeRouterRegistry", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, inversify_1.inject)(sprotty_1.TYPES.ISnapper),
|
|
92
|
-
(0, inversify_1.optional)(),
|
|
93
|
-
__metadata("design:type", Object)
|
|
94
|
-
], ChangeBoundsTool.prototype, "snapper", void 0);
|
|
95
92
|
__decorate([
|
|
96
93
|
(0, inversify_1.inject)(sprotty_1.TYPES.IMovementRestrictor),
|
|
97
94
|
(0, inversify_1.optional)(),
|
|
98
95
|
__metadata("design:type", Object)
|
|
99
96
|
], ChangeBoundsTool.prototype, "movementRestrictor", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, inversify_1.inject)(position_snapper_1.PositionSnapper),
|
|
99
|
+
__metadata("design:type", position_snapper_1.PositionSnapper)
|
|
100
|
+
], ChangeBoundsTool.prototype, "positionSnapper", void 0);
|
|
100
101
|
exports.ChangeBoundsTool = ChangeBoundsTool = ChangeBoundsTool_1 = __decorate([
|
|
101
102
|
(0, inversify_1.injectable)()
|
|
102
103
|
], ChangeBoundsTool);
|
|
@@ -104,7 +105,7 @@ class ChangeBoundsListener extends drag_aware_mouse_listener_1.DragAwareMouseLis
|
|
|
104
105
|
constructor(tool) {
|
|
105
106
|
super();
|
|
106
107
|
this.tool = tool;
|
|
107
|
-
this.pointPositionUpdater = new
|
|
108
|
+
this.pointPositionUpdater = new point_position_updater_1.PointPositionUpdater(tool.positionSnapper);
|
|
108
109
|
}
|
|
109
110
|
mouseDown(target, event) {
|
|
110
111
|
super.mouseDown(target, event);
|
|
@@ -137,7 +138,7 @@ class ChangeBoundsListener extends drag_aware_mouse_listener_1.DragAwareMouseLis
|
|
|
137
138
|
(0, css_feedback_1.cursorFeedbackAction)(this.activeResizeHandle.isNwSeResize() ? css_feedback_1.CursorCSS.RESIZE_NWSE : css_feedback_1.CursorCSS.RESIZE_NESW),
|
|
138
139
|
(0, css_feedback_1.applyCssClasses)(this.activeResizeHandle, ChangeBoundsListener.CSS_CLASS_ACTIVE)
|
|
139
140
|
];
|
|
140
|
-
const positionUpdate = this.pointPositionUpdater.updatePosition(target,
|
|
141
|
+
const positionUpdate = this.pointPositionUpdater.updatePosition(target, event, (0, model_2.getDirectionFrom)(this.activeResizeHandle.location));
|
|
141
142
|
if (positionUpdate) {
|
|
142
143
|
const resizeActions = this.handleResizeOnClient(positionUpdate);
|
|
143
144
|
actions.push(...resizeActions);
|
|
@@ -203,7 +204,7 @@ class ChangeBoundsListener extends drag_aware_mouse_listener_1.DragAwareMouseLis
|
|
|
203
204
|
const newRoutingPoints = [];
|
|
204
205
|
const routerRegistry = this.tool.edgeRouterRegistry;
|
|
205
206
|
if (routerRegistry) {
|
|
206
|
-
// If client routing is enabled -> delegate
|
|
207
|
+
// If client routing is enabled -> delegate routing points of connected edges to server
|
|
207
208
|
(0, gmodel_util_1.forEachElement)(target.index, gmodel_util_1.isNonRoutableSelectedMovableBoundsAware, element => {
|
|
208
209
|
if (element instanceof sprotty_1.GConnectableElement) {
|
|
209
210
|
element.incomingEdges
|
|
@@ -260,7 +261,7 @@ class ChangeBoundsListener extends drag_aware_mouse_listener_1.DragAwareMouseLis
|
|
|
260
261
|
return element !== undefined && this.activeResizeElement !== undefined && element.id === this.activeResizeElement.id;
|
|
261
262
|
}
|
|
262
263
|
initPosition(event) {
|
|
263
|
-
this.pointPositionUpdater.updateLastDragPosition(
|
|
264
|
+
this.pointPositionUpdater.updateLastDragPosition(event);
|
|
264
265
|
if (this.activeResizeHandle) {
|
|
265
266
|
const resizeElement = (0, sprotty_1.findParentByFeature)(this.activeResizeHandle, model_1.isResizable);
|
|
266
267
|
this.initialBounds = {
|
|
@@ -369,9 +370,6 @@ class ChangeBoundsListener extends drag_aware_mouse_listener_1.DragAwareMouseLis
|
|
|
369
370
|
}
|
|
370
371
|
return result;
|
|
371
372
|
}
|
|
372
|
-
snap(position, element, isSnap) {
|
|
373
|
-
return isSnap && this.tool.snapper ? this.tool.snapper.snap(position, element) : { x: position.x, y: position.y };
|
|
374
|
-
}
|
|
375
373
|
isValidBoundChange(element, newPosition, newSize) {
|
|
376
374
|
return this.isValidSize(element, newSize) && this.isValidMove(element, newPosition);
|
|
377
375
|
}
|