@eclipse-glsp/client 2.2.0-next.350 → 2.2.0-next.353
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/grid.css +8 -6
- package/lib/base/action-dispatcher.spec.d.ts +2 -0
- package/lib/base/action-dispatcher.spec.d.ts.map +1 -0
- package/lib/base/action-dispatcher.spec.js +78 -0
- package/lib/base/action-dispatcher.spec.js.map +1 -0
- package/lib/base/auto-complete/index.d.ts +21 -0
- package/lib/base/auto-complete/index.d.ts.map +1 -0
- package/lib/base/auto-complete/index.js +37 -0
- package/lib/base/auto-complete/index.js.map +1 -0
- package/lib/base/feedback/index.d.ts +20 -0
- package/lib/base/feedback/index.d.ts.map +1 -0
- package/lib/base/feedback/index.js +36 -0
- package/lib/base/feedback/index.js.map +1 -0
- package/lib/base/focus/index.d.ts +18 -0
- package/lib/base/focus/index.d.ts.map +1 -0
- package/lib/base/focus/index.js +34 -0
- package/lib/base/focus/index.js.map +1 -0
- package/lib/base/index.d.ts +32 -0
- package/lib/base/index.d.ts.map +1 -0
- package/lib/base/index.js +48 -0
- package/lib/base/index.js.map +1 -0
- package/lib/base/model/index.d.ts +20 -0
- package/lib/base/model/index.d.ts.map +1 -0
- package/lib/base/model/index.js +36 -0
- package/lib/base/model/index.js.map +1 -0
- package/lib/base/model/model-initialization-constraint.spec.d.ts +2 -0
- package/lib/base/model/model-initialization-constraint.spec.d.ts.map +1 -0
- package/lib/base/model/model-initialization-constraint.spec.js +97 -0
- package/lib/base/model/model-initialization-constraint.spec.js.map +1 -0
- package/lib/base/selection-service.spec.d.ts +2 -0
- package/lib/base/selection-service.spec.d.ts.map +1 -0
- package/lib/base/selection-service.spec.js +283 -0
- package/lib/base/selection-service.spec.js.map +1 -0
- package/lib/base/tool-manager/index.d.ts +18 -0
- package/lib/base/tool-manager/index.d.ts.map +1 -0
- package/lib/base/tool-manager/index.js +34 -0
- package/lib/base/tool-manager/index.js.map +1 -0
- package/lib/base/view/index.d.ts +19 -0
- package/lib/base/view/index.d.ts.map +1 -0
- package/lib/base/view/index.js +35 -0
- package/lib/base/view/index.js.map +1 -0
- package/lib/features/accessibility/edge-autocomplete/index.d.ts +20 -0
- package/lib/features/accessibility/edge-autocomplete/index.d.ts.map +1 -0
- package/lib/features/accessibility/edge-autocomplete/index.js +36 -0
- package/lib/features/accessibility/edge-autocomplete/index.js.map +1 -0
- package/lib/features/accessibility/element-navigation/index.d.ts +22 -0
- package/lib/features/accessibility/element-navigation/index.d.ts.map +1 -0
- package/lib/features/accessibility/element-navigation/index.js +38 -0
- package/lib/features/accessibility/element-navigation/index.js.map +1 -0
- package/lib/features/accessibility/focus-tracker/index.d.ts +18 -0
- package/lib/features/accessibility/focus-tracker/index.d.ts.map +1 -0
- package/lib/features/accessibility/focus-tracker/index.js +34 -0
- package/lib/features/accessibility/focus-tracker/index.js.map +1 -0
- package/lib/features/accessibility/index.d.ts +31 -0
- package/lib/features/accessibility/index.d.ts.map +1 -0
- package/lib/features/accessibility/index.js +47 -0
- package/lib/features/accessibility/index.js.map +1 -0
- package/lib/features/accessibility/key-shortcut/di.config.d.ts +24 -0
- package/lib/features/accessibility/key-shortcut/di.config.d.ts.map +1 -0
- package/lib/features/accessibility/key-shortcut/di.config.js +37 -0
- package/lib/features/accessibility/key-shortcut/di.config.js.map +1 -0
- package/lib/features/accessibility/key-shortcut/index.d.ts +19 -0
- package/lib/features/accessibility/key-shortcut/index.d.ts.map +1 -0
- package/lib/features/accessibility/key-shortcut/index.js +35 -0
- package/lib/features/accessibility/key-shortcut/index.js.map +1 -0
- package/lib/features/accessibility/keyboard-grid/index.d.ts +21 -0
- package/lib/features/accessibility/keyboard-grid/index.d.ts.map +1 -0
- package/lib/features/accessibility/keyboard-grid/index.js +37 -0
- package/lib/features/accessibility/keyboard-grid/index.js.map +1 -0
- package/lib/features/accessibility/keyboard-pointer/index.d.ts +22 -0
- package/lib/features/accessibility/keyboard-pointer/index.d.ts.map +1 -0
- package/lib/features/accessibility/keyboard-pointer/index.js +38 -0
- package/lib/features/accessibility/keyboard-pointer/index.js.map +1 -0
- package/lib/features/accessibility/keyboard-tool-palette/index.d.ts +18 -0
- package/lib/features/accessibility/keyboard-tool-palette/index.d.ts.map +1 -0
- package/lib/features/accessibility/keyboard-tool-palette/index.js +34 -0
- package/lib/features/accessibility/keyboard-tool-palette/index.js.map +1 -0
- package/lib/features/accessibility/move-zoom/index.d.ts +19 -0
- package/lib/features/accessibility/move-zoom/index.d.ts.map +1 -0
- package/lib/features/accessibility/move-zoom/index.js +35 -0
- package/lib/features/accessibility/move-zoom/index.js.map +1 -0
- package/lib/features/accessibility/resize-key-tool/index.d.ts +19 -0
- package/lib/features/accessibility/resize-key-tool/index.d.ts.map +1 -0
- package/lib/features/accessibility/resize-key-tool/index.js +35 -0
- package/lib/features/accessibility/resize-key-tool/index.js.map +1 -0
- package/lib/features/accessibility/search/index.d.ts +19 -0
- package/lib/features/accessibility/search/index.d.ts.map +1 -0
- package/lib/features/accessibility/search/index.js +35 -0
- package/lib/features/accessibility/search/index.js.map +1 -0
- package/lib/features/accessibility/toast/index.d.ts +19 -0
- package/lib/features/accessibility/toast/index.d.ts.map +1 -0
- package/lib/features/accessibility/toast/index.js +35 -0
- package/lib/features/accessibility/toast/index.js.map +1 -0
- package/lib/features/accessibility/view-key-tools/index.d.ts +20 -0
- package/lib/features/accessibility/view-key-tools/index.d.ts.map +1 -0
- package/lib/features/accessibility/view-key-tools/index.js +36 -0
- package/lib/features/accessibility/view-key-tools/index.js.map +1 -0
- package/lib/features/bounds/freeform-layout.spec.d.ts +3 -0
- package/lib/features/bounds/freeform-layout.spec.d.ts.map +1 -0
- package/lib/features/bounds/freeform-layout.spec.js +201 -0
- package/lib/features/bounds/freeform-layout.spec.js.map +1 -0
- package/lib/features/bounds/hbox-layout.spec.d.ts +3 -0
- package/lib/features/bounds/hbox-layout.spec.d.ts.map +1 -0
- package/lib/features/bounds/hbox-layout.spec.js +160 -0
- package/lib/features/bounds/hbox-layout.spec.js.map +1 -0
- package/lib/features/bounds/index.d.ts +24 -0
- package/lib/features/bounds/index.d.ts.map +1 -0
- package/lib/features/bounds/index.js +40 -0
- package/lib/features/bounds/index.js.map +1 -0
- package/lib/features/bounds/layouter-test-util.spec.d.ts +32 -0
- package/lib/features/bounds/layouter-test-util.spec.d.ts.map +1 -0
- package/lib/features/bounds/layouter-test-util.spec.js +96 -0
- package/lib/features/bounds/layouter-test-util.spec.js.map +1 -0
- package/lib/features/bounds/vbox-layout.spec.d.ts +3 -0
- package/lib/features/bounds/vbox-layout.spec.d.ts.map +1 -0
- package/lib/features/bounds/vbox-layout.spec.js +160 -0
- package/lib/features/bounds/vbox-layout.spec.js.map +1 -0
- package/lib/features/change-bounds/index.d.ts +21 -0
- package/lib/features/change-bounds/index.d.ts.map +1 -0
- package/lib/features/change-bounds/index.js +37 -0
- package/lib/features/change-bounds/index.js.map +1 -0
- package/lib/features/change-bounds/snap.spec.d.ts +17 -0
- package/lib/features/change-bounds/snap.spec.d.ts.map +1 -0
- package/lib/features/change-bounds/snap.spec.js +83 -0
- package/lib/features/change-bounds/snap.spec.js.map +1 -0
- package/lib/features/command-palette/index.d.ts +19 -0
- package/lib/features/command-palette/index.d.ts.map +1 -0
- package/lib/features/command-palette/index.js +35 -0
- package/lib/features/command-palette/index.js.map +1 -0
- package/lib/features/context-menu/index.d.ts +20 -0
- package/lib/features/context-menu/index.d.ts.map +1 -0
- package/lib/features/context-menu/index.js +36 -0
- package/lib/features/context-menu/index.js.map +1 -0
- package/lib/features/copy-paste/index.d.ts +20 -0
- package/lib/features/copy-paste/index.d.ts.map +1 -0
- package/lib/features/copy-paste/index.js +36 -0
- package/lib/features/copy-paste/index.js.map +1 -0
- package/lib/features/debug/debug-bounds-decorator.d.ts +1 -0
- package/lib/features/debug/debug-bounds-decorator.d.ts.map +1 -1
- package/lib/features/debug/debug-bounds-decorator.js +26 -27
- package/lib/features/debug/debug-bounds-decorator.js.map +1 -1
- package/lib/features/decoration/index.d.ts +18 -0
- package/lib/features/decoration/index.d.ts.map +1 -0
- package/lib/features/decoration/index.js +34 -0
- package/lib/features/decoration/index.js.map +1 -0
- package/lib/features/element-template/index.d.ts +20 -0
- package/lib/features/element-template/index.d.ts.map +1 -0
- package/lib/features/element-template/index.js +36 -0
- package/lib/features/element-template/index.js.map +1 -0
- package/lib/features/export/index.d.ts +19 -0
- package/lib/features/export/index.d.ts.map +1 -0
- package/lib/features/export/index.js +35 -0
- package/lib/features/export/index.js.map +1 -0
- package/lib/features/helper-lines/helper-line-feedback.d.ts +2 -2
- package/lib/features/helper-lines/index.d.ts +22 -0
- package/lib/features/helper-lines/index.d.ts.map +1 -0
- package/lib/features/helper-lines/index.js +38 -0
- package/lib/features/helper-lines/index.js.map +1 -0
- package/lib/features/helper-lines/view.d.ts +1 -0
- package/lib/features/helper-lines/view.d.ts.map +1 -1
- package/lib/features/helper-lines/view.js +5 -6
- package/lib/features/helper-lines/view.js.map +1 -1
- package/lib/features/hints/index.d.ts +19 -0
- package/lib/features/hints/index.d.ts.map +1 -0
- package/lib/features/hints/index.js +35 -0
- package/lib/features/hints/index.js.map +1 -0
- package/lib/features/hints/type-hint-provider.spec.d.ts +2 -0
- package/lib/features/hints/type-hint-provider.spec.d.ts.map +1 -0
- package/lib/features/hints/type-hint-provider.spec.js +333 -0
- package/lib/features/hints/type-hint-provider.spec.js.map +1 -0
- package/lib/features/hover/index.d.ts +18 -0
- package/lib/features/hover/index.d.ts.map +1 -0
- package/lib/features/hover/index.js +34 -0
- package/lib/features/hover/index.js.map +1 -0
- package/lib/features/index.d.ts +43 -0
- package/lib/features/index.d.ts.map +1 -0
- package/lib/features/index.js +59 -0
- package/lib/features/index.js.map +1 -0
- package/lib/features/label-edit/index.d.ts +19 -0
- package/lib/features/label-edit/index.d.ts.map +1 -0
- package/lib/features/label-edit/index.js +35 -0
- package/lib/features/label-edit/index.js.map +1 -0
- package/lib/features/layout/index.d.ts +18 -0
- package/lib/features/layout/index.d.ts.map +1 -0
- package/lib/features/layout/index.js +34 -0
- package/lib/features/layout/index.js.map +1 -0
- package/lib/features/layout/layout-elements-action.spec.d.ts +3 -0
- package/lib/features/layout/layout-elements-action.spec.d.ts.map +1 -0
- package/lib/features/layout/layout-elements-action.spec.js +329 -0
- package/lib/features/layout/layout-elements-action.spec.js.map +1 -0
- package/lib/features/navigation/index.d.ts +19 -0
- package/lib/features/navigation/index.d.ts.map +1 -0
- package/lib/features/navigation/index.js +35 -0
- package/lib/features/navigation/index.js.map +1 -0
- package/lib/features/navigation/navigation-target-resolver.spec.d.ts +3 -0
- package/lib/features/navigation/navigation-target-resolver.spec.d.ts.map +1 -0
- package/lib/features/navigation/navigation-target-resolver.spec.js +53 -0
- package/lib/features/navigation/navigation-target-resolver.spec.js.map +1 -0
- package/lib/features/reconnect/index.d.ts +17 -0
- package/lib/features/reconnect/index.d.ts.map +1 -0
- package/lib/features/reconnect/index.js +33 -0
- package/lib/features/reconnect/index.js.map +1 -0
- package/lib/features/routing/glsp-manhattan-edge-router.d.ts +20 -0
- package/lib/features/routing/glsp-manhattan-edge-router.d.ts.map +1 -0
- package/lib/features/routing/glsp-manhattan-edge-router.js +68 -0
- package/lib/features/routing/glsp-manhattan-edge-router.js.map +1 -0
- package/lib/features/routing/index.d.ts +18 -0
- package/lib/features/routing/index.d.ts.map +1 -0
- package/lib/features/routing/index.js +34 -0
- package/lib/features/routing/index.js.map +1 -0
- package/lib/features/save/index.d.ts +18 -0
- package/lib/features/save/index.d.ts.map +1 -0
- package/lib/features/save/index.js +34 -0
- package/lib/features/save/index.js.map +1 -0
- package/lib/features/select/index.d.ts +19 -0
- package/lib/features/select/index.d.ts.map +1 -0
- package/lib/features/select/index.js +35 -0
- package/lib/features/select/index.js.map +1 -0
- package/lib/features/source-model-watcher/index.d.ts +18 -0
- package/lib/features/source-model-watcher/index.d.ts.map +1 -0
- package/lib/features/source-model-watcher/index.js +34 -0
- package/lib/features/source-model-watcher/index.js.map +1 -0
- package/lib/features/status/index.d.ts +18 -0
- package/lib/features/status/index.d.ts.map +1 -0
- package/lib/features/status/index.js +34 -0
- package/lib/features/status/index.js.map +1 -0
- package/lib/features/svg-metadata/index.d.ts +18 -0
- package/lib/features/svg-metadata/index.d.ts.map +1 -0
- package/lib/features/svg-metadata/index.js +34 -0
- package/lib/features/svg-metadata/index.js.map +1 -0
- package/lib/features/tool-palette/index.d.ts +18 -0
- package/lib/features/tool-palette/index.d.ts.map +1 -0
- package/lib/features/tool-palette/index.js +34 -0
- package/lib/features/tool-palette/index.js.map +1 -0
- package/lib/features/tools/change-bounds/index.d.ts +20 -0
- package/lib/features/tools/change-bounds/index.d.ts.map +1 -0
- package/lib/features/tools/change-bounds/index.js +36 -0
- package/lib/features/tools/change-bounds/index.js.map +1 -0
- package/lib/features/tools/change-bounds/view.d.ts +1 -0
- package/lib/features/tools/change-bounds/view.d.ts.map +1 -1
- package/lib/features/tools/change-bounds/view.js +3 -4
- package/lib/features/tools/change-bounds/view.js.map +1 -1
- package/lib/features/tools/deletion/index.d.ts +18 -0
- package/lib/features/tools/deletion/index.d.ts.map +1 -0
- package/lib/features/tools/deletion/index.js +34 -0
- package/lib/features/tools/deletion/index.js.map +1 -0
- package/lib/features/tools/edge-creation/index.d.ts +21 -0
- package/lib/features/tools/edge-creation/index.d.ts.map +1 -0
- package/lib/features/tools/edge-creation/index.js +37 -0
- package/lib/features/tools/edge-creation/index.js.map +1 -0
- package/lib/features/tools/edge-creation/view.d.ts +17 -1
- package/lib/features/tools/edge-creation/view.d.ts.map +1 -1
- package/lib/features/tools/edge-creation/view.js +3 -4
- package/lib/features/tools/edge-creation/view.js.map +1 -1
- package/lib/features/tools/edge-edit/index.d.ts +19 -0
- package/lib/features/tools/edge-edit/index.d.ts.map +1 -0
- package/lib/features/tools/edge-edit/index.js +35 -0
- package/lib/features/tools/edge-edit/index.js.map +1 -0
- package/lib/features/tools/index.d.ts +24 -0
- package/lib/features/tools/index.d.ts.map +1 -0
- package/lib/features/tools/index.js +40 -0
- package/lib/features/tools/index.js.map +1 -0
- package/lib/features/tools/marquee-selection/index.d.ts +23 -0
- package/lib/features/tools/marquee-selection/index.d.ts.map +1 -0
- package/lib/features/tools/marquee-selection/index.js +39 -0
- package/lib/features/tools/marquee-selection/index.js.map +1 -0
- package/lib/features/tools/marquee-selection/marquee-behavior.spec.d.ts +17 -0
- package/lib/features/tools/marquee-selection/marquee-behavior.spec.d.ts.map +1 -0
- package/lib/features/tools/marquee-selection/marquee-behavior.spec.js +165 -0
- package/lib/features/tools/marquee-selection/marquee-behavior.spec.js.map +1 -0
- package/lib/features/tools/marquee-selection/view.d.ts +17 -1
- package/lib/features/tools/marquee-selection/view.d.ts.map +1 -1
- package/lib/features/tools/marquee-selection/view.js +4 -5
- package/lib/features/tools/marquee-selection/view.js.map +1 -1
- package/lib/features/tools/node-creation/index.d.ts +18 -0
- package/lib/features/tools/node-creation/index.d.ts.map +1 -0
- package/lib/features/tools/node-creation/index.js +34 -0
- package/lib/features/tools/node-creation/index.js.map +1 -0
- package/lib/features/tools/node-creation/node-creation-views.d.ts +1 -0
- package/lib/features/tools/node-creation/node-creation-views.d.ts.map +1 -1
- package/lib/features/tools/node-creation/node-creation-views.js +15 -16
- package/lib/features/tools/node-creation/node-creation-views.js.map +1 -1
- package/lib/features/undo-redo/index.d.ts +18 -0
- package/lib/features/undo-redo/index.d.ts.map +1 -0
- package/lib/features/undo-redo/index.js +34 -0
- package/lib/features/undo-redo/index.js.map +1 -0
- package/lib/features/validation/index.d.ts +20 -0
- package/lib/features/validation/index.d.ts.map +1 -0
- package/lib/features/validation/index.js +36 -0
- package/lib/features/validation/index.js.map +1 -0
- package/lib/features/validation/marker-navigator.spec.d.ts +3 -0
- package/lib/features/validation/marker-navigator.spec.d.ts.map +1 -0
- package/lib/features/validation/marker-navigator.spec.js +166 -0
- package/lib/features/validation/marker-navigator.spec.js.map +1 -0
- package/lib/features/viewport/index.d.ts +20 -0
- package/lib/features/viewport/index.d.ts.map +1 -0
- package/lib/features/viewport/index.js +36 -0
- package/lib/features/viewport/index.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/utils/gmodel-util.spec.d.ts +2 -0
- package/lib/utils/gmodel-util.spec.d.ts.map +1 -0
- package/lib/utils/gmodel-util.spec.js +186 -0
- package/lib/utils/gmodel-util.spec.js.map +1 -0
- package/lib/utils/index.d.ts +23 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +39 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/views/compartments.d.ts +17 -1
- package/lib/views/compartments.d.ts.map +1 -1
- package/lib/views/compartments.js +4 -5
- package/lib/views/compartments.js.map +1 -1
- package/lib/views/gedge-view.d.ts +1 -0
- package/lib/views/gedge-view.d.ts.map +1 -1
- package/lib/views/gedge-view.js +4 -5
- package/lib/views/gedge-view.js.map +1 -1
- package/lib/views/ggraph-view.d.ts +0 -1
- package/lib/views/ggraph-view.d.ts.map +1 -1
- package/lib/views/ggraph-view.js +2 -12
- package/lib/views/ggraph-view.js.map +1 -1
- package/lib/views/glsp-projection-view.d.ts +1 -1
- package/lib/views/glsp-projection-view.d.ts.map +1 -1
- package/lib/views/glsp-projection-view.js +26 -73
- package/lib/views/glsp-projection-view.js.map +1 -1
- package/lib/views/index.d.ts +23 -0
- package/lib/views/index.d.ts.map +1 -0
- package/lib/views/index.js +39 -0
- package/lib/views/index.js.map +1 -0
- package/lib/views/issue-marker-view.d.ts +1 -0
- package/lib/views/issue-marker-view.d.ts.map +1 -1
- package/lib/views/issue-marker-view.js +6 -7
- package/lib/views/issue-marker-view.js.map +1 -1
- package/lib/views/rounded-corner-view.d.ts +17 -1
- package/lib/views/rounded-corner-view.d.ts.map +1 -1
- package/lib/views/rounded-corner-view.js +7 -8
- package/lib/views/rounded-corner-view.js.map +1 -1
- package/package.json +3 -3
- package/src/default-modules.spec.ts +56 -0
- package/src/features/debug/debug-bounds-decorator.tsx +1 -4
- package/src/features/helper-lines/view.tsx +1 -3
- package/src/features/tools/change-bounds/view.tsx +1 -3
- package/src/features/tools/edge-creation/view.tsx +2 -4
- package/src/features/tools/marquee-selection/view.tsx +2 -4
- package/src/features/tools/node-creation/node-creation-views.tsx +1 -4
- package/src/views/compartments.tsx +2 -4
- package/src/views/gedge-view.tsx +2 -4
- package/src/views/ggraph-view.tsx +2 -12
- package/src/views/glsp-projection-view.tsx +13 -76
- package/src/views/issue-marker-view.tsx +1 -3
- package/src/views/rounded-corner-view.tsx +2 -4
|
@@ -1,5 +1,21 @@
|
|
|
1
|
+
/********************************************************************************
|
|
2
|
+
* Copyright (c) 2021-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
|
+
/** @jsx svg */
|
|
17
|
+
import { GNode, GShapeElement, Hoverable, RectangularNodeView, RenderingContext, Selectable } from '@eclipse-glsp/sprotty';
|
|
1
18
|
import { Classes, VNode } from 'snabbdom';
|
|
2
|
-
import { Hoverable, RectangularNodeView, RenderingContext, GNode, GShapeElement, Selectable } from '@eclipse-glsp/sprotty';
|
|
3
19
|
import { RoundedCornerWrapper } from './rounded-corner';
|
|
4
20
|
export declare class RoundedCornerNodeView extends RectangularNodeView {
|
|
5
21
|
render(node: Readonly<GNode & Hoverable & Selectable>, context: RenderingContext): VNode | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rounded-corner-view.d.ts","sourceRoot":"","sources":["../../src/views/rounded-corner-view.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rounded-corner-view.d.ts","sourceRoot":"","sources":["../../src/views/rounded-corner-view.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,eAAe;AACf,OAAO,EAAE,KAAK,EAAS,aAAa,EAAE,SAAS,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,UAAU,EAAO,MAAM,uBAAuB,CAAC;AAEvI,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,qBACa,qBAAsB,SAAQ,mBAAmB;IACjD,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,GAAG,SAAS,GAAG,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK,GAAG,SAAS;IAoB7G,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,aAAa,GAAG,SAAS,GAAG,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK,GAAG,SAAS;IAInI,SAAS,CAAC,iBAAiB,IAAI,MAAM,GAAG,SAAS;IAIjD,SAAS,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,gBAAgB,GAAG,KAAK;IAanG,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,GAAG,SAAS,GAAG,UAAU,CAAC,EAAE,QAAQ,EAAE,gBAAgB,GAAG,OAAO;IAIzH,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,oBAAoB,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;CA0BnH;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,aAAa,GAAG,SAAS,GAAG,UAAU,CAAC,GAAG,MAAM,CAE3F"}
|
|
@@ -22,12 +22,11 @@ exports.toClipPathId = exports.RoundedCornerNodeView = void 0;
|
|
|
22
22
|
*
|
|
23
23
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
24
24
|
********************************************************************************/
|
|
25
|
-
|
|
25
|
+
/** @jsx svg */
|
|
26
26
|
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
27
|
+
const inversify_1 = require("inversify");
|
|
27
28
|
const argument_utils_1 = require("../utils/argument-utils");
|
|
28
29
|
const rounded_corner_1 = require("./rounded-corner");
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30
|
-
const JSX = { createElement: sprotty_1.svg };
|
|
31
30
|
let RoundedCornerNodeView = class RoundedCornerNodeView extends sprotty_1.RectangularNodeView {
|
|
32
31
|
render(node, context) {
|
|
33
32
|
const cornerRadius = argument_utils_1.CornerRadius.from(node);
|
|
@@ -35,10 +34,10 @@ let RoundedCornerNodeView = class RoundedCornerNodeView extends sprotty_1.Rectan
|
|
|
35
34
|
return this.renderWithoutRadius(node, context);
|
|
36
35
|
}
|
|
37
36
|
const wrapper = new rounded_corner_1.RoundedCornerWrapper(node, cornerRadius);
|
|
38
|
-
return (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
return ((0, sprotty_1.svg)("g", { "class-node": true },
|
|
38
|
+
(0, sprotty_1.svg)("defs", null,
|
|
39
|
+
(0, sprotty_1.svg)("clipPath", { id: toClipPathId(node) },
|
|
40
|
+
(0, sprotty_1.svg)("path", { d: this.renderPath(wrapper, context, this.getClipPathInsets() || 0) }))),
|
|
42
41
|
this.renderPathNode(wrapper, context),
|
|
43
42
|
context.renderChildren(node)));
|
|
44
43
|
}
|
|
@@ -49,7 +48,7 @@ let RoundedCornerNodeView = class RoundedCornerNodeView extends sprotty_1.Rectan
|
|
|
49
48
|
return 2;
|
|
50
49
|
}
|
|
51
50
|
renderPathNode(wrapper, context) {
|
|
52
|
-
return (
|
|
51
|
+
return ((0, sprotty_1.svg)("path", Object.assign({ d: this.renderPath(wrapper, context, 0), "class-sprotty-node": wrapper.element instanceof sprotty_1.GNode, "class-sprotty-port": wrapper.element instanceof sprotty_1.GPort, "class-mouseover": wrapper.element.hoverFeedback, "class-selected": wrapper.element.selected }, this.additionalClasses(wrapper.element, context))));
|
|
53
52
|
}
|
|
54
53
|
additionalClasses(_node, _context) {
|
|
55
54
|
return {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rounded-corner-view.js","sourceRoot":"","sources":["../../src/views/rounded-corner-view.tsx"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,
|
|
1
|
+
{"version":3,"file":"rounded-corner-view.js","sourceRoot":"","sources":["../../src/views/rounded-corner-view.tsx"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp/client",
|
|
3
|
-
"version": "2.2.0-next.
|
|
3
|
+
"version": "2.2.0-next.353+1e0d319",
|
|
4
4
|
"description": "A sprotty-based client for GLSP",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eclipse",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"watch": "tsc -w"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@eclipse-glsp/sprotty": "2.2.0-next.
|
|
49
|
+
"@eclipse-glsp/sprotty": "2.2.0-next.353+1e0d319",
|
|
50
50
|
"autocompleter": "^9.1.2",
|
|
51
51
|
"file-saver": "^2.0.5",
|
|
52
52
|
"lodash": "4.17.21",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "1e0d319b59d35f8b66a3a487a677d6e94b8a48b0"
|
|
67
67
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 { FeatureModule } from '@eclipse-glsp/sprotty';
|
|
17
|
+
import { expect } from 'chai';
|
|
18
|
+
import { Container } from 'inversify';
|
|
19
|
+
import * as sinon from 'sinon';
|
|
20
|
+
import { defaultModule } from './base/default.module';
|
|
21
|
+
import { DEFAULT_MODULES, initializeDiagramContainer } from './default-modules';
|
|
22
|
+
|
|
23
|
+
describe('default-modules', () => {
|
|
24
|
+
// InitializeDiagramContainer internally uses `resolveContainerConfiguration` so we only test functionality
|
|
25
|
+
// that is not covered by the tests of `resolveContainerConfiguration`.
|
|
26
|
+
describe('initializeDiagramContainer', () => {
|
|
27
|
+
const sandbox = sinon.createSandbox();
|
|
28
|
+
const container = new Container();
|
|
29
|
+
const loadSpy = sandbox.spy(container, 'load');
|
|
30
|
+
container.snapshot();
|
|
31
|
+
|
|
32
|
+
beforeEach(() => {
|
|
33
|
+
sandbox.reset();
|
|
34
|
+
container.restore();
|
|
35
|
+
container.snapshot();
|
|
36
|
+
});
|
|
37
|
+
it('should initialize the diagram container with the default modules in addition to the given config and load them first', () => {
|
|
38
|
+
const extraModule = new FeatureModule(() => {});
|
|
39
|
+
initializeDiagramContainer(container, { add: extraModule });
|
|
40
|
+
expect(loadSpy.calledOnce).to.be.true;
|
|
41
|
+
const callArgs = loadSpy.firstCall.args;
|
|
42
|
+
const lastModule = callArgs.pop();
|
|
43
|
+
expect(callArgs).to.be.deep.equal(DEFAULT_MODULES).ordered;
|
|
44
|
+
expect(lastModule).to.be.equal(extraModule);
|
|
45
|
+
});
|
|
46
|
+
it('should throw an error if the base (default) module is removed via configuration', () => {
|
|
47
|
+
expect(() => initializeDiagramContainer(container, { remove: defaultModule })).to.throw(/Invalid module configuration/);
|
|
48
|
+
});
|
|
49
|
+
// eslint-disable-next-line max-len
|
|
50
|
+
it('should throw an error if the base (default) module is not the first module of the resolved configured (removed and added again)', () => {
|
|
51
|
+
expect(() => initializeDiagramContainer(container, { remove: defaultModule, add: defaultModule })).to.throw(
|
|
52
|
+
/Invalid module configuration/
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
/* eslint-disable max-len */
|
|
17
|
-
|
|
17
|
+
/** @jsx svg */
|
|
18
18
|
import { Bounds, GModelElement, IVNodePostprocessor, Point, isDecoration, isSizeable, setClass, svg } from '@eclipse-glsp/sprotty';
|
|
19
19
|
import { inject, injectable, optional } from 'inversify';
|
|
20
20
|
import { VNode } from 'snabbdom';
|
|
@@ -22,9 +22,6 @@ import { GGraph } from '../../model';
|
|
|
22
22
|
import { BoundsAwareModelElement } from '../../utils/gmodel-util';
|
|
23
23
|
import { DebugManager } from './debug-manager';
|
|
24
24
|
|
|
25
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
26
|
-
const JSX = { createElement: svg };
|
|
27
|
-
|
|
28
25
|
export const CSS_DEBUG_BOUNDS = 'debug-bounds';
|
|
29
26
|
|
|
30
27
|
@injectable()
|
|
@@ -13,14 +13,12 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
/** @jsx svg */
|
|
16
17
|
import { IViewArgs, RenderingContext, ShapeView, svg } from '@eclipse-glsp/sprotty';
|
|
17
18
|
import { injectable } from 'inversify';
|
|
18
19
|
import { VNode } from 'snabbdom';
|
|
19
20
|
import { HelperLine, SelectionBounds } from './model';
|
|
20
21
|
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
22
|
-
const JSX = { createElement: svg };
|
|
23
|
-
|
|
24
22
|
@injectable()
|
|
25
23
|
export class HelperLineView extends ShapeView {
|
|
26
24
|
override render(model: HelperLine, _context: RenderingContext): VNode | undefined {
|
|
@@ -13,14 +13,12 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
/** @jsx svg */
|
|
16
17
|
import { IView, Point, RenderingContext, setAttr, svg } from '@eclipse-glsp/sprotty';
|
|
17
18
|
import { injectable } from 'inversify';
|
|
18
19
|
import { VNode } from 'snabbdom';
|
|
19
20
|
import { GResizeHandle } from '../../change-bounds/model';
|
|
20
21
|
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
22
|
-
const JSX = { createElement: svg };
|
|
23
|
-
|
|
24
22
|
@injectable()
|
|
25
23
|
export class GResizeHandleView implements IView {
|
|
26
24
|
render(handle: GResizeHandle, context: RenderingContext): VNode | undefined {
|
|
@@ -13,12 +13,10 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
/** @jsx svg */
|
|
17
|
+
import { GModelElement, IView, Point, RenderingContext, svg } from '@eclipse-glsp/sprotty';
|
|
16
18
|
import { injectable } from 'inversify';
|
|
17
19
|
import { VNode } from 'snabbdom';
|
|
18
|
-
import { IView, Point, RenderingContext, GModelElement, svg } from '@eclipse-glsp/sprotty';
|
|
19
|
-
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
|
-
const JSX = { createElement: svg };
|
|
22
20
|
|
|
23
21
|
/**
|
|
24
22
|
* This view is used for the invisible end of the feedback edge.
|
|
@@ -13,14 +13,12 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
/** @jsx svg */
|
|
17
|
+
import { RectangularNodeView, RenderingContext, svg } from '@eclipse-glsp/sprotty';
|
|
16
18
|
import { injectable } from 'inversify';
|
|
17
19
|
import { VNode } from 'snabbdom';
|
|
18
|
-
import { RectangularNodeView, RenderingContext, svg } from '@eclipse-glsp/sprotty';
|
|
19
20
|
import { MarqueeNode } from './model';
|
|
20
21
|
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
22
|
-
const JSX = { createElement: svg };
|
|
23
|
-
|
|
24
22
|
@injectable()
|
|
25
23
|
export class MarqueeView extends RectangularNodeView {
|
|
26
24
|
override render(node: MarqueeNode, context: RenderingContext): VNode {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
|
|
16
|
+
/** @jsx svg */
|
|
17
17
|
import { IView, RenderingContext, TYPES, setClass, svg } from '@eclipse-glsp/sprotty';
|
|
18
18
|
import { inject, injectable, optional } from 'inversify';
|
|
19
19
|
import { VNode } from 'snabbdom';
|
|
@@ -21,9 +21,6 @@ import { GArgument } from '../../../utils/argument-utils';
|
|
|
21
21
|
import { Grid } from '../../grid/grid';
|
|
22
22
|
import { ARG_LENGTH, InsertIndicator } from './insert-indicator';
|
|
23
23
|
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
25
|
-
const JSX = { createElement: svg };
|
|
26
|
-
|
|
27
24
|
@injectable()
|
|
28
25
|
export class InsertIndicatorView implements IView {
|
|
29
26
|
@optional() @inject(TYPES.Grid) protected grid?: Grid;
|
|
@@ -13,12 +13,10 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
/** @jsx svg */
|
|
17
|
+
import { GCompartment, RenderingContext, ShapeView, svg } from '@eclipse-glsp/sprotty';
|
|
16
18
|
import { injectable } from 'inversify';
|
|
17
19
|
import { VNode } from 'snabbdom';
|
|
18
|
-
import { GCompartment, RenderingContext, ShapeView, svg } from '@eclipse-glsp/sprotty';
|
|
19
|
-
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
|
-
const JSX = { createElement: svg };
|
|
22
20
|
|
|
23
21
|
@injectable()
|
|
24
22
|
export class StructureCompartmentView extends ShapeView {
|
package/src/views/gedge-view.tsx
CHANGED
|
@@ -13,14 +13,12 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
/** @jsx svg */
|
|
16
17
|
import { Point, PolylineEdgeView, RenderingContext, svg } from '@eclipse-glsp/sprotty';
|
|
17
18
|
import { injectable } from 'inversify';
|
|
18
19
|
import { Classes, VNode } from 'snabbdom';
|
|
19
|
-
import { EdgePadding } from '../utils/argument-utils';
|
|
20
20
|
import { GEdge } from '../model';
|
|
21
|
-
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23
|
-
const JSX = { createElement: svg };
|
|
21
|
+
import { EdgePadding } from '../utils/argument-utils';
|
|
24
22
|
|
|
25
23
|
@injectable()
|
|
26
24
|
export class GEdgeView extends PolylineEdgeView {
|
|
@@ -32,7 +32,7 @@ export class GGraphView extends SGraphView {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
protected getGridStyle(viewport: Readonly<SGraphImpl>, context: RenderingContext): GridStyle {
|
|
35
|
-
if (context.targetKind === 'hidden' || !this.gridManager
|
|
35
|
+
if (context.targetKind === 'hidden' || !this.gridManager) {
|
|
36
36
|
return {};
|
|
37
37
|
}
|
|
38
38
|
const bounds = this.getBackgroundBounds(viewport, context, this.gridManager);
|
|
@@ -41,11 +41,7 @@ export class GGraphView extends SGraphView {
|
|
|
41
41
|
[GridProperty.GRID_BACKGROUND_Y]: bounds.y + 'px',
|
|
42
42
|
[GridProperty.GRID_BACKGROUND_WIDTH]: bounds.width + 'px',
|
|
43
43
|
[GridProperty.GRID_BACKGROUND_HEIGHT]: bounds.height + 'px',
|
|
44
|
-
[GridProperty.GRID_BACKGROUND_ZOOM]: viewport.zoom + ''
|
|
45
|
-
[GridProperty.GRID_BACKGROUND_IMAGE]: this.getBackgroundImage(viewport, context, this.gridManager),
|
|
46
|
-
backgroundPosition: `${bounds.x}px ${bounds.y}px`,
|
|
47
|
-
backgroundSize: `${bounds.width}px ${bounds.height}px`
|
|
48
|
-
// we do not set the background-image directly in the style object, because we want to toggle it on and off via CSS
|
|
44
|
+
[GridProperty.GRID_BACKGROUND_ZOOM]: viewport.zoom + ''
|
|
49
45
|
};
|
|
50
46
|
}
|
|
51
47
|
|
|
@@ -54,10 +50,4 @@ export class GGraphView extends SGraphView {
|
|
|
54
50
|
const size = Dimension.fromPoint(Point.multiplyScalar(gridManager.grid, viewport.zoom));
|
|
55
51
|
return { ...position, ...size };
|
|
56
52
|
}
|
|
57
|
-
|
|
58
|
-
protected getBackgroundImage(viewport: Readonly<SGraphImpl>, context: RenderingContext, gridManager: GridManager): string {
|
|
59
|
-
const color = getComputedStyle(document.documentElement).getPropertyValue(GridProperty.GRID_COLOR).trim().replace(/#/g, '%23');
|
|
60
|
-
// eslint-disable-next-line max-len
|
|
61
|
-
return `url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${gridManager.grid.x} ${gridManager.grid.y}"><rect width="${gridManager.grid.x}" height="${gridManager.grid.y}" x="0" y="0" fill="none" stroke="${color}" stroke-width="1" /></svg>')`;
|
|
62
|
-
}
|
|
63
53
|
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
|
|
16
|
+
/** @jsx html */
|
|
17
17
|
import {
|
|
18
18
|
Bounds,
|
|
19
19
|
Dimension,
|
|
@@ -36,9 +36,6 @@ import { VNode, VNodeStyle, h } from 'snabbdom';
|
|
|
36
36
|
import { GridManager, GridStyle } from '../features/grid/grid-manager';
|
|
37
37
|
import { GridProperty } from '../features/grid/grid-style';
|
|
38
38
|
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
40
|
-
const JSX = { createElement: html };
|
|
41
|
-
|
|
42
39
|
/**
|
|
43
40
|
* Special viewport root view that renders horizontal and vertical projection bars for quick navigation.
|
|
44
41
|
*/
|
|
@@ -73,7 +70,7 @@ export class GLSPProjectionView extends ProjectedViewportView {
|
|
|
73
70
|
}
|
|
74
71
|
|
|
75
72
|
protected getGridStyle(viewport: Readonly<SGraphImpl>, context: RenderingContext): GridStyle {
|
|
76
|
-
if (context.targetKind === 'hidden' || !this.gridManager
|
|
73
|
+
if (context.targetKind === 'hidden' || !this.gridManager) {
|
|
77
74
|
return {};
|
|
78
75
|
}
|
|
79
76
|
const bounds = this.getBackgroundBounds(viewport, context, this.gridManager);
|
|
@@ -82,11 +79,7 @@ export class GLSPProjectionView extends ProjectedViewportView {
|
|
|
82
79
|
[GridProperty.GRID_BACKGROUND_Y]: bounds.y + 'px',
|
|
83
80
|
[GridProperty.GRID_BACKGROUND_WIDTH]: bounds.width + 'px',
|
|
84
81
|
[GridProperty.GRID_BACKGROUND_HEIGHT]: bounds.height + 'px',
|
|
85
|
-
[GridProperty.GRID_BACKGROUND_ZOOM]: viewport.zoom + ''
|
|
86
|
-
[GridProperty.GRID_BACKGROUND_IMAGE]: this.getBackgroundImage(viewport, context, this.gridManager),
|
|
87
|
-
backgroundPosition: `${bounds.x}px ${bounds.y}px`,
|
|
88
|
-
backgroundSize: `${bounds.width}px ${bounds.height}px`
|
|
89
|
-
// we do not set the background-image directly in the style object, because we want to toggle it on and off via CSS
|
|
82
|
+
[GridProperty.GRID_BACKGROUND_ZOOM]: viewport.zoom + ''
|
|
90
83
|
};
|
|
91
84
|
}
|
|
92
85
|
|
|
@@ -96,35 +89,15 @@ export class GLSPProjectionView extends ProjectedViewportView {
|
|
|
96
89
|
return { ...position, ...size };
|
|
97
90
|
}
|
|
98
91
|
|
|
99
|
-
protected getBackgroundImage(viewport: Readonly<SGraphImpl>, context: RenderingContext, gridManager: GridManager): string {
|
|
100
|
-
const color = getComputedStyle(document.documentElement).getPropertyValue(GridProperty.GRID_COLOR).trim().replace(/#/g, '%23');
|
|
101
|
-
// eslint-disable-next-line max-len
|
|
102
|
-
return `url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${gridManager.grid.x} ${gridManager.grid.y}"><rect width="${gridManager.grid.x}" height="${gridManager.grid.y}" x="0" y="0" fill="none" stroke="${color}" stroke-width="1" /></svg>')`;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
92
|
protected override renderProjectionBar(
|
|
106
93
|
projections: ViewProjection[],
|
|
107
94
|
model: Readonly<GViewportRootElement>,
|
|
108
95
|
modelBounds: Bounds,
|
|
109
96
|
orientation: 'horizontal' | 'vertical'
|
|
110
97
|
): VNode {
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
params.factor =
|
|
115
|
-
orientation === 'horizontal' ? model.canvasBounds.width / modelBounds.width : model.canvasBounds.height / modelBounds.height;
|
|
116
|
-
params.zoomedFactor = params.factor / model.zoom;
|
|
117
|
-
return (
|
|
118
|
-
<div
|
|
119
|
-
class-sprotty-projection-bar={true}
|
|
120
|
-
class-horizontal={orientation === 'horizontal'}
|
|
121
|
-
class-vertical={orientation === 'vertical'}
|
|
122
|
-
class-bordered-projection-bar={true}
|
|
123
|
-
>
|
|
124
|
-
{this.renderViewport(model, params)}
|
|
125
|
-
{projections.map(p => this.renderProjection(p, model, params))}
|
|
126
|
-
</div>
|
|
127
|
-
);
|
|
98
|
+
const vnode = super.renderProjectionBar(projections, model, modelBounds, orientation);
|
|
99
|
+
setClass(vnode, 'bordered-projection-bar', true);
|
|
100
|
+
return vnode;
|
|
128
101
|
}
|
|
129
102
|
|
|
130
103
|
protected override renderViewport(model: Readonly<GViewportRootElement>, params: ProjectionParams): VNode {
|
|
@@ -170,50 +143,14 @@ export class GLSPProjectionView extends ProjectedViewportView {
|
|
|
170
143
|
model: Readonly<GViewportRootElement>,
|
|
171
144
|
params: ProjectionParams
|
|
172
145
|
): VNode {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
if (
|
|
177
|
-
|
|
178
|
-
projPos = (projection.projectedBounds.x - params.modelBounds.x) * params.factor;
|
|
179
|
-
projSize = projection.projectedBounds.width * params.factor;
|
|
146
|
+
const vnode = super.renderProjection(projection, model, params);
|
|
147
|
+
setClass(vnode, 'glsp-projection', true);
|
|
148
|
+
const style = vnode.data!.style!;
|
|
149
|
+
if (style.left) {
|
|
150
|
+
style.height = '60%';
|
|
180
151
|
} else {
|
|
181
|
-
|
|
182
|
-
projPos = (projection.projectedBounds.y - params.modelBounds.y) * params.factor;
|
|
183
|
-
projSize = projection.projectedBounds.height * params.factor;
|
|
152
|
+
style.width = '60%';
|
|
184
153
|
}
|
|
185
|
-
|
|
186
|
-
projSize += projPos;
|
|
187
|
-
projPos = 0;
|
|
188
|
-
} else if (projPos > canvasSize) {
|
|
189
|
-
projPos = canvasSize;
|
|
190
|
-
}
|
|
191
|
-
if (projSize < 0) {
|
|
192
|
-
projSize = 0;
|
|
193
|
-
} else if (projPos + projSize > canvasSize) {
|
|
194
|
-
projSize = canvasSize - projPos;
|
|
195
|
-
}
|
|
196
|
-
const style: VNodeStyle =
|
|
197
|
-
params.orientation === 'horizontal'
|
|
198
|
-
? {
|
|
199
|
-
left: `${projPos}px`,
|
|
200
|
-
width: `${projSize}px`,
|
|
201
|
-
height: '60%'
|
|
202
|
-
}
|
|
203
|
-
: {
|
|
204
|
-
top: `${projPos}px`,
|
|
205
|
-
height: `${projSize}px`,
|
|
206
|
-
width: '60%'
|
|
207
|
-
};
|
|
208
|
-
const result = (
|
|
209
|
-
<div
|
|
210
|
-
id={`${params.orientation}-projection:${projection.elementId}`}
|
|
211
|
-
class-sprotty-projection={true}
|
|
212
|
-
class-glsp-projection={true}
|
|
213
|
-
style={style}
|
|
214
|
-
/>
|
|
215
|
-
);
|
|
216
|
-
projection.cssClasses.forEach(cl => setClass(result, cl, true));
|
|
217
|
-
return result;
|
|
154
|
+
return vnode;
|
|
218
155
|
}
|
|
219
156
|
}
|
|
@@ -14,14 +14,12 @@
|
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
/* eslint-disable max-len */
|
|
17
|
+
/** @jsx svg */
|
|
17
18
|
import { GIssueSeverity, IssueMarkerView, RenderingContext, setClass, svg } from '@eclipse-glsp/sprotty';
|
|
18
19
|
import { injectable } from 'inversify';
|
|
19
20
|
import { VNode } from 'snabbdom';
|
|
20
21
|
import { GIssueMarker } from '../features/validation/issue-marker';
|
|
21
22
|
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23
|
-
const JSX = { createElement: svg };
|
|
24
|
-
|
|
25
23
|
@injectable()
|
|
26
24
|
export class GIssueMarkerView extends IssueMarkerView {
|
|
27
25
|
override render(marker: GIssueMarker, _context: RenderingContext): VNode {
|
|
@@ -13,15 +13,13 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
+
/** @jsx svg */
|
|
17
|
+
import { GNode, GPort, GShapeElement, Hoverable, RectangularNodeView, RenderingContext, Selectable, svg } from '@eclipse-glsp/sprotty';
|
|
16
18
|
import { injectable } from 'inversify';
|
|
17
19
|
import { Classes, VNode } from 'snabbdom';
|
|
18
|
-
import { Hoverable, RectangularNodeView, RenderingContext, GNode, GPort, GShapeElement, Selectable, svg } from '@eclipse-glsp/sprotty';
|
|
19
20
|
import { CornerRadius } from '../utils/argument-utils';
|
|
20
21
|
import { RoundedCornerWrapper } from './rounded-corner';
|
|
21
22
|
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23
|
-
const JSX = { createElement: svg };
|
|
24
|
-
|
|
25
23
|
@injectable()
|
|
26
24
|
export class RoundedCornerNodeView extends RectangularNodeView {
|
|
27
25
|
override render(node: Readonly<GNode & Hoverable & Selectable>, context: RenderingContext): VNode | undefined {
|