@eclipse-glsp/client 2.2.0-next.343 → 2.2.0-next.345
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/lib/base/default.module.d.ts.map +1 -1
- package/lib/base/default.module.js +2 -0
- package/lib/base/default.module.js.map +1 -1
- package/lib/features/accessibility/accessibility-module.d.ts +1 -1
- package/lib/features/accessibility/accessibility-module.d.ts.map +1 -1
- package/lib/features/accessibility/accessibility-module.js +10 -8
- package/lib/features/accessibility/accessibility-module.js.map +1 -1
- package/lib/features/accessibility/element-navigation/element-navigation-module.d.ts +6 -4
- package/lib/features/accessibility/element-navigation/element-navigation-module.d.ts.map +1 -1
- package/lib/features/accessibility/element-navigation/element-navigation-module.js +8 -8
- package/lib/features/accessibility/element-navigation/element-navigation-module.js.map +1 -1
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.d.ts +6 -4
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.d.ts.map +1 -1
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.js +6 -6
- package/lib/features/accessibility/focus-tracker/focus-tracker-module.js.map +1 -1
- package/lib/features/accessibility/key-shortcut/{di.config.d.ts → shortcut-help-module.d.ts} +7 -5
- package/lib/features/accessibility/key-shortcut/shortcut-help-module.d.ts.map +1 -0
- package/lib/features/accessibility/key-shortcut/{di.config.js → shortcut-help-module.js} +6 -6
- package/lib/features/accessibility/key-shortcut/shortcut-help-module.js.map +1 -0
- package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.d.ts +1 -1
- package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.d.ts.map +1 -1
- package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.js +7 -7
- package/lib/features/accessibility/keyboard-pointer/keyboard-pointer-module.js.map +1 -1
- package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.d.ts.map +1 -1
- package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.js +1 -1
- package/lib/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.js.map +1 -1
- package/lib/features/accessibility/move-zoom/move-zoom-module.d.ts.map +1 -1
- package/lib/features/accessibility/move-zoom/move-zoom-module.js +1 -1
- package/lib/features/accessibility/move-zoom/move-zoom-module.js.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-module.d.ts.map +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-module.js +1 -1
- package/lib/features/accessibility/resize-key-tool/resize-key-module.js.map +1 -1
- package/lib/features/accessibility/search/search-palette-module.d.ts.map +1 -1
- package/lib/features/accessibility/search/search-palette-module.js +1 -1
- package/lib/features/accessibility/search/search-palette-module.js.map +1 -1
- package/lib/features/accessibility/toast/toast-module.d.ts +6 -4
- package/lib/features/accessibility/toast/toast-module.d.ts.map +1 -1
- package/lib/features/accessibility/toast/toast-module.js +5 -5
- package/lib/features/accessibility/toast/toast-module.js.map +1 -1
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts +2 -2
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.js +3 -3
- package/lib/features/accessibility/view-key-tools/deselect-key-tool.js.map +1 -1
- package/lib/features/accessibility/view-key-tools/view-key-tools-module.d.ts.map +1 -1
- package/lib/features/accessibility/view-key-tools/view-key-tools-module.js +3 -1
- package/lib/features/accessibility/view-key-tools/view-key-tools-module.js.map +1 -1
- package/lib/features/bounds/bounds-module.d.ts.map +1 -1
- package/lib/features/bounds/bounds-module.js +1 -1
- package/lib/features/bounds/bounds-module.js.map +1 -1
- package/lib/features/change-bounds/model.d.ts +7 -4
- package/lib/features/change-bounds/model.d.ts.map +1 -1
- package/lib/features/change-bounds/model.js +12 -11
- package/lib/features/change-bounds/model.js.map +1 -1
- package/lib/features/change-bounds/movement-restrictor.js +2 -2
- package/lib/features/command-palette/command-palette-module.d.ts.map +1 -1
- package/lib/features/command-palette/command-palette-module.js +1 -1
- package/lib/features/command-palette/command-palette-module.js.map +1 -1
- package/lib/features/context-menu/context-menu-module.d.ts.map +1 -1
- package/lib/features/context-menu/context-menu-module.js +1 -1
- package/lib/features/context-menu/context-menu-module.js.map +1 -1
- package/lib/features/copy-paste/copy-paste-modules.d.ts.map +1 -1
- package/lib/features/copy-paste/copy-paste-modules.js +5 -2
- package/lib/features/copy-paste/copy-paste-modules.js.map +1 -1
- package/lib/features/debug/debug-module.d.ts.map +1 -1
- package/lib/features/debug/debug-module.js +1 -1
- package/lib/features/debug/debug-module.js.map +1 -1
- package/lib/features/decoration/decoration-module.d.ts.map +1 -1
- package/lib/features/decoration/decoration-module.js +1 -1
- package/lib/features/decoration/decoration-module.js.map +1 -1
- package/lib/features/element-template/element-template-module.d.ts.map +1 -1
- package/lib/features/element-template/element-template-module.js +1 -1
- package/lib/features/element-template/element-template-module.js.map +1 -1
- package/lib/features/export/export-modules.d.ts.map +1 -1
- package/lib/features/export/export-modules.js +2 -2
- package/lib/features/export/export-modules.js.map +1 -1
- package/lib/features/grid/grid-module.d.ts.map +1 -1
- package/lib/features/grid/grid-module.js +1 -1
- package/lib/features/grid/grid-module.js.map +1 -1
- package/lib/features/helper-lines/helper-line-manager-default.js +1 -1
- package/lib/features/helper-lines/helper-line-module.d.ts.map +1 -1
- package/lib/features/helper-lines/helper-line-module.js +1 -1
- package/lib/features/helper-lines/helper-line-module.js.map +1 -1
- package/lib/features/hints/type-hints-module.d.ts.map +1 -1
- package/lib/features/hints/type-hints-module.js +1 -1
- package/lib/features/hints/type-hints-module.js.map +1 -1
- package/lib/features/hover/hover-module.d.ts.map +1 -1
- package/lib/features/hover/hover-module.js +1 -1
- package/lib/features/hover/hover-module.js.map +1 -1
- package/lib/features/label-edit/label-edit-module.d.ts.map +1 -1
- package/lib/features/label-edit/label-edit-module.js +1 -1
- package/lib/features/label-edit/label-edit-module.js.map +1 -1
- package/lib/features/label-edit-ui/label-edit-ui-module.d.ts.map +1 -1
- package/lib/features/label-edit-ui/label-edit-ui-module.js +1 -1
- package/lib/features/label-edit-ui/label-edit-ui-module.js.map +1 -1
- package/lib/features/layout/layout-module.d.ts.map +1 -1
- package/lib/features/layout/layout-module.js +1 -1
- package/lib/features/layout/layout-module.js.map +1 -1
- package/lib/features/navigation/navigation-module.d.ts.map +1 -1
- package/lib/features/navigation/navigation-module.js +1 -1
- package/lib/features/navigation/navigation-module.js.map +1 -1
- package/lib/features/routing/routing-module.d.ts.map +1 -1
- package/lib/features/routing/routing-module.js +1 -1
- package/lib/features/routing/routing-module.js.map +1 -1
- package/lib/features/save/save-module.d.ts.map +1 -1
- package/lib/features/save/save-module.js +1 -1
- package/lib/features/save/save-module.js.map +1 -1
- package/lib/features/select/select-module.d.ts.map +1 -1
- package/lib/features/select/select-module.js +2 -2
- package/lib/features/select/select-module.js.map +1 -1
- package/lib/features/select/select-mouse-listener.js +1 -1
- package/lib/features/source-model-watcher/source-model-watcher-module.d.ts.map +1 -1
- package/lib/features/source-model-watcher/source-model-watcher-module.js +1 -1
- package/lib/features/source-model-watcher/source-model-watcher-module.js.map +1 -1
- package/lib/features/status/status-module.d.ts.map +1 -1
- package/lib/features/status/status-module.js +1 -1
- package/lib/features/status/status-module.js.map +1 -1
- package/lib/features/svg-metadata/svg-metadata-module.d.ts.map +1 -1
- package/lib/features/svg-metadata/svg-metadata-module.js +1 -1
- package/lib/features/svg-metadata/svg-metadata-module.js.map +1 -1
- package/lib/features/tool-palette/tool-palette-module.d.ts.map +1 -1
- package/lib/features/tool-palette/tool-palette-module.js +1 -1
- package/lib/features/tool-palette/tool-palette-module.js.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-manager.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-manager.js +1 -1
- 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 +2 -2
- 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.js +2 -2
- package/lib/features/tools/change-bounds/change-bounds-tool.d.ts +3 -3
- package/lib/features/tools/change-bounds/change-bounds-tool.js +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tracker.d.ts +6 -6
- package/lib/features/tools/change-bounds/change-bounds-tracker.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/change-bounds-tracker.js +2 -2
- package/lib/features/tools/change-bounds/view.d.ts +8 -5
- package/lib/features/tools/change-bounds/view.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/view.js +8 -7
- package/lib/features/tools/change-bounds/view.js.map +1 -1
- package/lib/features/tools/deletion/deletion-tool-module.d.ts.map +1 -1
- package/lib/features/tools/deletion/deletion-tool-module.js +1 -1
- package/lib/features/tools/deletion/deletion-tool-module.js.map +1 -1
- package/lib/features/tools/edge-creation/edege-creation-module.d.ts.map +1 -1
- package/lib/features/tools/edge-creation/edege-creation-module.js +1 -1
- package/lib/features/tools/edge-creation/edege-creation-module.js.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-module.d.ts.map +1 -1
- package/lib/features/tools/edge-edit/edge-edit-module.js +1 -1
- package/lib/features/tools/edge-edit/edge-edit-module.js.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-selection-module.d.ts.map +1 -1
- package/lib/features/tools/marquee-selection/marquee-selection-module.js +1 -1
- package/lib/features/tools/marquee-selection/marquee-selection-module.js.map +1 -1
- package/lib/features/tools/node-creation/node-creation-module.d.ts.map +1 -1
- package/lib/features/tools/node-creation/node-creation-module.js +4 -1
- package/lib/features/tools/node-creation/node-creation-module.js.map +1 -1
- package/lib/features/tools/tool-focus-loss-module.d.ts +15 -0
- package/lib/features/tools/tool-focus-loss-module.d.ts.map +1 -1
- package/lib/features/tools/tool-focus-loss-module.js +2 -2
- package/lib/features/tools/tool-focus-loss-module.js.map +1 -1
- package/lib/features/undo-redo/undo-redo-module.d.ts +3 -3
- package/lib/features/undo-redo/undo-redo-module.d.ts.map +1 -1
- package/lib/features/undo-redo/undo-redo-module.js +3 -4
- package/lib/features/undo-redo/undo-redo-module.js.map +1 -1
- package/lib/features/validation/validation-modules.d.ts.map +1 -1
- package/lib/features/validation/validation-modules.js +3 -3
- package/lib/features/validation/validation-modules.js.map +1 -1
- package/lib/features/viewport/viewport-modules.d.ts.map +1 -1
- package/lib/features/viewport/viewport-modules.js +2 -2
- package/lib/features/viewport/viewport-modules.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/standalone-modules.d.ts +1 -1
- package/lib/standalone-modules.d.ts.map +1 -1
- package/lib/standalone-modules.js +1 -1
- package/lib/standalone-modules.js.map +1 -1
- package/lib/views/base-view-module.d.ts.map +1 -1
- package/lib/views/base-view-module.js +1 -1
- package/lib/views/base-view-module.js.map +1 -1
- package/package.json +3 -3
- package/src/base/default.module.ts +80 -73
- package/src/features/accessibility/accessibility-module.ts +25 -20
- package/src/features/accessibility/element-navigation/element-navigation-module.ts +17 -10
- package/src/features/accessibility/focus-tracker/focus-tracker-module.ts +14 -7
- package/src/features/accessibility/key-shortcut/{di.config.ts → shortcut-help-module.ts} +14 -7
- package/src/features/accessibility/keyboard-pointer/keyboard-pointer-module.ts +18 -15
- package/src/features/accessibility/keyboard-tool-palette/keyboard-tool-palette-module.ts +7 -4
- package/src/features/accessibility/move-zoom/move-zoom-module.ts +7 -4
- package/src/features/accessibility/resize-key-tool/resize-key-module.ts +7 -4
- package/src/features/accessibility/search/search-palette-module.ts +7 -4
- package/src/features/accessibility/toast/toast-module.ts +14 -7
- package/src/features/accessibility/view-key-tools/deselect-key-tool.ts +8 -8
- package/src/features/accessibility/view-key-tools/view-key-tools-module.ts +10 -5
- package/src/features/bounds/bounds-module.ts +20 -17
- package/src/features/change-bounds/model.ts +17 -12
- package/src/features/change-bounds/movement-restrictor.ts +3 -3
- package/src/features/command-palette/command-palette-module.ts +9 -6
- package/src/features/context-menu/context-menu-module.ts +16 -13
- package/src/features/copy-paste/copy-paste-modules.ts +11 -5
- package/src/features/debug/debug-module.ts +10 -7
- package/src/features/decoration/decoration-module.ts +6 -3
- package/src/features/element-template/element-template-module.ts +8 -5
- package/src/features/export/export-modules.ts +10 -7
- package/src/features/grid/grid-module.ts +11 -8
- package/src/features/helper-lines/helper-line-manager-default.ts +2 -2
- package/src/features/helper-lines/helper-line-module.ts +16 -13
- package/src/features/hints/type-hints-module.ts +10 -7
- package/src/features/hover/hover-module.ts +28 -25
- package/src/features/label-edit/label-edit-module.ts +9 -6
- package/src/features/label-edit-ui/label-edit-ui-module.ts +9 -6
- package/src/features/layout/layout-module.ts +8 -5
- package/src/features/navigation/navigation-module.ts +11 -8
- package/src/features/routing/routing-module.ts +21 -18
- package/src/features/save/save-module.ts +6 -3
- package/src/features/select/select-module.ts +11 -8
- package/src/features/select/select-mouse-listener.ts +2 -2
- package/src/features/source-model-watcher/source-model-watcher-module.ts +6 -3
- package/src/features/status/status-module.ts +9 -6
- package/src/features/svg-metadata/svg-metadata-module.ts +7 -4
- package/src/features/tool-palette/tool-palette-module.ts +10 -7
- package/src/features/tools/change-bounds/change-bounds-manager.ts +2 -2
- package/src/features/tools/change-bounds/change-bounds-tool-module.ts +13 -10
- package/src/features/tools/change-bounds/change-bounds-tool-move-feedback.ts +3 -3
- package/src/features/tools/change-bounds/change-bounds-tool.ts +4 -4
- package/src/features/tools/change-bounds/change-bounds-tracker.ts +6 -6
- package/src/features/tools/change-bounds/view.tsx +11 -6
- package/src/features/tools/deletion/deletion-tool-module.ts +8 -5
- package/src/features/tools/edge-creation/edege-creation-module.ts +9 -6
- package/src/features/tools/edge-edit/edge-edit-module.ts +14 -11
- package/src/features/tools/marquee-selection/marquee-selection-module.ts +11 -8
- package/src/features/tools/node-creation/node-creation-module.ts +4 -1
- package/src/features/tools/tool-focus-loss-module.ts +7 -4
- package/src/features/undo-redo/undo-redo-module.ts +8 -6
- package/src/features/validation/validation-modules.ts +19 -13
- package/src/features/viewport/viewport-modules.ts +20 -17
- package/src/index.ts +1 -1
- package/src/standalone-modules.ts +12 -9
- package/src/views/base-view-module.ts +7 -4
- package/lib/features/accessibility/key-shortcut/di.config.d.ts.map +0 -1
- package/lib/features/accessibility/key-shortcut/di.config.js.map +0 -1
|
@@ -17,6 +17,9 @@ import { FeatureModule, TYPES, bindAsService } from '@eclipse-glsp/sprotty';
|
|
|
17
17
|
import '../../../css/decoration.css';
|
|
18
18
|
import { GlspDecorationPlacer } from './decoration-placer';
|
|
19
19
|
|
|
20
|
-
export const decorationModule = new FeatureModule(
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
export const decorationModule = new FeatureModule(
|
|
21
|
+
bind => {
|
|
22
|
+
bindAsService(bind, TYPES.IVNodePostprocessor, GlspDecorationPlacer);
|
|
23
|
+
},
|
|
24
|
+
{ featureId: Symbol('decoration') }
|
|
25
|
+
);
|
|
@@ -17,8 +17,11 @@ import { FeatureModule, configureCommand } from '@eclipse-glsp/sprotty';
|
|
|
17
17
|
import { AddTemplateElementsFeedbackCommand } from './add-template-element';
|
|
18
18
|
import { RemoveTemplateElementsFeedbackCommand } from './remove-template-element';
|
|
19
19
|
|
|
20
|
-
export const elementTemplateModule = new FeatureModule(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
export const elementTemplateModule = new FeatureModule(
|
|
21
|
+
(bind, unbind, isBound, rebind) => {
|
|
22
|
+
const context = { bind, unbind, isBound, rebind };
|
|
23
|
+
configureCommand(context, AddTemplateElementsFeedbackCommand);
|
|
24
|
+
configureCommand(context, RemoveTemplateElementsFeedbackCommand);
|
|
25
|
+
},
|
|
26
|
+
{ featureId: Symbol('elementTemplate') }
|
|
27
|
+
);
|
|
@@ -27,12 +27,15 @@ import {
|
|
|
27
27
|
import { ExportSvgActionHandler } from './export-svg-action-handler';
|
|
28
28
|
import { GLSPSvgExporter } from './glsp-svg-exporter';
|
|
29
29
|
|
|
30
|
-
export const exportModule = new FeatureModule(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
export const exportModule = new FeatureModule(
|
|
31
|
+
(bind, _unbind, isBound) => {
|
|
32
|
+
const context = { bind, isBound };
|
|
33
|
+
bindAsService(context, TYPES.HiddenVNodePostprocessor, ExportSvgPostprocessor);
|
|
34
|
+
configureCommand(context, ExportSvgCommand);
|
|
35
|
+
bind(TYPES.SvgExporter).to(GLSPSvgExporter).inSingletonScope();
|
|
36
|
+
},
|
|
37
|
+
{ featureId: Symbol('export') }
|
|
38
|
+
);
|
|
36
39
|
|
|
37
40
|
/**
|
|
38
41
|
* Feature module that is intended for the standalone deployment of GLSP (i.e. plain webapp)
|
|
@@ -46,5 +49,5 @@ export const standaloneExportModule = new FeatureModule(
|
|
|
46
49
|
bind(ExportSvgActionHandler).toSelf().inSingletonScope();
|
|
47
50
|
configureActionHandler(context, ExportSvgAction.KIND, ExportSvgActionHandler);
|
|
48
51
|
},
|
|
49
|
-
{ requires: exportModule }
|
|
52
|
+
{ featureId: Symbol('standaloneExport'), requires: exportModule }
|
|
50
53
|
);
|
|
@@ -20,15 +20,18 @@ import { GridManager } from './grid-manager';
|
|
|
20
20
|
import { ShowGridAction, ShowGridCommand } from './grid-model';
|
|
21
21
|
import { GridSnapper } from './grid-snapper';
|
|
22
22
|
|
|
23
|
-
export const gridModule = new FeatureModule(
|
|
24
|
-
|
|
23
|
+
export const gridModule = new FeatureModule(
|
|
24
|
+
(bind, unbind, isBound, rebind) => {
|
|
25
|
+
const context = { bind, unbind, isBound, rebind };
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
bind(TYPES.Grid).toConstantValue({ x: 10, y: 10 });
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
configureCommand(context, ShowGridCommand);
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
bind(GridManager).toSelf().inSingletonScope();
|
|
32
|
+
configureActionHandler(context, ShowGridAction.KIND, GridManager);
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
}
|
|
34
|
+
bind(TYPES.ISnapper).to(GridSnapper);
|
|
35
|
+
},
|
|
36
|
+
{ featureId: Symbol('grid') }
|
|
37
|
+
);
|
|
@@ -30,7 +30,7 @@ import { IFeedbackActionDispatcher } from '../../base/feedback/feedback-action-d
|
|
|
30
30
|
import { FeedbackEmitter } from '../../base/feedback/feedback-emitter';
|
|
31
31
|
import { ISelectionListener, SelectionService } from '../../base/selection-service';
|
|
32
32
|
import { SetBoundsFeedbackAction } from '../bounds/set-bounds-feedback-command';
|
|
33
|
-
import {
|
|
33
|
+
import { GResizeHandle, ResizeHandleLocation } from '../change-bounds/model';
|
|
34
34
|
import { Grid } from '../grid/grid';
|
|
35
35
|
import { MoveFinishedEventAction, MoveInitializedEventAction } from '../tools/change-bounds/change-bounds-tool-feedback';
|
|
36
36
|
import {
|
|
@@ -182,7 +182,7 @@ export class HelperLineManager implements IActionHandler, ISelectionListener, IH
|
|
|
182
182
|
|
|
183
183
|
const minimum: Writable<Vector> = { ...Vector.ZERO };
|
|
184
184
|
const resize =
|
|
185
|
-
element instanceof
|
|
185
|
+
element instanceof GResizeHandle
|
|
186
186
|
? ResizeHandleLocation.direction(element.location)
|
|
187
187
|
: [Direction.Left, Direction.Right, Direction.Up, Direction.Down];
|
|
188
188
|
|
|
@@ -31,17 +31,20 @@ import { HelperLineManager } from './helper-line-manager-default';
|
|
|
31
31
|
import { HELPER_LINE, HelperLine, SELECTION_BOUNDS, SelectionBounds } from './model';
|
|
32
32
|
import { HelperLineView, SelectionBoundsView } from './view';
|
|
33
33
|
|
|
34
|
-
export const helperLineModule = new FeatureModule(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
export const helperLineModule = new FeatureModule(
|
|
35
|
+
(bind, unbind, isBound, rebind) => {
|
|
36
|
+
const context = { bind, unbind, isBound, rebind };
|
|
37
|
+
configureModelElement(context, HELPER_LINE, HelperLine, HelperLineView);
|
|
38
|
+
configureModelElement(context, SELECTION_BOUNDS, SelectionBounds, SelectionBoundsView);
|
|
39
|
+
configureCommand(context, DrawHelperLinesFeedbackCommand);
|
|
40
|
+
configureCommand(context, RemoveHelperLinesFeedbackCommand);
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
42
|
+
bindAsService(bind, TYPES.IHelperLineManager, HelperLineManager);
|
|
43
|
+
configureActionHandler(context, SetBoundsAction.KIND, TYPES.IHelperLineManager);
|
|
44
|
+
configureActionHandler(context, SetBoundsFeedbackAction.KIND, TYPES.IHelperLineManager);
|
|
45
|
+
configureActionHandler(context, MoveAction.KIND, TYPES.IHelperLineManager);
|
|
46
|
+
configureActionHandler(context, MoveInitializedEventAction.KIND, TYPES.IHelperLineManager);
|
|
47
|
+
configureActionHandler(context, MoveFinishedEventAction.KIND, TYPES.IHelperLineManager);
|
|
48
|
+
},
|
|
49
|
+
{ featureId: Symbol('helperLine') }
|
|
50
|
+
);
|
|
@@ -16,10 +16,13 @@
|
|
|
16
16
|
import { FeatureModule, SetTypeHintsAction, TYPES, bindAsService, configureActionHandler, configureCommand } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import { ApplyTypeHintsCommand, TypeHintProvider } from './type-hint-provider';
|
|
18
18
|
|
|
19
|
-
export const typeHintsModule = new FeatureModule(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
export const typeHintsModule = new FeatureModule(
|
|
20
|
+
(bind, unbind, isBound) => {
|
|
21
|
+
const context = { bind, unbind, isBound };
|
|
22
|
+
bindAsService(context, TYPES.ITypeHintProvider, TypeHintProvider);
|
|
23
|
+
bind(TYPES.IDiagramStartup).toService(TypeHintProvider);
|
|
24
|
+
configureActionHandler(context, SetTypeHintsAction.KIND, TypeHintProvider);
|
|
25
|
+
configureCommand(context, ApplyTypeHintsCommand);
|
|
26
|
+
},
|
|
27
|
+
{ featureId: Symbol('typeHints') }
|
|
28
|
+
);
|
|
@@ -35,30 +35,33 @@ import { FocusStateChangedAction } from '../../base/focus/focus-state-change-act
|
|
|
35
35
|
import { EnableDefaultToolsAction, EnableToolsAction } from '../../base/tool-manager/tool';
|
|
36
36
|
import { GlspHoverMouseListener } from './hover';
|
|
37
37
|
|
|
38
|
-
export const hoverModule = new FeatureModule(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
export const hoverModule = new FeatureModule(
|
|
39
|
+
(bind, _unbind, isBound) => {
|
|
40
|
+
const context = { bind, isBound };
|
|
41
|
+
bindAsService(context, TYPES.PopupVNodePostprocessor, PopupPositionUpdater);
|
|
42
|
+
bindAsService(context, TYPES.MouseListener, GlspHoverMouseListener);
|
|
43
|
+
bindAsService(context, TYPES.PopupMouseListener, PopupHoverMouseListener);
|
|
44
|
+
bindAsService(context, TYPES.KeyListener, HoverKeyListener);
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
bind<HoverState>(TYPES.HoverState).toConstantValue({
|
|
47
|
+
mouseOverTimer: undefined,
|
|
48
|
+
mouseOutTimer: undefined,
|
|
49
|
+
popupOpen: false,
|
|
50
|
+
previousPopupElement: undefined
|
|
51
|
+
});
|
|
52
|
+
bind(ClosePopupActionHandler).toSelf().inSingletonScope();
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
54
|
+
configureCommand(context, HoverFeedbackCommand);
|
|
55
|
+
configureCommand(context, SetPopupModelCommand);
|
|
56
|
+
configureActionHandler(context, SetPopupModelCommand.KIND, ClosePopupActionHandler);
|
|
57
|
+
configureActionHandler(context, FitToScreenCommand.KIND, ClosePopupActionHandler);
|
|
58
|
+
configureActionHandler(context, CenterCommand.KIND, ClosePopupActionHandler);
|
|
59
|
+
configureActionHandler(context, SetViewportCommand.KIND, ClosePopupActionHandler);
|
|
60
|
+
configureActionHandler(context, MoveCommand.KIND, ClosePopupActionHandler);
|
|
61
|
+
configureActionHandler(context, FocusStateChangedAction.KIND, ClosePopupActionHandler);
|
|
62
|
+
configureActionHandler(context, EnableToolsAction.KIND, GlspHoverMouseListener);
|
|
63
|
+
configureActionHandler(context, EnableDefaultToolsAction.KIND, GlspHoverMouseListener);
|
|
64
|
+
configureActionHandler(context, FocusStateChangedAction.KIND, GlspHoverMouseListener);
|
|
65
|
+
},
|
|
66
|
+
{ featureId: Symbol('hover') }
|
|
67
|
+
);
|
|
@@ -17,9 +17,12 @@ import { ApplyLabelEditCommand, FeatureModule, TYPES, bindAsService, configureCo
|
|
|
17
17
|
import { DirectLabelEditTool } from './edit-label-tool';
|
|
18
18
|
import { BalloonLabelValidationDecorator, ServerEditLabelValidator } from './edit-label-validator';
|
|
19
19
|
|
|
20
|
-
export const labelEditModule = new FeatureModule(
|
|
21
|
-
bind
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
});
|
|
20
|
+
export const labelEditModule = new FeatureModule(
|
|
21
|
+
(bind, _unbind, isBound, _rebind) => {
|
|
22
|
+
bind(TYPES.IEditLabelValidator).to(ServerEditLabelValidator);
|
|
23
|
+
bind(TYPES.IEditLabelValidationDecorator).to(BalloonLabelValidationDecorator);
|
|
24
|
+
bindAsService(bind, TYPES.IDefaultTool, DirectLabelEditTool);
|
|
25
|
+
configureCommand({ bind, isBound }, ApplyLabelEditCommand);
|
|
26
|
+
},
|
|
27
|
+
{ featureId: Symbol('labelEdit') }
|
|
28
|
+
);
|
|
@@ -16,9 +16,12 @@
|
|
|
16
16
|
import { EditLabelAction, EditLabelActionHandler, FeatureModule, TYPES, configureActionHandler } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import { GlspEditLabelUI } from './label-edit-ui';
|
|
18
18
|
|
|
19
|
-
export const labelEditUiModule = new FeatureModule(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
export const labelEditUiModule = new FeatureModule(
|
|
20
|
+
(bind, unbind, isBound, rebind, ...rest) => {
|
|
21
|
+
const context = { bind, unbind, isBound, rebind };
|
|
22
|
+
configureActionHandler(context, EditLabelAction.KIND, EditLabelActionHandler);
|
|
23
|
+
bind(GlspEditLabelUI).toSelf().inSingletonScope();
|
|
24
|
+
bind(TYPES.IUIExtension).toService(GlspEditLabelUI);
|
|
25
|
+
},
|
|
26
|
+
{ featureId: Symbol('labelEditUi') }
|
|
27
|
+
);
|
|
@@ -21,8 +21,11 @@ import {
|
|
|
21
21
|
ResizeElementsActionHandler
|
|
22
22
|
} from './layout-elements-action';
|
|
23
23
|
|
|
24
|
-
export const layoutModule = new FeatureModule(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
export const layoutModule = new FeatureModule(
|
|
25
|
+
(bind, _unbind, isBound) => {
|
|
26
|
+
const context = { bind, isBound };
|
|
27
|
+
configureActionHandler(context, ResizeElementsAction.KIND, ResizeElementsActionHandler);
|
|
28
|
+
configureActionHandler(context, AlignElementsAction.KIND, AlignElementsActionHandler);
|
|
29
|
+
},
|
|
30
|
+
{ featureId: Symbol('layout') }
|
|
31
|
+
);
|
|
@@ -17,11 +17,14 @@ import { FeatureModule, NavigateToExternalTargetAction, NavigateToTargetAction,
|
|
|
17
17
|
import { NavigateAction, NavigationActionHandler, ProcessNavigationArgumentsAction } from './navigation-action-handler';
|
|
18
18
|
import { NavigationTargetResolver } from './navigation-target-resolver';
|
|
19
19
|
|
|
20
|
-
export const navigationModule = new FeatureModule(
|
|
21
|
-
bind
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
20
|
+
export const navigationModule = new FeatureModule(
|
|
21
|
+
(bind, _unbind, isBound) => {
|
|
22
|
+
bind(NavigationTargetResolver).toSelf().inSingletonScope();
|
|
23
|
+
bind(NavigationActionHandler).toSelf().inSingletonScope();
|
|
24
|
+
configureActionHandler({ bind, isBound }, NavigateAction.KIND, NavigationActionHandler);
|
|
25
|
+
configureActionHandler({ bind, isBound }, NavigateToTargetAction.KIND, NavigationActionHandler);
|
|
26
|
+
configureActionHandler({ bind, isBound }, ProcessNavigationArgumentsAction.KIND, NavigationActionHandler);
|
|
27
|
+
configureActionHandler({ bind, isBound }, NavigateToExternalTargetAction.KIND, NavigationActionHandler);
|
|
28
|
+
},
|
|
29
|
+
{ featureId: Symbol('navigation') }
|
|
30
|
+
);
|
|
@@ -33,25 +33,28 @@ import {
|
|
|
33
33
|
} from '@eclipse-glsp/sprotty';
|
|
34
34
|
import { GLSPBezierEdgeRouter, GLSPManhattanEdgeRouter, GLSPPolylineEdgeRouter } from './edge-router';
|
|
35
35
|
|
|
36
|
-
export const routingModule = new FeatureModule(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
export const routingModule = new FeatureModule(
|
|
37
|
+
(bind, unbind, isBound, rebind) => {
|
|
38
|
+
const context = { bind, unbind, isBound, rebind };
|
|
39
|
+
bind(EdgeRouterRegistry).toSelf().inSingletonScope();
|
|
40
|
+
bind(AnchorComputerRegistry).toSelf().inSingletonScope();
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
bindAsService(context, TYPES.IEdgeRouter, GLSPManhattanEdgeRouter);
|
|
43
|
+
bindAsService(context, TYPES.IAnchorComputer, ManhattanEllipticAnchor);
|
|
44
|
+
bindAsService(context, TYPES.IAnchorComputer, ManhattanRectangularAnchor);
|
|
45
|
+
bindAsService(context, TYPES.IAnchorComputer, ManhattanDiamondAnchor);
|
|
45
46
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
bindAsService(context, TYPES.IEdgeRouter, GLSPPolylineEdgeRouter);
|
|
48
|
+
bindAsService(context, TYPES.IAnchorComputer, EllipseAnchor);
|
|
49
|
+
bindAsService(context, TYPES.IAnchorComputer, RectangleAnchor);
|
|
50
|
+
bindAsService(context, TYPES.IAnchorComputer, DiamondAnchor);
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
bindAsService(context, TYPES.IEdgeRouter, GLSPBezierEdgeRouter);
|
|
53
|
+
bindAsService(context, TYPES.IAnchorComputer, BezierEllipseAnchor);
|
|
54
|
+
bindAsService(context, TYPES.IAnchorComputer, BezierRectangleAnchor);
|
|
55
|
+
bindAsService(context, TYPES.IAnchorComputer, BezierDiamondAnchor);
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
}
|
|
57
|
+
configureCommand({ bind, isBound }, AddRemoveBezierSegmentCommand);
|
|
58
|
+
},
|
|
59
|
+
{ featureId: Symbol('routing') }
|
|
60
|
+
);
|
|
@@ -21,6 +21,9 @@ import { SaveModelKeyboardListener } from './save-keylistener';
|
|
|
21
21
|
* When integrated into an application frame (e.g Theia/VS Code) this module is typically omitted and/or replaced
|
|
22
22
|
* with an application native module.
|
|
23
23
|
*/
|
|
24
|
-
export const saveModule = new FeatureModule(
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
export const saveModule = new FeatureModule(
|
|
25
|
+
bind => {
|
|
26
|
+
bindAsService(bind, TYPES.KeyListener, SaveModelKeyboardListener);
|
|
27
|
+
},
|
|
28
|
+
{ featureId: Symbol('save') }
|
|
29
|
+
);
|
|
@@ -18,13 +18,16 @@ import { SelectAllCommand, SelectCommand } from '../../base/selection-service';
|
|
|
18
18
|
import { SelectFeedbackCommand } from './select-feedback-command';
|
|
19
19
|
import { RankedSelectMouseListener } from './select-mouse-listener';
|
|
20
20
|
|
|
21
|
-
export const selectModule = new FeatureModule(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
export const selectModule = new FeatureModule(
|
|
22
|
+
(bind, _unbind, isBound) => {
|
|
23
|
+
const context = { bind, isBound };
|
|
24
|
+
configureCommand(context, SelectCommand);
|
|
25
|
+
configureCommand(context, SelectAllCommand);
|
|
26
|
+
configureCommand(context, SelectFeedbackCommand);
|
|
27
|
+
bindAsService(context, TYPES.MouseListener, RankedSelectMouseListener);
|
|
28
|
+
},
|
|
29
|
+
{ featureId: Symbol('select') }
|
|
30
|
+
);
|
|
28
31
|
|
|
29
32
|
/**
|
|
30
33
|
* Feature module that is intended for the standalone deployment of GLSP (i.e. plain webapp)
|
|
@@ -35,5 +38,5 @@ export const standaloneSelectModule = new FeatureModule(
|
|
|
35
38
|
bind => {
|
|
36
39
|
bindAsService(bind, TYPES.KeyListener, SelectKeyboardListener);
|
|
37
40
|
},
|
|
38
|
-
{ requires: selectModule }
|
|
41
|
+
{ featureId: Symbol('standaloneSelect'), requires: selectModule }
|
|
39
42
|
);
|
|
@@ -17,7 +17,7 @@ import { Action, BringToFrontAction, GModelElement, SelectAction, SelectMouseLis
|
|
|
17
17
|
import { inject, injectable, optional } from 'inversify';
|
|
18
18
|
import { Ranked } from '../../base/ranked';
|
|
19
19
|
import { SelectableElement } from '../../utils/gmodel-util';
|
|
20
|
-
import {
|
|
20
|
+
import { GResizeHandle } from '../change-bounds/model';
|
|
21
21
|
import { ChangeBoundsManager } from '../tools/change-bounds/change-bounds-manager';
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -60,7 +60,7 @@ export class RankedSelectMouseListener extends SelectMouseListener implements Ra
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
protected override handleButton(target: GModelElement, event: MouseEvent): (Action | Promise<Action>)[] | undefined {
|
|
63
|
-
if (target instanceof
|
|
63
|
+
if (target instanceof GResizeHandle && this.changeBoundsManager?.useSymmetricResize(event)) {
|
|
64
64
|
// avoid de-selecting elements when resizing with a modifier key
|
|
65
65
|
return [];
|
|
66
66
|
}
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
import { FeatureModule, SourceModelChangedAction, configureActionHandler } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import { SourceModelChangedActionHandler } from './source-model-changed-action-handler';
|
|
18
18
|
|
|
19
|
-
export const sourceModelWatcherModule = new FeatureModule(
|
|
20
|
-
|
|
21
|
-
});
|
|
19
|
+
export const sourceModelWatcherModule = new FeatureModule(
|
|
20
|
+
(bind, _unbind, isBound) => {
|
|
21
|
+
configureActionHandler({ bind, isBound }, SourceModelChangedAction.KIND, SourceModelChangedActionHandler);
|
|
22
|
+
},
|
|
23
|
+
{ featureId: Symbol('sourceModelWatcher') }
|
|
24
|
+
);
|
|
@@ -18,9 +18,12 @@ import { FeatureModule, StatusAction, TYPES, bindAsService, configureActionHandl
|
|
|
18
18
|
import '../../../css/status-overlay.css';
|
|
19
19
|
import { StatusOverlay } from './status-overlay';
|
|
20
20
|
|
|
21
|
-
export const statusModule = new FeatureModule(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
export const statusModule = new FeatureModule(
|
|
22
|
+
(bind, unbind, isBound, rebind) => {
|
|
23
|
+
const context = { bind, unbind, isBound, rebind };
|
|
24
|
+
bindAsService(context, TYPES.IUIExtension, StatusOverlay);
|
|
25
|
+
bind(TYPES.IDiagramStartup).toService(StatusOverlay);
|
|
26
|
+
configureActionHandler(context, StatusAction.KIND, StatusOverlay);
|
|
27
|
+
},
|
|
28
|
+
{ featureId: Symbol('status') }
|
|
29
|
+
);
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
import { FeatureModule, TYPES } from '@eclipse-glsp/sprotty';
|
|
18
18
|
import { MetadataPlacer } from './metadata-placer';
|
|
19
19
|
|
|
20
|
-
export const svgMetadataModule = new FeatureModule(
|
|
21
|
-
bind
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
export const svgMetadataModule = new FeatureModule(
|
|
21
|
+
bind => {
|
|
22
|
+
bind(MetadataPlacer).toSelf().inSingletonScope();
|
|
23
|
+
bind(TYPES.IVNodePostprocessor).toService(MetadataPlacer);
|
|
24
|
+
},
|
|
25
|
+
{ featureId: Symbol('svgMetadata') }
|
|
26
|
+
);
|
|
@@ -18,10 +18,13 @@ import '../../../css/tool-palette.css';
|
|
|
18
18
|
import { EnableDefaultToolsAction } from '../../base/tool-manager/tool';
|
|
19
19
|
import { ToolPalette } from './tool-palette';
|
|
20
20
|
|
|
21
|
-
export const toolPaletteModule = new FeatureModule(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
21
|
+
export const toolPaletteModule = new FeatureModule(
|
|
22
|
+
(bind, _unbind, isBound, _rebind) => {
|
|
23
|
+
bindAsService(bind, TYPES.IUIExtension, ToolPalette);
|
|
24
|
+
bind(TYPES.IDiagramStartup).toService(ToolPalette);
|
|
25
|
+
configureActionHandler({ bind, isBound }, EnableDefaultToolsAction.KIND, ToolPalette);
|
|
26
|
+
configureActionHandler({ bind, isBound }, UpdateModelAction.KIND, ToolPalette);
|
|
27
|
+
configureActionHandler({ bind, isBound }, SetModelAction.KIND, ToolPalette);
|
|
28
|
+
},
|
|
29
|
+
{ featureId: Symbol('toolPalette') }
|
|
30
|
+
);
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
import { FeedbackEmitter } from '../../../base/feedback/feedback-emitter';
|
|
41
41
|
import { isValidMove, minDimensions } from '../../../utils/layout-utils';
|
|
42
42
|
import { LayoutAware } from '../../bounds/layout-data';
|
|
43
|
-
import {
|
|
43
|
+
import { GResizeHandle, ResizeHandleLocation } from '../../change-bounds/model';
|
|
44
44
|
import {
|
|
45
45
|
IMovementRestrictor,
|
|
46
46
|
movementRestrictionFeedback,
|
|
@@ -154,7 +154,7 @@ export class ChangeBoundsManager {
|
|
|
154
154
|
);
|
|
155
155
|
|
|
156
156
|
// cursor feedback on graph
|
|
157
|
-
const cursorClass =
|
|
157
|
+
const cursorClass = GResizeHandle.getCursorCss(resize.handleMove.element);
|
|
158
158
|
feedback.add(cursorFeedbackAction(cursorClass), cursorFeedbackAction(CursorCSS.DEFAULT));
|
|
159
159
|
|
|
160
160
|
// handle feedback
|
|
@@ -15,17 +15,20 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { FeatureModule, TYPES, bindAsService, configureCommand, configureView } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import '../../../../css/change-bounds.css';
|
|
18
|
-
import {
|
|
18
|
+
import { GResizeHandle } from '../../change-bounds/model';
|
|
19
19
|
import { ChangeBoundsManager } from './change-bounds-manager';
|
|
20
20
|
import { ChangeBoundsTool } from './change-bounds-tool';
|
|
21
21
|
import { HideChangeBoundsToolResizeFeedbackCommand, ShowChangeBoundsToolResizeFeedbackCommand } from './change-bounds-tool-feedback';
|
|
22
|
-
import {
|
|
22
|
+
import { GResizeHandleView } from './view';
|
|
23
23
|
|
|
24
|
-
export const changeBoundsToolModule = new FeatureModule(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
export const changeBoundsToolModule = new FeatureModule(
|
|
25
|
+
(bind, unbind, isBound, rebind) => {
|
|
26
|
+
const context = { bind, unbind, isBound, rebind };
|
|
27
|
+
bind(ChangeBoundsManager).toSelf().inSingletonScope();
|
|
28
|
+
bindAsService(context, TYPES.IDefaultTool, ChangeBoundsTool);
|
|
29
|
+
configureCommand(context, ShowChangeBoundsToolResizeFeedbackCommand);
|
|
30
|
+
configureCommand(context, HideChangeBoundsToolResizeFeedbackCommand);
|
|
31
|
+
configureView(context, GResizeHandle.TYPE, GResizeHandleView);
|
|
32
|
+
},
|
|
33
|
+
{ featureId: Symbol('changeBoundsTool') }
|
|
34
|
+
);
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
isNonRoutableSelectedMovableBoundsAware,
|
|
27
27
|
removeDescendants
|
|
28
28
|
} from '../../../utils/gmodel-util';
|
|
29
|
-
import {
|
|
29
|
+
import { GResizeHandle } from '../../change-bounds/model';
|
|
30
30
|
import { ChangeBoundsTool } from './change-bounds-tool';
|
|
31
31
|
import { MoveFinishedEventAction, MoveInitializedEventAction } from './change-bounds-tool-feedback';
|
|
32
32
|
import { ChangeBoundsTracker, TrackedMove } from './change-bounds-tracker';
|
|
@@ -66,7 +66,7 @@ export class FeedbackMoveMouseListener extends DragAwareMouseListener {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
protected initializeMove(target: GModelElement, event: MouseEvent): void {
|
|
69
|
-
if (target instanceof
|
|
69
|
+
if (target instanceof GResizeHandle) {
|
|
70
70
|
// avoid conflict with resize tool
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
@@ -102,7 +102,7 @@ export class FeedbackMoveMouseListener extends DragAwareMouseListener {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
protected isValidMoveable(element?: GModelElement): element is MoveableElement {
|
|
105
|
-
return !!element && isNonRoutableSelectedMovableBoundsAware(element) && !(element instanceof
|
|
105
|
+
return !!element && isNonRoutableSelectedMovableBoundsAware(element) && !(element instanceof GResizeHandle);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
override nonDraggingMouseUp(element: GModelElement, event: MouseEvent): Action[] {
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
} from '../../../utils/gmodel-util';
|
|
52
52
|
import { LocalRequestBoundsAction } from '../../bounds/local-bounds';
|
|
53
53
|
import { SetBoundsFeedbackAction } from '../../bounds/set-bounds-feedback-command';
|
|
54
|
-
import {
|
|
54
|
+
import { GResizeHandle, isResizable } from '../../change-bounds/model';
|
|
55
55
|
import { IMovementRestrictor } from '../../change-bounds/movement-restrictor';
|
|
56
56
|
import { BaseEditTool } from '../base-tools';
|
|
57
57
|
import { CSS_ACTIVE_HANDLE, ChangeBoundsManager } from './change-bounds-manager';
|
|
@@ -131,7 +131,7 @@ export class ChangeBoundsListener extends DragAwareMouseListener implements ISel
|
|
|
131
131
|
|
|
132
132
|
// members for resize mode
|
|
133
133
|
protected activeResizeElement?: ResizableModelElement;
|
|
134
|
-
protected activeResizeHandle?:
|
|
134
|
+
protected activeResizeHandle?: GResizeHandle;
|
|
135
135
|
protected handleFeedback: FeedbackEmitter;
|
|
136
136
|
protected resizeFeedback: FeedbackEmitter;
|
|
137
137
|
|
|
@@ -155,7 +155,7 @@ export class ChangeBoundsListener extends DragAwareMouseListener implements ISel
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
protected updateResizeElement(target: GModelElement, event?: MouseEvent): boolean {
|
|
158
|
-
this.activeResizeHandle = target instanceof
|
|
158
|
+
this.activeResizeHandle = target instanceof GResizeHandle ? target : undefined;
|
|
159
159
|
this.activeResizeElement = this.activeResizeHandle?.parent ?? this.findResizeElement(target);
|
|
160
160
|
if (this.activeResizeElement) {
|
|
161
161
|
if (event) {
|
|
@@ -301,7 +301,7 @@ export class ChangeBoundsListener extends DragAwareMouseListener implements ISel
|
|
|
301
301
|
return newRoutingPoints.length > 0 ? [ChangeRoutingPointsOperation.create(newRoutingPoints)] : [];
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
protected handleResizeOnServer(activeResizeHandle:
|
|
304
|
+
protected handleResizeOnServer(activeResizeHandle: GResizeHandle): Action[] {
|
|
305
305
|
if (this.initialBounds && this.isValidResize(activeResizeHandle.parent)) {
|
|
306
306
|
const elementAndBounds = toElementAndBounds(activeResizeHandle.parent);
|
|
307
307
|
if (!this.initialBounds.newPosition || !elementAndBounds.newPosition) {
|