@eclipse-glsp/client 2.6.0-next.12 → 2.6.0-next.13
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/features/bounds/glsp-hidden-bounds-updater.d.ts +2 -0
- package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts.map +1 -1
- package/lib/features/bounds/glsp-hidden-bounds-updater.js +16 -1
- package/lib/features/bounds/glsp-hidden-bounds-updater.js.map +1 -1
- package/package.json +3 -3
- package/src/features/bounds/glsp-hidden-bounds-updater.ts +13 -1
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
********************************************************************************/
|
|
16
16
|
import { Action, BoundsData, EdgeRouterRegistry, ElementAndRoutingPoints, GModelElement, HiddenBoundsUpdater, LayoutData, ModelIndexImpl } from '@eclipse-glsp/sprotty';
|
|
17
17
|
import { VNode } from 'snabbdom';
|
|
18
|
+
import { EditorContextService } from '../../base/editor-context-service';
|
|
18
19
|
import { BoundsAwareModelElement } from '../../utils/gmodel-util';
|
|
19
20
|
export declare class BoundsDataExt extends BoundsData {
|
|
20
21
|
layoutData?: LayoutData;
|
|
@@ -26,6 +27,7 @@ export declare class BoundsDataExt extends BoundsData {
|
|
|
26
27
|
*/
|
|
27
28
|
export declare class GLSPHiddenBoundsUpdater extends HiddenBoundsUpdater {
|
|
28
29
|
protected readonly edgeRouterRegistry?: EdgeRouterRegistry;
|
|
30
|
+
protected editorContext: EditorContextService;
|
|
29
31
|
protected element2route: ElementAndRoutingPoints[];
|
|
30
32
|
protected getElement2BoundsData(): Map<BoundsAwareModelElement, BoundsDataExt>;
|
|
31
33
|
decorate(vnode: VNode, element: GModelElement): VNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-hidden-bounds-updater.d.ts","sourceRoot":"","sources":["../../../src/features/bounds/glsp-hidden-bounds-updater.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAElF,OAAO,EACH,MAAM,EAC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KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,GAAG,KAAK;IAQrD,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAuEzC,SAAS,CAAC,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI;IAYrD,SAAS,CAAC,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;CAG/F"}
|
|
@@ -27,6 +27,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
27
27
|
exports.GLSPHiddenBoundsUpdater = exports.BoundsDataExt = void 0;
|
|
28
28
|
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
29
29
|
const inversify_1 = require("inversify");
|
|
30
|
+
const editor_context_service_1 = require("../../base/editor-context-service");
|
|
30
31
|
const gmodel_util_1 = require("../../utils/gmodel-util");
|
|
31
32
|
const layout_data_1 = require("./layout-data");
|
|
32
33
|
const local_bounds_1 = require("./local-bounds");
|
|
@@ -99,7 +100,17 @@ let GLSPHiddenBoundsUpdater = class GLSPHiddenBoundsUpdater extends sprotty_1.Hi
|
|
|
99
100
|
// prepare and dispatch action
|
|
100
101
|
const responseId = cause.requestId;
|
|
101
102
|
const revision = this.root !== undefined ? this.root.revision : undefined;
|
|
102
|
-
const
|
|
103
|
+
const canvasBounds = this.editorContext.canvasBounds;
|
|
104
|
+
const viewport = this.editorContext.viewportData;
|
|
105
|
+
const computedBoundsAction = sprotty_1.ComputedBoundsAction.create(resizes, {
|
|
106
|
+
revision,
|
|
107
|
+
alignments,
|
|
108
|
+
layoutData,
|
|
109
|
+
routes,
|
|
110
|
+
responseId,
|
|
111
|
+
canvasBounds,
|
|
112
|
+
viewport
|
|
113
|
+
});
|
|
103
114
|
if (local_bounds_1.LocalRequestBoundsAction.is(cause)) {
|
|
104
115
|
local_bounds_1.LocalComputedBoundsAction.mark(computedBoundsAction);
|
|
105
116
|
}
|
|
@@ -128,6 +139,10 @@ __decorate([
|
|
|
128
139
|
(0, inversify_1.optional)(),
|
|
129
140
|
__metadata("design:type", sprotty_1.EdgeRouterRegistry)
|
|
130
141
|
], GLSPHiddenBoundsUpdater.prototype, "edgeRouterRegistry", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, inversify_1.inject)(editor_context_service_1.EditorContextService),
|
|
144
|
+
__metadata("design:type", editor_context_service_1.EditorContextService)
|
|
145
|
+
], GLSPHiddenBoundsUpdater.prototype, "editorContext", void 0);
|
|
131
146
|
exports.GLSPHiddenBoundsUpdater = GLSPHiddenBoundsUpdater = __decorate([
|
|
132
147
|
(0, inversify_1.injectable)()
|
|
133
148
|
], GLSPHiddenBoundsUpdater);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glsp-hidden-bounds-updater.js","sourceRoot":"","sources":["../../../src/features/bounds/glsp-hidden-bounds-updater.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,mDAgB+B;AAC/B,yCAAyD;AAEzD,yDAAqH;AACrH,+CAA4C;AAC5C,iDAAqF;AAErF,MAAa,aAAc,SAAQ,oBAAU;CAE5C;AAFD,sCAEC;AAED;;;;GAIG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,6BAAmB;IAAzD;;
|
|
1
|
+
{"version":3,"file":"glsp-hidden-bounds-updater.js","sourceRoot":"","sources":["../../../src/features/bounds/glsp-hidden-bounds-updater.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,mDAgB+B;AAC/B,yCAAyD;AAEzD,8EAAyE;AACzE,yDAAqH;AACrH,+CAA4C;AAC5C,iDAAqF;AAErF,MAAa,aAAc,SAAQ,oBAAU;CAE5C;AAFD,sCAEC;AAED;;;;GAIG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,6BAAmB;IAAzD;;QAIO,kB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AAC;IAES,eAAe,CAAC,EAAU,EAAE,KAAqB,EAAE,UAAoB;QAC7E,OAAO,IAAA,8BAAgB,EAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC;CACJ,CAAA;AAxGY,0DAAuB;AAC2B;IAA1D,IAAA,kBAAM,EAAC,4BAAkB,CAAC;IAAE,IAAA,oBAAQ,GAAE;8BAAyC,4BAAkB;mEAAC;AAC3D;IAAvC,IAAA,kBAAM,EAAC,6CAAoB,CAAC;8BAA0B,6CAAoB;8DAAC;kCAFnE,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CAwGnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eclipse-glsp/client",
|
|
3
|
-
"version": "2.6.0-next.
|
|
3
|
+
"version": "2.6.0-next.13+c0f83d9",
|
|
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.6.0-next.
|
|
49
|
+
"@eclipse-glsp/sprotty": "2.6.0-next.13+c0f83d9",
|
|
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": "c0f83d9de1912808ba2a1e41ebf970c1be7186bd"
|
|
67
67
|
}
|
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
} from '@eclipse-glsp/sprotty';
|
|
34
34
|
import { inject, injectable, optional } from 'inversify';
|
|
35
35
|
import { VNode } from 'snabbdom';
|
|
36
|
+
import { EditorContextService } from '../../base/editor-context-service';
|
|
36
37
|
import { BoundsAwareModelElement, calcElementAndRoute, getDescendantIds, isRoutable } from '../../utils/gmodel-util';
|
|
37
38
|
import { LayoutAware } from './layout-data';
|
|
38
39
|
import { LocalComputedBoundsAction, LocalRequestBoundsAction } from './local-bounds';
|
|
@@ -49,6 +50,7 @@ export class BoundsDataExt extends BoundsData {
|
|
|
49
50
|
@injectable()
|
|
50
51
|
export class GLSPHiddenBoundsUpdater extends HiddenBoundsUpdater {
|
|
51
52
|
@inject(EdgeRouterRegistry) @optional() protected readonly edgeRouterRegistry?: EdgeRouterRegistry;
|
|
53
|
+
@inject(EditorContextService) protected editorContext: EditorContextService;
|
|
52
54
|
|
|
53
55
|
protected element2route: ElementAndRoutingPoints[] = [];
|
|
54
56
|
|
|
@@ -114,7 +116,17 @@ export class GLSPHiddenBoundsUpdater extends HiddenBoundsUpdater {
|
|
|
114
116
|
// prepare and dispatch action
|
|
115
117
|
const responseId = (cause as RequestBoundsAction).requestId;
|
|
116
118
|
const revision = this.root !== undefined ? this.root.revision : undefined;
|
|
117
|
-
const
|
|
119
|
+
const canvasBounds = this.editorContext.canvasBounds;
|
|
120
|
+
const viewport = this.editorContext.viewportData;
|
|
121
|
+
const computedBoundsAction = ComputedBoundsAction.create(resizes, {
|
|
122
|
+
revision,
|
|
123
|
+
alignments,
|
|
124
|
+
layoutData,
|
|
125
|
+
routes,
|
|
126
|
+
responseId,
|
|
127
|
+
canvasBounds,
|
|
128
|
+
viewport
|
|
129
|
+
});
|
|
118
130
|
if (LocalRequestBoundsAction.is(cause)) {
|
|
119
131
|
LocalComputedBoundsAction.mark(computedBoundsAction);
|
|
120
132
|
}
|