@eclipse-glsp/client 2.2.0-next.329 → 2.2.0-next.331
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/change-bounds.css +15 -0
- package/css/glsp-sprotty.css +22 -0
- package/lib/base/default.module.js +1 -1
- package/lib/base/default.module.js.map +1 -1
- package/lib/base/drag-aware-mouse-listener.d.ts +5 -2
- package/lib/base/drag-aware-mouse-listener.d.ts.map +1 -1
- package/lib/base/drag-aware-mouse-listener.js +11 -0
- package/lib/base/drag-aware-mouse-listener.js.map +1 -1
- package/lib/base/feedback/css-feedback.d.ts +4 -0
- package/lib/base/feedback/css-feedback.d.ts.map +1 -1
- package/lib/base/feedback/css-feedback.js +4 -0
- package/lib/base/feedback/css-feedback.js.map +1 -1
- package/lib/base/feedback/feeback-emitter.d.ts +67 -0
- package/lib/base/feedback/feeback-emitter.d.ts.map +1 -0
- package/lib/base/feedback/feeback-emitter.js +109 -0
- package/lib/base/feedback/feeback-emitter.js.map +1 -0
- package/lib/base/feedback/feedback-action-dispatcher.d.ts +17 -5
- package/lib/base/feedback/feedback-action-dispatcher.d.ts.map +1 -1
- package/lib/base/feedback/feedback-action-dispatcher.js +23 -3
- package/lib/base/feedback/feedback-action-dispatcher.js.map +1 -1
- package/lib/base/feedback/index.d.ts +1 -0
- package/lib/base/feedback/index.d.ts.map +1 -1
- package/lib/base/feedback/index.js +1 -0
- package/lib/base/feedback/index.js.map +1 -1
- package/lib/base/index.d.ts +1 -1
- package/lib/base/index.d.ts.map +1 -1
- package/lib/base/index.js +1 -1
- package/lib/base/index.js.map +1 -1
- package/lib/base/selection-service.d.ts +3 -2
- package/lib/base/selection-service.d.ts.map +1 -1
- package/lib/base/selection-service.js.map +1 -1
- package/lib/{features/routing/glsp-manhattan-edge-router.d.ts → base/ui-extension/index.d.ts} +4 -6
- package/lib/base/ui-extension/index.d.ts.map +1 -0
- package/lib/base/ui-extension/index.js +34 -0
- package/lib/base/ui-extension/index.js.map +1 -0
- package/lib/base/{ui-extension-registry.d.ts → ui-extension/ui-extension-registry.d.ts} +1 -1
- package/lib/base/ui-extension/ui-extension-registry.d.ts.map +1 -0
- package/lib/base/ui-extension/ui-extension-registry.js.map +1 -0
- package/lib/base/ui-extension/ui-extension.d.ts +39 -0
- package/lib/base/ui-extension/ui-extension.d.ts.map +1 -0
- package/lib/base/ui-extension/ui-extension.js +120 -0
- package/lib/base/ui-extension/ui-extension.js.map +1 -0
- package/lib/features/accessibility/element-navigation/local-element-navigator.d.ts +3 -3
- package/lib/features/accessibility/element-navigation/local-element-navigator.d.ts.map +1 -1
- package/lib/features/accessibility/element-navigation/local-element-navigator.js.map +1 -1
- package/lib/features/accessibility/move-zoom/move-handler.d.ts +4 -2
- package/lib/features/accessibility/move-zoom/move-handler.d.ts.map +1 -1
- package/lib/features/accessibility/move-zoom/move-handler.js +10 -4
- package/lib/features/accessibility/move-zoom/move-handler.js.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-handler.d.ts +4 -2
- package/lib/features/accessibility/resize-key-tool/resize-key-handler.d.ts.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-handler.js +11 -3
- package/lib/features/accessibility/resize-key-tool/resize-key-handler.js.map +1 -1
- package/lib/features/change-bounds/model.d.ts +8 -8
- package/lib/features/change-bounds/model.d.ts.map +1 -1
- package/lib/features/change-bounds/model.js +17 -5
- package/lib/features/change-bounds/model.js.map +1 -1
- package/lib/features/change-bounds/movement-restrictor.d.ts +3 -2
- package/lib/features/change-bounds/movement-restrictor.d.ts.map +1 -1
- package/lib/features/change-bounds/movement-restrictor.js.map +1 -1
- package/lib/features/command-palette/command-palette.d.ts.map +1 -1
- package/lib/features/command-palette/command-palette.js +4 -3
- package/lib/features/command-palette/command-palette.js.map +1 -1
- package/lib/features/element-template/mouse-tracking-element-position-listener.d.ts +15 -5
- 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 +27 -38
- package/lib/features/element-template/mouse-tracking-element-position-listener.js.map +1 -1
- package/lib/features/helper-lines/helper-line-manager-default.d.ts +4 -2
- package/lib/features/helper-lines/helper-line-manager-default.d.ts.map +1 -1
- package/lib/features/helper-lines/helper-line-manager-default.js +8 -12
- package/lib/features/helper-lines/helper-line-manager-default.js.map +1 -1
- package/lib/features/hints/type-hint-provider.d.ts +3 -0
- package/lib/features/hints/type-hint-provider.d.ts.map +1 -1
- package/lib/features/hints/type-hint-provider.js +10 -1
- package/lib/features/hints/type-hint-provider.js.map +1 -1
- package/lib/features/label-edit-ui/label-edit-ui.d.ts.map +1 -1
- package/lib/features/label-edit-ui/label-edit-ui.js +4 -3
- package/lib/features/label-edit-ui/label-edit-ui.js.map +1 -1
- package/lib/features/routing/edge-router.d.ts +30 -0
- package/lib/features/routing/edge-router.d.ts.map +1 -0
- package/lib/features/routing/edge-router.js +116 -0
- package/lib/features/routing/edge-router.js.map +1 -0
- package/lib/features/routing/index.d.ts +1 -1
- package/lib/features/routing/index.d.ts.map +1 -1
- package/lib/features/routing/index.js +1 -1
- package/lib/features/routing/index.js.map +1 -1
- package/lib/features/routing/routing-module.d.ts.map +1 -1
- package/lib/features/routing/routing-module.js +4 -4
- package/lib/features/routing/routing-module.js.map +1 -1
- package/lib/features/select/select-mouse-listener.d.ts +4 -3
- package/lib/features/select/select-mouse-listener.d.ts.map +1 -1
- package/lib/features/select/select-mouse-listener.js.map +1 -1
- package/lib/features/tools/base-tools.d.ts +23 -4
- package/lib/features/tools/base-tools.d.ts.map +1 -1
- package/lib/features/tools/base-tools.js +11 -6
- package/lib/features/tools/base-tools.js.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-feedback.d.ts +1 -35
- 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 +5 -206
- package/lib/features/tools/change-bounds/change-bounds-tool-feedback.js.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-module.d.ts +1 -0
- package/lib/features/tools/change-bounds/change-bounds-tool-module.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-module.js +1 -0
- package/lib/features/tools/change-bounds/change-bounds-tool-module.js.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool-move-feedback.d.ts +67 -0
- package/lib/features/tools/change-bounds/change-bounds-tool-move-feedback.d.ts.map +1 -0
- package/lib/features/tools/change-bounds/change-bounds-tool-move-feedback.js +227 -0
- package/lib/features/tools/change-bounds/change-bounds-tool-move-feedback.js.map +1 -0
- package/lib/features/tools/change-bounds/change-bounds-tool.d.ts +34 -24
- package/lib/features/tools/change-bounds/change-bounds-tool.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tool.js +172 -180
- package/lib/features/tools/change-bounds/change-bounds-tool.js.map +1 -1
- package/lib/features/tools/change-bounds/index.d.ts +1 -0
- package/lib/features/tools/change-bounds/index.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/index.js +1 -0
- package/lib/features/tools/change-bounds/index.js.map +1 -1
- package/lib/features/tools/change-bounds/view.d.ts +1 -1
- package/lib/features/tools/change-bounds/view.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/view.js +3 -0
- package/lib/features/tools/change-bounds/view.js.map +1 -1
- package/lib/features/tools/deletion/delete-tool.d.ts +16 -1
- package/lib/features/tools/deletion/delete-tool.d.ts.map +1 -1
- package/lib/features/tools/deletion/delete-tool.js +5 -2
- package/lib/features/tools/deletion/delete-tool.js.map +1 -1
- package/lib/features/tools/edge-creation/dangling-edge-feedback.d.ts +17 -1
- package/lib/features/tools/edge-creation/dangling-edge-feedback.d.ts.map +1 -1
- package/lib/features/tools/edge-creation/dangling-edge-feedback.js +3 -1
- package/lib/features/tools/edge-creation/dangling-edge-feedback.js.map +1 -1
- package/lib/features/tools/edge-creation/edge-creation-tool-feedback.d.ts +3 -1
- package/lib/features/tools/edge-creation/edge-creation-tool-feedback.d.ts.map +1 -1
- package/lib/features/tools/edge-creation/edge-creation-tool-feedback.js +4 -7
- package/lib/features/tools/edge-creation/edge-creation-tool-feedback.js.map +1 -1
- package/lib/features/tools/edge-creation/edge-creation-tool.d.ts +20 -2
- package/lib/features/tools/edge-creation/edge-creation-tool.d.ts.map +1 -1
- package/lib/features/tools/edge-creation/edge-creation-tool.js +23 -18
- package/lib/features/tools/edge-creation/edge-creation-tool.js.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-tool-feedback.d.ts +3 -1
- 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 +5 -8
- 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 +4 -4
- package/lib/features/tools/edge-edit/edge-edit-tool.d.ts.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-tool.js +27 -44
- package/lib/features/tools/edge-edit/edge-edit-tool.js.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-mouse-tool.d.ts +3 -2
- package/lib/features/tools/marquee-selection/marquee-mouse-tool.d.ts.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-mouse-tool.js +4 -2
- package/lib/features/tools/marquee-selection/marquee-mouse-tool.js.map +1 -1
- package/lib/features/tools/node-creation/node-creation-tool.d.ts +14 -5
- package/lib/features/tools/node-creation/node-creation-tool.d.ts.map +1 -1
- package/lib/features/tools/node-creation/node-creation-tool.js +58 -24
- package/lib/features/tools/node-creation/node-creation-tool.js.map +1 -1
- package/lib/features/validation/marker-navigator.d.ts +7 -6
- package/lib/features/validation/marker-navigator.d.ts.map +1 -1
- package/lib/features/validation/marker-navigator.js.map +1 -1
- package/lib/features/validation/validate.d.ts +2 -5
- package/lib/features/validation/validate.d.ts.map +1 -1
- package/lib/features/validation/validate.js +4 -16
- package/lib/features/validation/validate.js.map +1 -1
- package/lib/utils/gmodel-util.d.ts +27 -2
- package/lib/utils/gmodel-util.d.ts.map +1 -1
- package/lib/utils/gmodel-util.js +30 -1
- package/lib/utils/gmodel-util.js.map +1 -1
- package/lib/utils/layout-utils.d.ts +8 -7
- package/lib/utils/layout-utils.d.ts.map +1 -1
- package/lib/utils/layout-utils.js +2 -4
- package/lib/utils/layout-utils.js.map +1 -1
- package/lib/utils/viewpoint-util.d.ts +4 -4
- package/lib/utils/viewpoint-util.d.ts.map +1 -1
- package/lib/utils/viewpoint-util.js.map +1 -1
- package/package.json +3 -3
- package/src/base/default.module.ts +1 -1
- package/src/base/drag-aware-mouse-listener.ts +16 -2
- package/src/base/feedback/css-feedback.ts +4 -0
- package/src/base/feedback/feeback-emitter.ts +112 -0
- package/src/base/feedback/feedback-action-dispatcher.ts +41 -6
- package/src/base/feedback/index.ts +1 -0
- package/src/base/index.ts +1 -1
- package/src/base/selection-service.spec.ts +5 -0
- package/src/base/selection-service.ts +2 -3
- package/src/base/ui-extension/index.ts +17 -0
- package/src/base/{ui-extension-registry.ts → ui-extension/ui-extension-registry.ts} +1 -1
- package/src/base/ui-extension/ui-extension.ts +119 -0
- package/src/features/accessibility/element-navigation/local-element-navigator.ts +4 -4
- package/src/features/accessibility/move-zoom/move-handler.ts +10 -5
- package/src/features/accessibility/resize-key-tool/resize-key-handler.ts +11 -7
- package/src/features/change-bounds/model.ts +25 -13
- package/src/features/change-bounds/movement-restrictor.ts +5 -4
- package/src/features/command-palette/command-palette.ts +2 -1
- package/src/features/element-template/mouse-tracking-element-position-listener.ts +44 -44
- package/src/features/helper-lines/helper-line-manager-default.ts +12 -21
- package/src/features/hints/type-hint-provider.spec.ts +4 -1
- package/src/features/hints/type-hint-provider.ts +9 -2
- package/src/features/label-edit-ui/label-edit-ui.ts +2 -1
- package/src/features/routing/{glsp-manhattan-edge-router.ts → edge-router.ts} +72 -2
- package/src/features/routing/index.ts +1 -1
- package/src/features/routing/routing-module.ts +3 -5
- package/src/features/select/select-mouse-listener.ts +4 -3
- package/src/features/tools/base-tools.ts +15 -8
- package/src/features/tools/change-bounds/change-bounds-tool-feedback.ts +6 -232
- package/src/features/tools/change-bounds/change-bounds-tool-module.ts +1 -0
- package/src/features/tools/change-bounds/change-bounds-tool-move-feedback.ts +254 -0
- package/src/features/tools/change-bounds/change-bounds-tool.ts +217 -226
- package/src/features/tools/change-bounds/index.ts +1 -0
- package/src/features/tools/change-bounds/view.tsx +4 -1
- package/src/features/tools/deletion/delete-tool.ts +6 -6
- package/src/features/tools/edge-creation/dangling-edge-feedback.ts +7 -4
- package/src/features/tools/edge-creation/edge-creation-tool-feedback.ts +9 -9
- package/src/features/tools/edge-creation/edge-creation-tool.ts +33 -23
- package/src/features/tools/edge-edit/edge-edit-tool-feedback.ts +8 -8
- package/src/features/tools/edge-edit/edge-edit-tool.ts +42 -49
- package/src/features/tools/marquee-selection/marquee-mouse-tool.ts +7 -6
- package/src/features/tools/node-creation/node-creation-tool.ts +69 -25
- package/src/features/validation/marker-navigator.ts +6 -8
- package/src/features/validation/validate.ts +5 -20
- package/src/utils/gmodel-util.ts +44 -1
- package/src/utils/layout-utils.ts +9 -20
- package/src/utils/viewpoint-util.ts +3 -4
- package/lib/base/ui-extension-registry.d.ts.map +0 -1
- package/lib/base/ui-extension-registry.js.map +0 -1
- package/lib/features/routing/glsp-manhattan-edge-router.d.ts.map +0 -1
- package/lib/features/routing/glsp-manhattan-edge-router.js +0 -68
- package/lib/features/routing/glsp-manhattan-edge-router.js.map +0 -1
- /package/lib/base/{ui-extension-registry.js → ui-extension/ui-extension-registry.js} +0 -0
|
@@ -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.
|
|
12
|
+
exports.MoveFinishedEventAction = exports.MoveInitializedEventAction = exports.HideChangeBoundsToolResizeFeedbackCommand = exports.ShowChangeBoundsToolResizeFeedbackCommand = exports.HideChangeBoundsToolResizeFeedbackAction = exports.ShowChangeBoundsToolResizeFeedbackAction = void 0;
|
|
13
13
|
/********************************************************************************
|
|
14
14
|
* Copyright (c) 2019-2024 EclipseSource and others.
|
|
15
15
|
*
|
|
@@ -27,15 +27,10 @@ exports.FeedbackMoveMouseListener = exports.MoveFinishedEventAction = exports.Mo
|
|
|
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");
|
|
32
|
-
const css_feedback_1 = require("../../../base/feedback/css-feedback");
|
|
33
30
|
const feedback_command_1 = require("../../../base/feedback/feedback-command");
|
|
34
31
|
const glsp_model_source_1 = require("../../../base/model/glsp-model-source");
|
|
35
32
|
const gmodel_util_1 = require("../../../utils/gmodel-util");
|
|
36
33
|
const model_1 = require("../../change-bounds/model");
|
|
37
|
-
const movement_restrictor_1 = require("../../change-bounds/movement-restrictor");
|
|
38
|
-
const point_position_updater_1 = require("../../change-bounds/point-position-updater");
|
|
39
34
|
var ShowChangeBoundsToolResizeFeedbackAction;
|
|
40
35
|
(function (ShowChangeBoundsToolResizeFeedbackAction) {
|
|
41
36
|
ShowChangeBoundsToolResizeFeedbackAction.KIND = 'showChangeBoundsToolResizeFeedback';
|
|
@@ -66,12 +61,10 @@ var HideChangeBoundsToolResizeFeedbackAction;
|
|
|
66
61
|
let ShowChangeBoundsToolResizeFeedbackCommand = class ShowChangeBoundsToolResizeFeedbackCommand extends feedback_command_1.FeedbackCommand {
|
|
67
62
|
execute(context) {
|
|
68
63
|
const index = context.root.index;
|
|
69
|
-
(0, gmodel_util_1.forEachElement)(index, model_1.isResizable, model_1.removeResizeHandles);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
(0, model_1.addResizeHandles)(resizeElement);
|
|
74
|
-
}
|
|
64
|
+
(0, gmodel_util_1.forEachElement)(index, model_1.isResizable, element => element.id !== this.action.elementId && (0, model_1.removeResizeHandles)(element));
|
|
65
|
+
const resizeElement = index.getById(this.action.elementId);
|
|
66
|
+
if (resizeElement && (0, model_1.isResizable)(resizeElement)) {
|
|
67
|
+
(0, model_1.addResizeHandles)(resizeElement);
|
|
75
68
|
}
|
|
76
69
|
return context.root;
|
|
77
70
|
}
|
|
@@ -125,198 +118,4 @@ var MoveFinishedEventAction;
|
|
|
125
118
|
}
|
|
126
119
|
MoveFinishedEventAction.create = create;
|
|
127
120
|
})(MoveFinishedEventAction || (exports.MoveFinishedEventAction = MoveFinishedEventAction = {}));
|
|
128
|
-
/**
|
|
129
|
-
* This mouse listener provides visual feedback for moving by sending client-side
|
|
130
|
-
* `MoveAction`s while elements are selected and dragged. This will also update
|
|
131
|
-
* their bounds, which is important, as it is not only required for rendering
|
|
132
|
-
* the visual feedback but also the basis for sending the change to the server
|
|
133
|
-
* (see also `tools/MoveTool`).
|
|
134
|
-
*/
|
|
135
|
-
class FeedbackMoveMouseListener extends drag_aware_mouse_listener_1.DragAwareMouseListener {
|
|
136
|
-
constructor(tool) {
|
|
137
|
-
super();
|
|
138
|
-
this.tool = tool;
|
|
139
|
-
this.elementId2startPos = new Map();
|
|
140
|
-
this.moveInitialized = false;
|
|
141
|
-
this.positionUpdater = new point_position_updater_1.PointPositionUpdater(tool.positionSnapper);
|
|
142
|
-
}
|
|
143
|
-
mouseDown(target, event) {
|
|
144
|
-
if (event.button === 0 && !(target instanceof model_1.SResizeHandle)) {
|
|
145
|
-
const moveable = (0, sprotty_1.findParentByFeature)(target, sprotty_1.isMoveable);
|
|
146
|
-
if (moveable !== undefined && !(target instanceof model_1.SResizeHandle)) {
|
|
147
|
-
this.positionUpdater.updateLastDragPosition(event);
|
|
148
|
-
this.scheduleMoveInitialized();
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
this.positionUpdater.resetPosition();
|
|
152
|
-
}
|
|
153
|
-
this._isMouseDrag = false;
|
|
154
|
-
}
|
|
155
|
-
return [];
|
|
156
|
-
}
|
|
157
|
-
scheduleMoveInitialized() {
|
|
158
|
-
var _a;
|
|
159
|
-
this.moveInitialized = false;
|
|
160
|
-
(_a = this.pendingMoveInitialized) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
161
|
-
this.pendingMoveInitialized = (0, lodash_1.debounce)(() => {
|
|
162
|
-
this.tool.registerFeedback([MoveInitializedEventAction.create()], this);
|
|
163
|
-
this.pendingMoveInitialized = undefined;
|
|
164
|
-
this.moveInitialized = true;
|
|
165
|
-
}, 750);
|
|
166
|
-
this.pendingMoveInitialized();
|
|
167
|
-
}
|
|
168
|
-
mouseMove(target, event) {
|
|
169
|
-
var _a;
|
|
170
|
-
const result = [];
|
|
171
|
-
if (event.buttons === 0) {
|
|
172
|
-
this.mouseUp(target, event);
|
|
173
|
-
}
|
|
174
|
-
else if (!this.positionUpdater.isLastDragPositionUndefined()) {
|
|
175
|
-
if (this.elementId2startPos.size === 0) {
|
|
176
|
-
this.collectStartPositions(target.root);
|
|
177
|
-
}
|
|
178
|
-
this._isMouseDrag = true;
|
|
179
|
-
const moveAction = this.getElementMoves(target, event, false);
|
|
180
|
-
if (moveAction) {
|
|
181
|
-
(_a = this.pendingMoveInitialized) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
182
|
-
result.push(moveAction);
|
|
183
|
-
result.push((0, css_feedback_1.cursorFeedbackAction)(css_feedback_1.CursorCSS.MOVE));
|
|
184
|
-
this.tool.registerFeedback(result, this);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
return [];
|
|
188
|
-
}
|
|
189
|
-
collectStartPositions(root) {
|
|
190
|
-
this.rootElement = root;
|
|
191
|
-
const selectedElements = root.index.all().filter(element => (0, sprotty_1.isSelectable)(element) && element.selected);
|
|
192
|
-
const elementsSet = new Set(selectedElements);
|
|
193
|
-
selectedElements
|
|
194
|
-
.filter(element => !this.isChildOfSelected(elementsSet, element))
|
|
195
|
-
.forEach(element => {
|
|
196
|
-
if ((0, sprotty_1.isMoveable)(element)) {
|
|
197
|
-
this.elementId2startPos.set(element.id, element.position);
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
isChildOfSelected(selectedElements, element) {
|
|
202
|
-
while (element instanceof sprotty_1.GChildElement) {
|
|
203
|
-
element = element.parent;
|
|
204
|
-
if (selectedElements.has(element)) {
|
|
205
|
-
return true;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
return false;
|
|
209
|
-
}
|
|
210
|
-
getElementMoves(target, event, finished) {
|
|
211
|
-
const delta = this.positionUpdater.updatePosition(target, event);
|
|
212
|
-
if (!delta) {
|
|
213
|
-
return undefined;
|
|
214
|
-
}
|
|
215
|
-
const elementMoves = this.getElementMovesForDelta(target, delta, finished);
|
|
216
|
-
if (elementMoves.length > 0) {
|
|
217
|
-
return sprotty_1.MoveAction.create(elementMoves, { animate: false, finished });
|
|
218
|
-
}
|
|
219
|
-
else {
|
|
220
|
-
return undefined;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
getElementMovesForDelta(target, delta, finished) {
|
|
224
|
-
const elementMoves = [];
|
|
225
|
-
this.elementId2startPos.forEach((startPosition, elementId) => {
|
|
226
|
-
const element = target.root.index.getById(elementId);
|
|
227
|
-
if (element) {
|
|
228
|
-
if ((0, sprotty_1.isMoveable)(element)) {
|
|
229
|
-
const targetPosition = sprotty_1.Point.add(element.position, delta);
|
|
230
|
-
const toPosition = this.validateMove(startPosition, targetPosition, element, finished);
|
|
231
|
-
elementMoves.push({ elementId: element.id, fromPosition: element.position, toPosition });
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
return elementMoves;
|
|
236
|
-
}
|
|
237
|
-
validateMove(startPosition, toPosition, element, isFinished) {
|
|
238
|
-
let newPosition = toPosition;
|
|
239
|
-
if (this.tool.movementRestrictor) {
|
|
240
|
-
const valid = this.tool.movementRestrictor.validate(element, toPosition);
|
|
241
|
-
let action;
|
|
242
|
-
if (!valid) {
|
|
243
|
-
action = (0, movement_restrictor_1.createMovementRestrictionFeedback)(element, this.tool.movementRestrictor);
|
|
244
|
-
if (isFinished) {
|
|
245
|
-
newPosition = startPosition;
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
else {
|
|
249
|
-
action = (0, movement_restrictor_1.removeMovementRestrictionFeedback)(element, this.tool.movementRestrictor);
|
|
250
|
-
}
|
|
251
|
-
this.tool.registerFeedback([action], this);
|
|
252
|
-
}
|
|
253
|
-
return newPosition;
|
|
254
|
-
}
|
|
255
|
-
mouseEnter(target, event) {
|
|
256
|
-
if (target instanceof sprotty_1.GModelRoot && event.buttons === 0 && this.positionUpdater.isLastDragPositionUndefined()) {
|
|
257
|
-
this.mouseUp(target, event);
|
|
258
|
-
}
|
|
259
|
-
return [];
|
|
260
|
-
}
|
|
261
|
-
nonDraggingMouseUp(element, event) {
|
|
262
|
-
this.reset(true);
|
|
263
|
-
return [];
|
|
264
|
-
}
|
|
265
|
-
draggingMouseUp(target, event) {
|
|
266
|
-
const result = [];
|
|
267
|
-
if (this.positionUpdater.isLastDragPositionUndefined()) {
|
|
268
|
-
this.reset(true);
|
|
269
|
-
return result;
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
272
|
-
const moveAction = this.getElementMoves(target, event, true);
|
|
273
|
-
if (moveAction) {
|
|
274
|
-
result.push(moveAction);
|
|
275
|
-
}
|
|
276
|
-
const resetFeedback = [];
|
|
277
|
-
if (this.tool.movementRestrictor) {
|
|
278
|
-
resetFeedback.push((0, movement_restrictor_1.removeMovementRestrictionFeedback)(target, this.tool.movementRestrictor));
|
|
279
|
-
}
|
|
280
|
-
resetFeedback.push((0, css_feedback_1.cursorFeedbackAction)(css_feedback_1.CursorCSS.DEFAULT));
|
|
281
|
-
this.tool.deregisterFeedback(this, resetFeedback);
|
|
282
|
-
}
|
|
283
|
-
this.reset();
|
|
284
|
-
return result;
|
|
285
|
-
}
|
|
286
|
-
resetMoveFeedback() {
|
|
287
|
-
const elementMoves = [];
|
|
288
|
-
this.elementId2startPos.forEach((startPosition, elementId) => {
|
|
289
|
-
const element = this.rootElement.index.getById(elementId);
|
|
290
|
-
if (element) {
|
|
291
|
-
if ((0, sprotty_1.isMoveable)(element)) {
|
|
292
|
-
elementMoves.push({ elementId: element.id, fromPosition: element.position, toPosition: startPosition });
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
return elementMoves;
|
|
297
|
-
}
|
|
298
|
-
reset(resetFeedback = false) {
|
|
299
|
-
var _a;
|
|
300
|
-
(_a = this.pendingMoveInitialized) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
301
|
-
if (this.rootElement && resetFeedback) {
|
|
302
|
-
const elementMoves = this.resetMoveFeedback();
|
|
303
|
-
if (elementMoves.length > 0) {
|
|
304
|
-
const moveAction = sprotty_1.MoveAction.create(elementMoves, { animate: false, finished: true });
|
|
305
|
-
this.tool.deregisterFeedback(this, [moveAction]);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
else if (resetFeedback && this.moveInitialized) {
|
|
309
|
-
this.tool.deregisterFeedback(this, [MoveFinishedEventAction.create()]);
|
|
310
|
-
}
|
|
311
|
-
this.positionUpdater.resetPosition();
|
|
312
|
-
this._isMouseDrag = false;
|
|
313
|
-
this.moveInitialized = false;
|
|
314
|
-
this.rootElement = undefined;
|
|
315
|
-
this.elementId2startPos.clear();
|
|
316
|
-
}
|
|
317
|
-
dispose() {
|
|
318
|
-
this.reset(true);
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
exports.FeedbackMoveMouseListener = FeedbackMoveMouseListener;
|
|
322
121
|
//# sourceMappingURL=change-bounds-tool-feedback.js.map
|
|
@@ -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,mDAA6G;AAC7G,yCAA+C;AAE/C,8EAA0E;AAC1E,6EAAuE;AACvE,4DAA4D;AAC5D,qDAA+F;AAQ/F,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,CAAC,SAAiB;QACpC,OAAO;YACH,IAAI,EAAE,yCAAA,IAAI;YACV,SAAS;SACZ,CAAC;IACN,CAAC;IALe,+CAAM,SAKrB,CAAA;AACL,CAAC,EAbgB,wCAAwC,wDAAxC,wCAAwC,QAaxD;AAMD,IAAiB,wCAAwC,CAUxD;AAVD,WAAiB,wCAAwC;IACxC,6CAAI,GAAG,oCAAoC,CAAC;IAEzD,SAAgB,EAAE,CAAC,MAAW;QAC1B,OAAO,gBAAM,CAAC,OAAO,CAAC,MAAM,EAAE,yCAAA,IAAI,CAAC,CAAC;IACxC,CAAC;IAFe,2CAAE,KAEjB,CAAA;IAED,SAAgB,MAAM;QAClB,OAAO,EAAE,IAAI,EAAE,yCAAA,IAAI,EAAE,CAAC;IAC1B,CAAC;IAFe,+CAAM,SAErB,CAAA;AACL,CAAC,EAVgB,wCAAwC,wDAAxC,wCAAwC,QAUxD;AAGM,IAAM,yCAAyC,GAA/C,MAAM,yCAA0C,SAAQ,kCAAe;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iB,0BAA0B;IAC1B,+BAAI,GAAG,wBAAwB,CAAC;IAE7C,SAAgB,EAAE,CAAC,MAAW;QAC1B,OAAO,gBAAM,CAAC,OAAO,CAAC,MAAM,EAAE,2BAAA,IAAI,CAAC,CAAC;IACxC,CAAC;IAFe,6BAAE,KAEjB,CAAA;IAED,SAAgB,MAAM;QAClB,OAAO,kCAAc,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,2BAAA,IAAI,EAAE,CAAC,CAAC;IAC/C,CAAC;IAFe,iCAAM,SAErB,CAAA;AACL,CAAC,EAVgB,0BAA0B,0CAA1B,0BAA0B,QAU1C;AAMD,IAAiB,uBAAuB,CAUvC;AAVD,WAAiB,uBAAuB;IACvB,4BAAI,GAAG,qBAAqB,CAAC;IAE1C,SAAgB,EAAE,CAAC,MAAW;QAC1B,OAAO,gBAAM,CAAC,OAAO,CAAC,MAAM,EAAE,wBAAA,IAAI,CAAC,CAAC;IACxC,CAAC;IAFe,0BAAE,KAEjB,CAAA;IAED,SAAgB,MAAM;QAClB,OAAO,kCAAc,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,wBAAA,IAAI,EAAE,CAAC,CAAC;IAC/C,CAAC;IAFe,8BAAM,SAErB,CAAA;AACL,CAAC,EAVgB,uBAAuB,uCAAvB,uBAAuB,QAUvC"}
|
|
@@ -14,5 +14,6 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { FeatureModule } from '@eclipse-glsp/sprotty';
|
|
17
|
+
import '../../../../css/change-bounds.css';
|
|
17
18
|
export declare const changeBoundsToolModule: FeatureModule;
|
|
18
19
|
//# sourceMappingURL=change-bounds-tool-module.d.ts.map
|
|
@@ -1 +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;
|
|
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;AAC7G,OAAO,mCAAmC,CAAC;AAM3C,eAAO,MAAM,sBAAsB,eAMjC,CAAC"}
|
|
@@ -17,6 +17,7 @@ exports.changeBoundsToolModule = void 0;
|
|
|
17
17
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
18
|
********************************************************************************/
|
|
19
19
|
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
20
|
+
require("../../../../css/change-bounds.css");
|
|
20
21
|
const model_1 = require("../../change-bounds/model");
|
|
21
22
|
const change_bounds_tool_1 = require("./change-bounds-tool");
|
|
22
23
|
const change_bounds_tool_feedback_1 = require("./change-bounds-tool-feedback");
|
|
@@ -1 +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
|
+
{"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,6CAA2C;AAC3C,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"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2019-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
|
+
import { Action, Disposable, ElementMove, GModelElement, GModelRoot, MoveAction, Point } from '@eclipse-glsp/sprotty';
|
|
17
|
+
import { DebouncedFunc } from 'lodash';
|
|
18
|
+
import { DragAwareMouseListener } from '../../../base/drag-aware-mouse-listener';
|
|
19
|
+
import { FeedbackEmitter } from '../../../base/feedback/feeback-emitter';
|
|
20
|
+
import { MoveableElement } from '../../../utils';
|
|
21
|
+
import { PointPositionUpdater } from '../../change-bounds';
|
|
22
|
+
import { ChangeBoundsTool } from './change-bounds-tool';
|
|
23
|
+
export interface ValidatedElementMove extends ElementMove {
|
|
24
|
+
valid: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare namespace ValidatedElementMove {
|
|
27
|
+
function isValid(move: ElementMove): boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* This mouse listener provides visual feedback for moving by sending client-side
|
|
31
|
+
* `MoveAction`s while elements are selected and dragged. This will also update
|
|
32
|
+
* their bounds, which is important, as it is not only required for rendering
|
|
33
|
+
* the visual feedback but also the basis for sending the change to the server
|
|
34
|
+
* (see also `tools/MoveTool`).
|
|
35
|
+
*/
|
|
36
|
+
export declare class FeedbackMoveMouseListener extends DragAwareMouseListener implements Disposable {
|
|
37
|
+
protected tool: ChangeBoundsTool;
|
|
38
|
+
protected rootElement?: GModelRoot;
|
|
39
|
+
protected positionUpdater: PointPositionUpdater;
|
|
40
|
+
protected elementId2startPos: Map<string, Point>;
|
|
41
|
+
protected pendingMoveInitialized?: DebouncedFunc<() => void>;
|
|
42
|
+
protected moveInitializedFeedback: FeedbackEmitter;
|
|
43
|
+
protected moveFeedback: FeedbackEmitter;
|
|
44
|
+
constructor(tool: ChangeBoundsTool);
|
|
45
|
+
mouseDown(target: GModelElement, event: MouseEvent): Action[];
|
|
46
|
+
protected initializeMove(target: GModelElement, event: MouseEvent): void;
|
|
47
|
+
protected scheduleMoveInitialized(): void;
|
|
48
|
+
protected moveInitializationTimeout(): number;
|
|
49
|
+
protected moveInitialized(): void;
|
|
50
|
+
protected isValidMoveable(element?: GModelElement): element is MoveableElement;
|
|
51
|
+
nonDraggingMouseUp(element: GModelElement, event: MouseEvent): Action[];
|
|
52
|
+
mouseMove(target: GModelElement, event: MouseEvent): Action[];
|
|
53
|
+
protected moveElements(target: GModelElement, event: MouseEvent): Action[];
|
|
54
|
+
protected addMovementFeedback(movement: MoveAction, ctx: GModelElement): void;
|
|
55
|
+
protected initializeElementsToMove(root: GModelRoot): void;
|
|
56
|
+
protected collectElementsToMove(root: GModelRoot): MoveableElement[];
|
|
57
|
+
protected getElementsToMove(context: GModelElement): MoveableElement[];
|
|
58
|
+
protected getElementMoves(target: GModelElement, event: MouseEvent, finished: boolean): MoveAction | undefined;
|
|
59
|
+
protected filterElementMove(elementMove: ValidatedElementMove): boolean;
|
|
60
|
+
protected getElementMovesForDelta(target: GModelElement, delta: Point, finished: boolean): ValidatedElementMove[];
|
|
61
|
+
protected createElementMove(element: MoveableElement, toPosition: Point, valid: boolean, finished: boolean): ValidatedElementMove;
|
|
62
|
+
protected resetElementPositions(context: GModelElement): MoveAction | undefined;
|
|
63
|
+
protected revertElementMoves(context?: GModelElement): ElementMove[];
|
|
64
|
+
draggingMouseUp(target: GModelElement, event: MouseEvent): Action[];
|
|
65
|
+
dispose(): void;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=change-bounds-tool-move-feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-bounds-tool-move-feedback.d.ts","sourceRoot":"","sources":["../../../../src/features/tools/change-bounds/change-bounds-tool-move-feedback.ts"],"names":[],"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GAAG,UAAU,GAAG,SAAS;IAK/E,SAAS,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,WAAW,EAAE;IAW3D,eAAe,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,GAAG,MAAM,EAAE;IAWnE,OAAO,IAAI,IAAI;CAQ3B"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FeedbackMoveMouseListener = exports.ValidatedElementMove = void 0;
|
|
4
|
+
/********************************************************************************
|
|
5
|
+
* Copyright (c) 2019-2023 EclipseSource and others.
|
|
6
|
+
*
|
|
7
|
+
* This program and the accompanying materials are made available under the
|
|
8
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
9
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
10
|
+
*
|
|
11
|
+
* This Source Code may also be made available under the following Secondary
|
|
12
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
13
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
14
|
+
* with the GNU Classpath Exception which is available at
|
|
15
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
16
|
+
*
|
|
17
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
18
|
+
********************************************************************************/
|
|
19
|
+
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
20
|
+
const lodash_1 = require("lodash");
|
|
21
|
+
const drag_aware_mouse_listener_1 = require("../../../base/drag-aware-mouse-listener");
|
|
22
|
+
const css_feedback_1 = require("../../../base/feedback/css-feedback");
|
|
23
|
+
const utils_1 = require("../../../utils");
|
|
24
|
+
const change_bounds_1 = require("../../change-bounds");
|
|
25
|
+
const model_1 = require("../../change-bounds/model");
|
|
26
|
+
const movement_restrictor_1 = require("../../change-bounds/movement-restrictor");
|
|
27
|
+
const change_bounds_tool_feedback_1 = require("./change-bounds-tool-feedback");
|
|
28
|
+
var ValidatedElementMove;
|
|
29
|
+
(function (ValidatedElementMove) {
|
|
30
|
+
function isValid(move) {
|
|
31
|
+
var _a;
|
|
32
|
+
return (_a = move.valid) !== null && _a !== void 0 ? _a : true;
|
|
33
|
+
}
|
|
34
|
+
ValidatedElementMove.isValid = isValid;
|
|
35
|
+
})(ValidatedElementMove || (exports.ValidatedElementMove = ValidatedElementMove = {}));
|
|
36
|
+
/**
|
|
37
|
+
* This mouse listener provides visual feedback for moving by sending client-side
|
|
38
|
+
* `MoveAction`s while elements are selected and dragged. This will also update
|
|
39
|
+
* their bounds, which is important, as it is not only required for rendering
|
|
40
|
+
* the visual feedback but also the basis for sending the change to the server
|
|
41
|
+
* (see also `tools/MoveTool`).
|
|
42
|
+
*/
|
|
43
|
+
class FeedbackMoveMouseListener extends drag_aware_mouse_listener_1.DragAwareMouseListener {
|
|
44
|
+
constructor(tool) {
|
|
45
|
+
super();
|
|
46
|
+
this.tool = tool;
|
|
47
|
+
this.elementId2startPos = new Map();
|
|
48
|
+
this.positionUpdater = new change_bounds_1.PointPositionUpdater(tool.positionSnapper);
|
|
49
|
+
this.moveInitializedFeedback = tool.createFeedbackEmitter();
|
|
50
|
+
this.moveFeedback = tool.createFeedbackEmitter();
|
|
51
|
+
}
|
|
52
|
+
mouseDown(target, event) {
|
|
53
|
+
super.mouseDown(target, event);
|
|
54
|
+
if (event.button === 0) {
|
|
55
|
+
this.initializeMove(target, event);
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
this.positionUpdater.resetPosition();
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
initializeMove(target, event) {
|
|
62
|
+
if (target instanceof model_1.SResizeHandle) {
|
|
63
|
+
// avoid conflict with resize tool
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const moveable = (0, sprotty_1.findParentByFeature)(target, this.isValidMoveable);
|
|
67
|
+
if (moveable !== undefined) {
|
|
68
|
+
this.positionUpdater.updateLastDragPosition(event);
|
|
69
|
+
this.scheduleMoveInitialized();
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
this.positionUpdater.resetPosition();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
scheduleMoveInitialized() {
|
|
76
|
+
var _a;
|
|
77
|
+
(_a = this.pendingMoveInitialized) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
78
|
+
this.pendingMoveInitialized = (0, lodash_1.debounce)(() => {
|
|
79
|
+
this.moveInitialized();
|
|
80
|
+
this.pendingMoveInitialized = undefined;
|
|
81
|
+
}, 750);
|
|
82
|
+
this.pendingMoveInitialized();
|
|
83
|
+
}
|
|
84
|
+
moveInitializationTimeout() {
|
|
85
|
+
return 750;
|
|
86
|
+
}
|
|
87
|
+
moveInitialized() {
|
|
88
|
+
if (this.isMouseDown) {
|
|
89
|
+
this.moveInitializedFeedback
|
|
90
|
+
.add(change_bounds_tool_feedback_1.MoveInitializedEventAction.create(), change_bounds_tool_feedback_1.MoveFinishedEventAction.create())
|
|
91
|
+
.add((0, css_feedback_1.cursorFeedbackAction)(css_feedback_1.CursorCSS.MOVE), (0, css_feedback_1.cursorFeedbackAction)(css_feedback_1.CursorCSS.DEFAULT))
|
|
92
|
+
.submit();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
isValidMoveable(element) {
|
|
96
|
+
return !!element && (0, utils_1.isNonRoutableSelectedMovableBoundsAware)(element) && !(element instanceof model_1.SResizeHandle);
|
|
97
|
+
}
|
|
98
|
+
nonDraggingMouseUp(element, event) {
|
|
99
|
+
// should reset everything that may have happend on mouse down
|
|
100
|
+
this.moveInitializedFeedback.dispose();
|
|
101
|
+
this.positionUpdater.resetPosition();
|
|
102
|
+
return [];
|
|
103
|
+
}
|
|
104
|
+
mouseMove(target, event) {
|
|
105
|
+
super.mouseMove(target, event);
|
|
106
|
+
if (event.buttons === 0) {
|
|
107
|
+
return this.mouseUp(target, event);
|
|
108
|
+
}
|
|
109
|
+
else if (!this.positionUpdater.isLastDragPositionUndefined()) {
|
|
110
|
+
return this.moveElements(target, event);
|
|
111
|
+
}
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
moveElements(target, event) {
|
|
115
|
+
var _a;
|
|
116
|
+
if (this.elementId2startPos.size === 0) {
|
|
117
|
+
this.initializeElementsToMove(target.root);
|
|
118
|
+
}
|
|
119
|
+
const moveAction = this.getElementMoves(target, event, false);
|
|
120
|
+
if (!moveAction) {
|
|
121
|
+
return [];
|
|
122
|
+
}
|
|
123
|
+
// cancel any pending move
|
|
124
|
+
(_a = this.pendingMoveInitialized) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
125
|
+
this.moveFeedback.add(moveAction, () => this.resetElementPositions(target));
|
|
126
|
+
this.addMovementFeedback(moveAction, target);
|
|
127
|
+
this.moveFeedback.submit();
|
|
128
|
+
return [];
|
|
129
|
+
}
|
|
130
|
+
addMovementFeedback(movement, ctx) {
|
|
131
|
+
// cursor feedback
|
|
132
|
+
this.moveFeedback.add((0, css_feedback_1.cursorFeedbackAction)(css_feedback_1.CursorCSS.MOVE), (0, css_feedback_1.cursorFeedbackAction)(css_feedback_1.CursorCSS.DEFAULT));
|
|
133
|
+
// restriction feedback
|
|
134
|
+
movement.moves.forEach(move => {
|
|
135
|
+
const element = ctx.root.index.getById(move.elementId);
|
|
136
|
+
if (element && this.tool.movementRestrictor) {
|
|
137
|
+
if (!ValidatedElementMove.isValid(move)) {
|
|
138
|
+
this.moveFeedback.add((0, movement_restrictor_1.createMovementRestrictionFeedback)(element, this.tool.movementRestrictor), () => (0, movement_restrictor_1.removeMovementRestrictionFeedback)(element, this.tool.movementRestrictor));
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
this.moveFeedback.add((0, movement_restrictor_1.removeMovementRestrictionFeedback)(element, this.tool.movementRestrictor));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
initializeElementsToMove(root) {
|
|
147
|
+
const elementsToMove = this.collectElementsToMove(root);
|
|
148
|
+
elementsToMove.forEach(element => this.elementId2startPos.set(element.id, element.position));
|
|
149
|
+
}
|
|
150
|
+
collectElementsToMove(root) {
|
|
151
|
+
const moveableElements = (0, utils_1.filter)(root.index, this.isValidMoveable);
|
|
152
|
+
const topLevelElements = (0, utils_1.removeDescendants)(moveableElements);
|
|
153
|
+
return Array.from(topLevelElements);
|
|
154
|
+
}
|
|
155
|
+
getElementsToMove(context) {
|
|
156
|
+
return (0, utils_1.getElements)(context.root.index, Array.from(this.elementId2startPos.keys()), this.isValidMoveable);
|
|
157
|
+
}
|
|
158
|
+
getElementMoves(target, event, finished) {
|
|
159
|
+
const delta = this.positionUpdater.updatePosition(target, event);
|
|
160
|
+
if (!delta) {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
const elementMoves = this.getElementMovesForDelta(target, delta, finished).filter(move => this.filterElementMove(move));
|
|
164
|
+
if (elementMoves.length > 0) {
|
|
165
|
+
// we never want to animate the move action as this interferes with the move feedback
|
|
166
|
+
return sprotty_1.MoveAction.create(elementMoves, { animate: false, finished });
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
return undefined;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
filterElementMove(elementMove) {
|
|
173
|
+
return !!elementMove.fromPosition && !sprotty_1.Point.equals(elementMove.fromPosition, elementMove.toPosition);
|
|
174
|
+
}
|
|
175
|
+
getElementMovesForDelta(target, delta, finished) {
|
|
176
|
+
return this.getElementsToMove(target).flatMap(element => {
|
|
177
|
+
var _a, _b;
|
|
178
|
+
const startPosition = this.elementId2startPos.get(element.id);
|
|
179
|
+
if (!startPosition) {
|
|
180
|
+
return [];
|
|
181
|
+
}
|
|
182
|
+
const targetPosition = sprotty_1.Point.add(element.position, delta);
|
|
183
|
+
const valid = (_b = (_a = this.tool.movementRestrictor) === null || _a === void 0 ? void 0 : _a.validate(element, targetPosition)) !== null && _b !== void 0 ? _b : true;
|
|
184
|
+
return [this.createElementMove(element, targetPosition, valid, finished)];
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
createElementMove(element, toPosition, valid, finished) {
|
|
188
|
+
// if we are finished and have an invalid move, we want to move the element back to its start position
|
|
189
|
+
return !valid && finished
|
|
190
|
+
? { elementId: element.id, fromPosition: element.position, toPosition: element.position, valid }
|
|
191
|
+
: { elementId: element.id, fromPosition: element.position, toPosition, valid };
|
|
192
|
+
}
|
|
193
|
+
resetElementPositions(context) {
|
|
194
|
+
const elementMoves = this.revertElementMoves(context);
|
|
195
|
+
return sprotty_1.MoveAction.create(elementMoves, { animate: false, finished: true });
|
|
196
|
+
}
|
|
197
|
+
revertElementMoves(context) {
|
|
198
|
+
var _a;
|
|
199
|
+
const elementMoves = [];
|
|
200
|
+
if ((_a = context === null || context === void 0 ? void 0 : context.root) === null || _a === void 0 ? void 0 : _a.index) {
|
|
201
|
+
const movableElements = this.getElementsToMove(context);
|
|
202
|
+
movableElements.forEach(element => elementMoves.push({ elementId: element.id, toPosition: this.elementId2startPos.get(element.id) }));
|
|
203
|
+
}
|
|
204
|
+
return elementMoves;
|
|
205
|
+
}
|
|
206
|
+
draggingMouseUp(target, event) {
|
|
207
|
+
if (this.positionUpdater.isLastDragPositionUndefined()) {
|
|
208
|
+
return [];
|
|
209
|
+
}
|
|
210
|
+
// only reset the move of invalid elements, the others will be handled by the change bounds tool itself
|
|
211
|
+
const moves = this.getElementMovesForDelta(target, sprotty_1.Point.ORIGIN, false);
|
|
212
|
+
moves.filter(move => move.valid).forEach(move => this.elementId2startPos.delete(move.elementId));
|
|
213
|
+
this.dispose();
|
|
214
|
+
return [];
|
|
215
|
+
}
|
|
216
|
+
dispose() {
|
|
217
|
+
var _a;
|
|
218
|
+
(_a = this.pendingMoveInitialized) === null || _a === void 0 ? void 0 : _a.cancel();
|
|
219
|
+
this.moveInitializedFeedback.dispose();
|
|
220
|
+
this.moveFeedback.dispose();
|
|
221
|
+
this.positionUpdater.resetPosition();
|
|
222
|
+
this.elementId2startPos.clear();
|
|
223
|
+
super.dispose();
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
exports.FeedbackMoveMouseListener = FeedbackMoveMouseListener;
|
|
227
|
+
//# sourceMappingURL=change-bounds-tool-move-feedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-bounds-tool-move-feedback.js","sourceRoot":"","sources":["../../../../src/features/tools/change-bounds/change-bounds-tool-move-feedback.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAA2I;AAE3I,mCAAiD;AACjD,uFAAiF;AACjF,sEAAsF;AAEtF,0CAAkI;AAClI,uDAA2D;AAC3D,qDAA0D;AAC1D,iFAA+H;AAE/H,+EAAoG;AAMpG,IAAiB,oBAAoB,CAIpC;AAJD,WAAiB,oBAAoB;IACjC,SAAgB,OAAO,CAAC,IAAiB;;QACrC,OAAO,MAAC,IAA6B,CAAC,KAAK,mCAAI,IAAI,CAAC;IACxD,CAAC;IAFe,4BAAO,UAEtB,CAAA;AACL,CAAC,EAJgB,oBAAoB,oCAApB,oBAAoB,QAIpC;AAED;;;;;;GAMG;AACH,MAAa,yBAA0B,SAAQ,kDAAsB;IAUjE,YAAsB,IAAsB;QACxC,KAAK,EAAE,CAAC;QADU,SAAI,GAAJ,IAAI,CAAkB;QAPlC,uBAAkB,GAAG,IAAI,GAAG,EAAiB,CAAC;QASpD,IAAI,CAAC,eAAe,GAAG,IAAI,oCAAoB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACtE,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC5D,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACrD,CAAC;IAEQ,SAAS,CAAC,MAAqB,EAAE,KAAiB;QACvD,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC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