@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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2024 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 { AbstractEdgeRouter, BezierEdgeRouter, GConnectableElement, GParentElement, GRoutableElement, ManhattanEdgeRouter, Point, PolylineEdgeRouter, ResolvedHandleMove } from '@eclipse-glsp/sprotty';
|
|
17
|
+
export declare abstract class GLSPAbstractEdgeRouter extends AbstractEdgeRouter {
|
|
18
|
+
getTranslatedAnchor(connectable: GConnectableElement, refPoint: Point, refContainer: GParentElement, edge: GRoutableElement, anchorCorrection?: number | undefined): Point;
|
|
19
|
+
}
|
|
20
|
+
export declare class GLSPPolylineEdgeRouter extends PolylineEdgeRouter {
|
|
21
|
+
getTranslatedAnchor(connectable: GConnectableElement, refPoint: Point, refContainer: GParentElement, edge: GRoutableElement, anchorCorrection?: number | undefined): Point;
|
|
22
|
+
}
|
|
23
|
+
export declare class GLSPManhattanEdgeRouter extends ManhattanEdgeRouter {
|
|
24
|
+
getTranslatedAnchor(connectable: GConnectableElement, refPoint: Point, refContainer: GParentElement, edge: GRoutableElement, anchorCorrection?: number | undefined): Point;
|
|
25
|
+
protected applyInnerHandleMoves(edge: GRoutableElement, moves: ResolvedHandleMove[]): void;
|
|
26
|
+
}
|
|
27
|
+
export declare class GLSPBezierEdgeRouter extends BezierEdgeRouter {
|
|
28
|
+
getTranslatedAnchor(connectable: GConnectableElement, refPoint: Point, refContainer: GParentElement, edge: GRoutableElement, anchorCorrection?: number | undefined): Point;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=edge-router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-router.d.ts","sourceRoot":"","sources":["../../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
/********************************************************************************
|
|
3
|
+
* Copyright (c) 2024 EclipseSource and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.GLSPBezierEdgeRouter = exports.GLSPManhattanEdgeRouter = exports.GLSPPolylineEdgeRouter = exports.GLSPAbstractEdgeRouter = void 0;
|
|
25
|
+
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
26
|
+
const inversify_1 = require("inversify");
|
|
27
|
+
let GLSPAbstractEdgeRouter = class GLSPAbstractEdgeRouter extends sprotty_1.AbstractEdgeRouter {
|
|
28
|
+
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
29
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
30
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
31
|
+
return sprotty_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.GLSPAbstractEdgeRouter = GLSPAbstractEdgeRouter;
|
|
35
|
+
exports.GLSPAbstractEdgeRouter = GLSPAbstractEdgeRouter = __decorate([
|
|
36
|
+
(0, inversify_1.injectable)()
|
|
37
|
+
], GLSPAbstractEdgeRouter);
|
|
38
|
+
let GLSPPolylineEdgeRouter = class GLSPPolylineEdgeRouter extends sprotty_1.PolylineEdgeRouter {
|
|
39
|
+
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
40
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
41
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
42
|
+
return sprotty_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
exports.GLSPPolylineEdgeRouter = GLSPPolylineEdgeRouter;
|
|
46
|
+
exports.GLSPPolylineEdgeRouter = GLSPPolylineEdgeRouter = __decorate([
|
|
47
|
+
(0, inversify_1.injectable)()
|
|
48
|
+
], GLSPPolylineEdgeRouter);
|
|
49
|
+
let GLSPManhattanEdgeRouter = class GLSPManhattanEdgeRouter extends sprotty_1.ManhattanEdgeRouter {
|
|
50
|
+
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
51
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
52
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
53
|
+
return sprotty_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
54
|
+
}
|
|
55
|
+
applyInnerHandleMoves(edge, moves) {
|
|
56
|
+
const route = this.route(edge);
|
|
57
|
+
const routingPoints = edge.routingPoints;
|
|
58
|
+
const minimalPointDistance = this.getOptions(edge).minimalPointDistance;
|
|
59
|
+
moves.forEach(move => {
|
|
60
|
+
const handle = move.handle;
|
|
61
|
+
const index = handle.pointIndex;
|
|
62
|
+
const correctedX = this.correctX(routingPoints, index, move.toPosition.x, minimalPointDistance);
|
|
63
|
+
const correctedY = this.correctY(routingPoints, index, move.toPosition.y, minimalPointDistance);
|
|
64
|
+
switch (handle.kind) {
|
|
65
|
+
case 'manhattan-50%':
|
|
66
|
+
if (index < 0) {
|
|
67
|
+
if (routingPoints.length === 0) {
|
|
68
|
+
routingPoints.push({ x: correctedX, y: correctedY });
|
|
69
|
+
move.handle.pointIndex = 0;
|
|
70
|
+
}
|
|
71
|
+
else if ((0, sprotty_1.almostEquals)(route[0].x, route[1].x)) {
|
|
72
|
+
this.alignX(routingPoints, 0, correctedX);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
this.alignY(routingPoints, 0, correctedY);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else if (index < routingPoints.length - 1) {
|
|
79
|
+
if ((0, sprotty_1.almostEquals)(routingPoints[index].x, routingPoints[index + 1].x)) {
|
|
80
|
+
this.alignX(routingPoints, index, correctedX);
|
|
81
|
+
this.alignX(routingPoints, index + 1, correctedX);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this.alignY(routingPoints, index, correctedY);
|
|
85
|
+
this.alignY(routingPoints, index + 1, correctedY);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
if ((0, sprotty_1.almostEquals)(route[route.length - 2].x, route[route.length - 1].x)) {
|
|
90
|
+
this.alignX(routingPoints, routingPoints.length - 1, correctedX);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
this.alignY(routingPoints, routingPoints.length - 1, correctedY);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
exports.GLSPManhattanEdgeRouter = GLSPManhattanEdgeRouter;
|
|
102
|
+
exports.GLSPManhattanEdgeRouter = GLSPManhattanEdgeRouter = __decorate([
|
|
103
|
+
(0, inversify_1.injectable)()
|
|
104
|
+
], GLSPManhattanEdgeRouter);
|
|
105
|
+
let GLSPBezierEdgeRouter = class GLSPBezierEdgeRouter extends sprotty_1.BezierEdgeRouter {
|
|
106
|
+
getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection) {
|
|
107
|
+
// users may define all kinds of anchors and anchor computers, we want to make sure we return a valid one in any case
|
|
108
|
+
const anchor = super.getTranslatedAnchor(connectable, refPoint, refContainer, edge, anchorCorrection);
|
|
109
|
+
return sprotty_1.Point.isValid(anchor) ? anchor : refPoint;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
exports.GLSPBezierEdgeRouter = GLSPBezierEdgeRouter;
|
|
113
|
+
exports.GLSPBezierEdgeRouter = GLSPBezierEdgeRouter = __decorate([
|
|
114
|
+
(0, inversify_1.injectable)()
|
|
115
|
+
], GLSPBezierEdgeRouter);
|
|
116
|
+
//# sourceMappingURL=edge-router.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-router.js","sourceRoot":"","sources":["../../../src/features/routing/edge-router.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;AAElF,mDAW+B;AAC/B,yCAAuC;AAGhC,IAAe,sBAAsB,GAArC,MAAe,sBAAuB,SAAQ,4BAAkB;IAC1D,mBAAmB,CACxB,WAAgC,EAChC,QAAe,EACf,YAA4B,EAC5B,IAAsB,EACtB,gBAAqC;QAErC,qHAAqH;QACrH,MAAM,MAAM,GAAG,KAAK,CAAC,mBAAmB,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,C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AErC,qHAAqH;QACrH,MAAM,MAAM,GAAG,KAAK,CAAC,mBAAmB,CAAC,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;QACtG,OAAO,eAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;IACrD,CAAC;CACJ,CAAA;AAZY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CAYhC"}
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
export * from './
|
|
16
|
+
export * from './edge-router';
|
|
17
17
|
export * from './routing-module';
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/routing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/routing/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
|
|
@@ -29,6 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
*
|
|
30
30
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
31
31
|
********************************************************************************/
|
|
32
|
-
__exportStar(require("./
|
|
32
|
+
__exportStar(require("./edge-router"), exports);
|
|
33
33
|
__exportStar(require("./routing-module"), exports);
|
|
34
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/routing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/routing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,gDAA8B;AAC9B,mDAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-module.d.ts","sourceRoot":"","sources":["../../../src/features/routing/routing-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"routing-module.d.ts","sourceRoot":"","sources":["../../../src/features/routing/routing-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EASH,aAAa,EAQhB,MAAM,uBAAuB,CAAC;AAG/B,eAAO,MAAM,aAAa,eAqBxB,CAAC"}
|
|
@@ -17,20 +17,20 @@ exports.routingModule = 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
|
-
const
|
|
20
|
+
const edge_router_1 = require("./edge-router");
|
|
21
21
|
exports.routingModule = new sprotty_1.FeatureModule((bind, unbind, isBound, rebind) => {
|
|
22
22
|
const context = { bind, unbind, isBound, rebind };
|
|
23
23
|
bind(sprotty_1.EdgeRouterRegistry).toSelf().inSingletonScope();
|
|
24
24
|
bind(sprotty_1.AnchorComputerRegistry).toSelf().inSingletonScope();
|
|
25
|
-
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IEdgeRouter,
|
|
25
|
+
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IEdgeRouter, edge_router_1.GLSPManhattanEdgeRouter);
|
|
26
26
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.ManhattanEllipticAnchor);
|
|
27
27
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.ManhattanRectangularAnchor);
|
|
28
28
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.ManhattanDiamondAnchor);
|
|
29
|
-
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IEdgeRouter,
|
|
29
|
+
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IEdgeRouter, edge_router_1.GLSPPolylineEdgeRouter);
|
|
30
30
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.EllipseAnchor);
|
|
31
31
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.RectangleAnchor);
|
|
32
32
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.DiamondAnchor);
|
|
33
|
-
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IEdgeRouter,
|
|
33
|
+
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IEdgeRouter, edge_router_1.GLSPBezierEdgeRouter);
|
|
34
34
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.BezierEllipseAnchor);
|
|
35
35
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.BezierRectangleAnchor);
|
|
36
36
|
(0, sprotty_1.bindAsService)(context, sprotty_1.TYPES.IAnchorComputer, sprotty_1.BezierDiamondAnchor);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing-module.js","sourceRoot":"","sources":["../../../src/features/routing/routing-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"routing-module.js","sourceRoot":"","sources":["../../../src/features/routing/routing-module.ts"],"names":[],"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C;IACnE,IAAA,uBAAa,EAAC,OAAO,EAAE,eAAK,CAAC,eAAe,EAAE,+BAAqB,CAAC,CAAC;IACrE,IAAA,uBAAa,EAAC,OAAO,EAAE,eAAK,CAAC,eAAe,EAAE,6BAAmB,CAAC,CAAC;IAEnE,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,uCAA6B,CAAC,CAAC;AACvE,CAAC,CAAC,CAAC"}
|
|
@@ -13,16 +13,17 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { Action, GModelElement, SelectMouseListener
|
|
16
|
+
import { Action, GModelElement, SelectMouseListener } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import { Ranked } from '../../base/ranked';
|
|
18
|
+
import { SelectableElement } from '../../utils';
|
|
18
19
|
/**
|
|
19
20
|
* Ranked select mouse listener that is executed before default mouse listeners when using the RankedMouseTool.
|
|
20
21
|
* This ensures that default mouse listeners are working on a model that has selection changes already applied.
|
|
21
22
|
*/
|
|
22
23
|
export declare class RankedSelectMouseListener extends SelectMouseListener implements Ranked {
|
|
23
24
|
rank: number;
|
|
24
|
-
protected handleSelectTarget(selectableTarget:
|
|
25
|
-
protected handleDeselectTarget(selectableTarget:
|
|
25
|
+
protected handleSelectTarget(selectableTarget: SelectableElement, deselectedElements: GModelElement[], event: MouseEvent): (Action | Promise<Action>)[];
|
|
26
|
+
protected handleDeselectTarget(selectableTarget: SelectableElement, event: MouseEvent): (Action | Promise<Action>)[];
|
|
26
27
|
protected handleDeselectAll(deselectedElements: GModelElement[], event: MouseEvent): (Action | Promise<Action>)[];
|
|
27
28
|
}
|
|
28
29
|
//# sourceMappingURL=select-mouse-listener.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-mouse-listener.d.ts","sourceRoot":"","sources":["../../../src/features/select/select-mouse-listener.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAsB,aAAa,EAAgB,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"select-mouse-listener.d.ts","sourceRoot":"","sources":["../../../src/features/select/select-mouse-listener.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,MAAM,EAAsB,aAAa,EAAgB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACrH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD;;;GAGG;AACH,qBAAa,yBAA0B,SAAQ,mBAAoB,YAAW,MAAM;IAChF,IAAI,EAAE,MAAM,CAA6B;cAEtB,kBAAkB,CACjC,gBAAgB,EAAE,iBAAiB,EACnC,kBAAkB,EAAE,aAAa,EAAE,EACnC,KAAK,EAAE,UAAU,GAClB,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE;cAaZ,oBAAoB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,KAAK,EAAE,UAAU,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE;cAM1G,iBAAiB,CAAC,kBAAkB,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,UAAU,GAAG,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE;CAK7H"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-mouse-listener.js","sourceRoot":"","sources":["../../../src/features/select/select-mouse-listener.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"select-mouse-listener.js","sourceRoot":"","sources":["../../../src/features/select/select-mouse-listener.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAAqH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,8DA+BC"}
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2020-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
|
+
********************************************************************************/
|
|
1
16
|
import { Action, Disposable, DisposableCollection, IActionHandler } from '@eclipse-glsp/sprotty';
|
|
2
17
|
import { GLSPActionDispatcher } from '../../base/action-dispatcher';
|
|
3
18
|
import { EditorContextService } from '../../base/editor-context-service';
|
|
4
|
-
import {
|
|
19
|
+
import { FeedbackEmitter } from '../../base/feedback/feeback-emitter';
|
|
20
|
+
import { IFeedbackActionDispatcher, IFeedbackEmitter, MaybeActions } from '../../base/feedback/feedback-action-dispatcher';
|
|
5
21
|
import { Tool } from '../../base/tool-manager/tool';
|
|
6
22
|
import { GLSPKeyTool } from '../../base/view/key-tool';
|
|
7
23
|
import { GLSPMouseTool } from '../../base/view/mouse-tool';
|
|
@@ -19,7 +35,8 @@ export declare abstract class BaseEditTool implements Tool {
|
|
|
19
35
|
disable(): void;
|
|
20
36
|
abstract id: string;
|
|
21
37
|
get isEditTool(): boolean;
|
|
22
|
-
dispatchActions(actions: Action[]): void
|
|
38
|
+
dispatchActions(actions: Action[]): Promise<void>;
|
|
39
|
+
createFeedbackEmitter(): FeedbackEmitter;
|
|
23
40
|
/**
|
|
24
41
|
* Registers `actions` to be sent out as feedback, i.e., changes that are re-established whenever the `GModelRoot`
|
|
25
42
|
* has been set or updated.
|
|
@@ -28,16 +45,18 @@ export declare abstract class BaseEditTool implements Tool {
|
|
|
28
45
|
* @param feedbackEmitter the emitter sending out feedback actions (this tool by default).
|
|
29
46
|
* @param cleanupActions the actions to be sent out when the feedback is de-registered through the returned Disposable.
|
|
30
47
|
* @returns A 'Disposable' that de-registers the feedback and cleans up any pending feedback with the given `cleanupActions`.
|
|
48
|
+
* @deprecated It is recommended to create a {@link createFeedbackEmitter dedicated emitter} per feedback instead of using the tool.
|
|
31
49
|
*/
|
|
32
|
-
registerFeedback(feedbackActions: Action[], feedbackEmitter?: IFeedbackEmitter, cleanupActions?:
|
|
50
|
+
registerFeedback(feedbackActions: Action[], feedbackEmitter?: IFeedbackEmitter, cleanupActions?: MaybeActions): Disposable;
|
|
33
51
|
/**
|
|
34
52
|
* De-registers all feedback from the given `feedbackEmitter` (this tool by default) and cleans up any pending feedback with the
|
|
35
53
|
* given `cleanupActions`.
|
|
36
54
|
*
|
|
37
55
|
* @param feedbackEmitter the emitter to be deregistered (this tool by default).
|
|
38
56
|
* @param cleanupActions the actions to be dispatched right after the deregistration to clean up any pending feedback.
|
|
57
|
+
* @deprecated It is recommended to create a {@link createFeedbackEmitter dedicated emitter} per feedback and dispose it like that.
|
|
39
58
|
*/
|
|
40
|
-
deregisterFeedback(feedbackEmitter?: IFeedbackEmitter, cleanupActions?:
|
|
59
|
+
deregisterFeedback(feedbackEmitter?: IFeedbackEmitter, cleanupActions?: MaybeActions): void;
|
|
41
60
|
}
|
|
42
61
|
export declare abstract class BaseCreationTool<T extends Action> extends BaseEditTool implements IActionHandler {
|
|
43
62
|
protected abstract isTriggerAction: (obj: any) => obj is T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-tools.d.ts","sourceRoot":"","sources":["../../../src/features/tools/base-tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-t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AAE,cAAc,CAAC,EAAE,YAAY,GAAG,UAAU;IAIhI;;;;;;;OAOG;IACH,kBAAkB,CAAC,eAAe,GAAE,gBAAuB,EAAE,cAAc,CAAC,EAAE,YAAY,GAAG,IAAI;CAGpG;AAED,8BACsB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,YAAa,YAAW,cAAc;IACnG,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC;IAC3D,SAAS,CAAC,aAAa,EAAE,CAAC,CAAC;IAE3B,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAO5B,MAAM,IAAI,IAAI;IAOvB,SAAS,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI;CACtC"}
|
|
@@ -25,8 +25,8 @@ exports.BaseCreationTool = exports.BaseEditTool = void 0;
|
|
|
25
25
|
*
|
|
26
26
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
27
27
|
********************************************************************************/
|
|
28
|
-
const inversify_1 = require("inversify");
|
|
29
28
|
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
29
|
+
const inversify_1 = require("inversify");
|
|
30
30
|
const action_dispatcher_1 = require("../../base/action-dispatcher");
|
|
31
31
|
const editor_context_service_1 = require("../../base/editor-context-service");
|
|
32
32
|
const tool_1 = require("../../base/tool-manager/tool");
|
|
@@ -46,7 +46,10 @@ let BaseEditTool = class BaseEditTool {
|
|
|
46
46
|
return true;
|
|
47
47
|
}
|
|
48
48
|
dispatchActions(actions) {
|
|
49
|
-
this.actionDispatcher.dispatchAll(actions);
|
|
49
|
+
return this.actionDispatcher.dispatchAll(actions);
|
|
50
|
+
}
|
|
51
|
+
createFeedbackEmitter() {
|
|
52
|
+
return this.feedbackDispatcher.createEmitter();
|
|
50
53
|
}
|
|
51
54
|
/**
|
|
52
55
|
* Registers `actions` to be sent out as feedback, i.e., changes that are re-established whenever the `GModelRoot`
|
|
@@ -56,9 +59,10 @@ let BaseEditTool = class BaseEditTool {
|
|
|
56
59
|
* @param feedbackEmitter the emitter sending out feedback actions (this tool by default).
|
|
57
60
|
* @param cleanupActions the actions to be sent out when the feedback is de-registered through the returned Disposable.
|
|
58
61
|
* @returns A 'Disposable' that de-registers the feedback and cleans up any pending feedback with the given `cleanupActions`.
|
|
62
|
+
* @deprecated It is recommended to create a {@link createFeedbackEmitter dedicated emitter} per feedback instead of using the tool.
|
|
59
63
|
*/
|
|
60
|
-
registerFeedback(feedbackActions, feedbackEmitter, cleanupActions) {
|
|
61
|
-
return this.feedbackDispatcher.registerFeedback(feedbackEmitter
|
|
64
|
+
registerFeedback(feedbackActions, feedbackEmitter = this, cleanupActions) {
|
|
65
|
+
return this.feedbackDispatcher.registerFeedback(feedbackEmitter, feedbackActions, cleanupActions);
|
|
62
66
|
}
|
|
63
67
|
/**
|
|
64
68
|
* De-registers all feedback from the given `feedbackEmitter` (this tool by default) and cleans up any pending feedback with the
|
|
@@ -66,9 +70,10 @@ let BaseEditTool = class BaseEditTool {
|
|
|
66
70
|
*
|
|
67
71
|
* @param feedbackEmitter the emitter to be deregistered (this tool by default).
|
|
68
72
|
* @param cleanupActions the actions to be dispatched right after the deregistration to clean up any pending feedback.
|
|
73
|
+
* @deprecated It is recommended to create a {@link createFeedbackEmitter dedicated emitter} per feedback and dispose it like that.
|
|
69
74
|
*/
|
|
70
|
-
deregisterFeedback(feedbackEmitter, cleanupActions) {
|
|
71
|
-
this.feedbackDispatcher.deregisterFeedback(feedbackEmitter
|
|
75
|
+
deregisterFeedback(feedbackEmitter = this, cleanupActions) {
|
|
76
|
+
this.feedbackDispatcher.deregisterFeedback(feedbackEmitter, cleanupActions);
|
|
72
77
|
}
|
|
73
78
|
};
|
|
74
79
|
exports.BaseEditTool = BaseEditTool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-tools.js","sourceRoot":"","sources":["../../../src/features/tools/base-tools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,yCAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"base-tools.js","sourceRoot":"","sources":["../../../src/features/tools/base-tools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAAwG;AACxG,yCAA+C;AAC/C,oEAAoE;AACpE,8EAAyE;AAGzE,uDAAuE;AACvE,uDAAuD;AACvD,2DAA2D;AAE3D;;GAEG;AAEI,IAAe,YAAY,GAA3B,MAAe,YAAY;IAA3B;QAOgB,uBAAkB,GAAG,IAAI,8BAAoB,EAAE,CAAC;IA+CvE,CAAC;IA3CG,OAAO;QACH,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC;IACtC,CAAC;IAID,IAAI,UAAU;QACV,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,eAAe,CAAC,OAAiB;QAC7B,OAAO,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACtD,CAAC;IAED,qBAAqB;QACjB,OAAO,IAAI,CAAC,kBAAkB,CAAC,aAAa,EAAE,CAAC;IACnD,CAAC;IAED;;;;;;;;;OASG;IACH,gBAAgB,CAAC,eAAyB,EAAE,kBAAoC,IAAI,EAAE,cAA6B;QAC/G,OAAO,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,eAAe,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;IACtG,CAAC;IAED;;;;;;;OAOG;IACH,kBAAkB,CAAC,kBAAoC,IAAI,EAAE,cAA6B;QACtF,IAAI,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;IAChF,CAAC;CACJ,CAAA;AAtDqB,oCAAY;AACqB;IAAlD,IAAA,kBAAM,EAAC,eAAK,CAAC,yBAAyB,CAAC;;wDAAyD;AACtD;IAA1C,IAAA,kBAAM,EAAC,eAAK,CAAC,iBAAiB,CAAC;8BAA6B,wCAAoB;sDAAC;AACjD;IAAhC,IAAA,kBAAM,EAAC,0BAAa,CAAC;8BAAsB,0BAAa;+CAAC;AAC3B;IAA9B,IAAA,kBAAM,EAAC,sBAAW,CAAC;8BAAoB,sBAAW;6CAAC;AACH;IAAhD,IAAA,kBAAM,EAAC,6CAAoB,CAAC;8BAAmC,6CAAoB;mDAAC;uBALnE,YAAY;IADjC,IAAA,sBAAU,GAAE;GACS,YAAY,CAsDjC;AAGM,IAAe,gBAAgB,GAA/B,MAAe,gBAAmC,SAAQ,YAAY;IAIzE,MAAM,CAAC,MAAc;QACjB,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/B,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC;YAC5B,OAAO,wBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QAC/C,CAAC;IACL,CAAC;IAEQ,MAAM;QACX,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;YACnC,MAAM,IAAI,SAAS,CAAC,yBAAyB,IAAI,CAAC,EAAE,0CAA0C,CAAC,CAAC;QACpG,CAAC;QACD,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;CAGJ,CAAA;AAnBqB,4CAAgB;2BAAhB,gBAAgB;IADrC,IAAA,sBAAU,GAAE;GACS,gBAAgB,CAmBrC"}
|
|
@@ -13,12 +13,8 @@
|
|
|
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
|
|
17
|
-
import { DebouncedFunc } from 'lodash';
|
|
18
|
-
import { DragAwareMouseListener } from '../../../base/drag-aware-mouse-listener';
|
|
16
|
+
import { Action, CommandExecutionContext, CommandReturn } from '@eclipse-glsp/sprotty';
|
|
19
17
|
import { FeedbackCommand } from '../../../base/feedback/feedback-command';
|
|
20
|
-
import { PointPositionUpdater } from '../../change-bounds/point-position-updater';
|
|
21
|
-
import { ChangeBoundsTool } from './change-bounds-tool';
|
|
22
18
|
export interface ShowChangeBoundsToolResizeFeedbackAction extends Action {
|
|
23
19
|
kind: typeof ShowChangeBoundsToolResizeFeedbackAction.KIND;
|
|
24
20
|
elementId: string;
|
|
@@ -62,34 +58,4 @@ export declare namespace MoveFinishedEventAction {
|
|
|
62
58
|
function is(object: any): object is MoveFinishedEventAction;
|
|
63
59
|
function create(): MoveFinishedEventAction;
|
|
64
60
|
}
|
|
65
|
-
/**
|
|
66
|
-
* This mouse listener provides visual feedback for moving by sending client-side
|
|
67
|
-
* `MoveAction`s while elements are selected and dragged. This will also update
|
|
68
|
-
* their bounds, which is important, as it is not only required for rendering
|
|
69
|
-
* the visual feedback but also the basis for sending the change to the server
|
|
70
|
-
* (see also `tools/MoveTool`).
|
|
71
|
-
*/
|
|
72
|
-
export declare class FeedbackMoveMouseListener extends DragAwareMouseListener implements Disposable {
|
|
73
|
-
protected tool: ChangeBoundsTool;
|
|
74
|
-
protected rootElement?: GModelRoot;
|
|
75
|
-
protected positionUpdater: PointPositionUpdater;
|
|
76
|
-
protected elementId2startPos: Map<string, Point>;
|
|
77
|
-
protected pendingMoveInitialized?: DebouncedFunc<() => void>;
|
|
78
|
-
protected moveInitialized: boolean;
|
|
79
|
-
constructor(tool: ChangeBoundsTool);
|
|
80
|
-
mouseDown(target: GModelElement, event: MouseEvent): Action[];
|
|
81
|
-
protected scheduleMoveInitialized(): void;
|
|
82
|
-
mouseMove(target: GModelElement, event: MouseEvent): Action[];
|
|
83
|
-
protected collectStartPositions(root: GModelRoot): void;
|
|
84
|
-
protected isChildOfSelected(selectedElements: Set<GModelElement>, element: GModelElement): boolean;
|
|
85
|
-
protected getElementMoves(target: GModelElement, event: MouseEvent, finished: boolean): MoveAction | undefined;
|
|
86
|
-
protected getElementMovesForDelta(target: GModelElement, delta: Point, finished: boolean): ElementMove[];
|
|
87
|
-
protected validateMove(startPosition: Point, toPosition: Point, element: GModelElement, isFinished: boolean): Point;
|
|
88
|
-
mouseEnter(target: GModelElement, event: MouseEvent): Action[];
|
|
89
|
-
nonDraggingMouseUp(element: GModelElement, event: MouseEvent): Action[];
|
|
90
|
-
draggingMouseUp(target: GModelElement, event: MouseEvent): Action[];
|
|
91
|
-
protected resetMoveFeedback(): ElementMove[];
|
|
92
|
-
protected reset(resetFeedback?: boolean): void;
|
|
93
|
-
dispose(): void;
|
|
94
|
-
}
|
|
95
61
|
//# 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,
|
|
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,EAAE,MAAM,EAAE,uBAAuB,EAAE,aAAa,EAAwB,MAAM,uBAAuB,CAAC;AAG7G,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAK1E,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,MA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