@eclipse-glsp/client 2.6.0-next.7 → 2.6.0-next.8
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 +1 -1
- package/lib/features/bounds/glsp-hidden-bounds-updater.d.ts.map +1 -1
- package/lib/features/bounds/glsp-hidden-bounds-updater.js +4 -1
- package/lib/features/bounds/glsp-hidden-bounds-updater.js.map +1 -1
- package/lib/features/decoration/decoration-module.d.ts +1 -1
- package/lib/features/decoration/decoration-module.d.ts.map +1 -1
- package/lib/features/decoration/decoration-module.js +2 -1
- package/lib/features/decoration/decoration-module.js.map +1 -1
- package/lib/features/decoration/decoration-placer.d.ts +9 -3
- package/lib/features/decoration/decoration-placer.d.ts.map +1 -1
- package/lib/features/decoration/decoration-placer.js +32 -1
- package/lib/features/decoration/decoration-placer.js.map +1 -1
- package/package.json +3 -3
- package/src/features/bounds/glsp-hidden-bounds-updater.ts +5 -1
- package/src/features/decoration/decoration-module.ts +2 -1
- package/src/features/decoration/decoration-placer.ts +49 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2025 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -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,EACN,UAAU,EAEV,kBAAkB,EAIlB,uBAAuB,EAEvB,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,cAAc,EAGjB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,KAAK,EAAE,MAAM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AC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,aAAa,GAAG,KAAK;IAQrD,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IA6DzC,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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/********************************************************************************
|
|
3
|
-
* Copyright (c) 2022-
|
|
3
|
+
* Copyright (c) 2022-2025 EclipseSource and others.
|
|
4
4
|
*
|
|
5
5
|
* This program and the accompanying materials are made available under the
|
|
6
6
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -54,6 +54,9 @@ let GLSPHiddenBoundsUpdater = class GLSPHiddenBoundsUpdater extends sprotty_1.Hi
|
|
|
54
54
|
return vnode;
|
|
55
55
|
}
|
|
56
56
|
postUpdate(cause) {
|
|
57
|
+
if (cause === undefined || cause.kind !== sprotty_1.RequestBoundsAction.KIND) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
57
60
|
if (local_bounds_1.LocalRequestBoundsAction.is(cause) && cause.elementIDs) {
|
|
58
61
|
this.focusOnElements(cause.elementIDs);
|
|
59
62
|
}
|
|
@@ -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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CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;YAEjH,sEAAsE;YACtE,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7F,CAAC;IACL,CAAC;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;AA7FY,0DAAuB;AAC2B;IAA1D,IAAA,kBAAM,EAAC,4BAAkB,CAAC;IAAE,IAAA,oBAAQ,GAAE;8BAAyC,4BAAkB;mEAAC;kCAD1F,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CA6FnC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2025 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decoration-module.d.ts","sourceRoot":"","sources":["../../../src/features/decoration/decoration-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,aAAa,EAAwB,MAAM,uBAAuB,CAAC;AAC5E,OAAO,6BAA6B,CAAC;AAGrC,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"decoration-module.d.ts","sourceRoot":"","sources":["../../../src/features/decoration/decoration-module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EAAE,aAAa,EAAwB,MAAM,uBAAuB,CAAC;AAC5E,OAAO,6BAA6B,CAAC;AAGrC,eAAO,MAAM,gBAAgB,eAM5B,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.decorationModule = void 0;
|
|
4
4
|
/********************************************************************************
|
|
5
|
-
* Copyright (c) 2019-
|
|
5
|
+
* Copyright (c) 2019-2025 EclipseSource and others.
|
|
6
6
|
*
|
|
7
7
|
* This program and the accompanying materials are made available under the
|
|
8
8
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -21,5 +21,6 @@ require("../../../css/decoration.css");
|
|
|
21
21
|
const decoration_placer_1 = require("./decoration-placer");
|
|
22
22
|
exports.decorationModule = new sprotty_1.FeatureModule(bind => {
|
|
23
23
|
(0, sprotty_1.bindAsService)(bind, sprotty_1.TYPES.IVNodePostprocessor, decoration_placer_1.GlspDecorationPlacer);
|
|
24
|
+
bind(sprotty_1.TYPES.ISvgExportPostprocessor).toService(decoration_placer_1.GlspDecorationPlacer);
|
|
24
25
|
}, { featureId: Symbol('decoration') });
|
|
25
26
|
//# sourceMappingURL=decoration-module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decoration-module.js","sourceRoot":"","sources":["../../../src/features/decoration/decoration-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAA4E;AAC5E,uCAAqC;AACrC,2DAA2D;AAE9C,QAAA,gBAAgB,GAAG,IAAI,uBAAa,CAC7C,IAAI,CAAC,EAAE;IACH,IAAA,uBAAa,EAAC,IAAI,EAAE,eAAK,CAAC,mBAAmB,EAAE,wCAAoB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"decoration-module.js","sourceRoot":"","sources":["../../../src/features/decoration/decoration-module.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAA4E;AAC5E,uCAAqC;AACrC,2DAA2D;AAE9C,QAAA,gBAAgB,GAAG,IAAI,uBAAa,CAC7C,IAAI,CAAC,EAAE;IACH,IAAA,uBAAa,EAAC,IAAI,EAAE,eAAK,CAAC,mBAAmB,EAAE,wCAAoB,CAAC,CAAC;IACrE,IAAI,CAAC,eAAK,CAAC,uBAAuB,CAAC,CAAC,SAAS,CAAC,wCAAoB,CAAC,CAAC;AACxE,CAAC,EACD,EAAE,SAAS,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,CACtC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2025 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,9 +13,15 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { Decoration, DecorationPlacer, GModelElement, Point } from '@eclipse-glsp/sprotty';
|
|
17
|
-
|
|
16
|
+
import { Action, DOMHelper, Decoration, DecorationPlacer, GModelElement, ISvgExportPostProcessor, LazyInjector, Point } from '@eclipse-glsp/sprotty';
|
|
17
|
+
import { EditorContextService } from '../../base/editor-context-service';
|
|
18
|
+
export declare class GlspDecorationPlacer extends DecorationPlacer implements ISvgExportPostProcessor {
|
|
18
19
|
protected static readonly DECORATION_OFFSET: Point;
|
|
20
|
+
protected domHelper: DOMHelper;
|
|
21
|
+
protected lazyInjector: LazyInjector;
|
|
22
|
+
get editorContextService(): EditorContextService;
|
|
19
23
|
protected getPosition(element: GModelElement & Decoration): Point;
|
|
24
|
+
postUpdate(cause?: Action): void;
|
|
25
|
+
postUpdate(element: SVGSVGElement, cause?: Action): void;
|
|
20
26
|
}
|
|
21
27
|
//# sourceMappingURL=decoration-placer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decoration-placer.d.ts","sourceRoot":"","sources":["../../../src/features/decoration/decoration-placer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,
|
|
1
|
+
{"version":3,"file":"decoration-placer.d.ts","sourceRoot":"","sources":["../../../src/features/decoration/decoration-placer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAClF,OAAO,EACH,MAAM,EACN,SAAS,EACT,UAAU,EACV,gBAAgB,EAEhB,aAAa,EAEb,uBAAuB,EACvB,YAAY,EACZ,KAAK,EAIR,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAGzE,qBACa,oBAAqB,SAAQ,gBAAiB,YAAW,uBAAuB;IACzF,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,KAAK,CAAoB;IAEtE,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;IAG/B,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAErC,IAAI,oBAAoB,IAAI,oBAAoB,CAE/C;cAEkB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,UAAU,GAAG,KAAK;IAajE,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAEhC,UAAU,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;CAiBpE"}
|
|
@@ -5,11 +5,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
8
11
|
var GlspDecorationPlacer_1;
|
|
9
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
13
|
exports.GlspDecorationPlacer = void 0;
|
|
11
14
|
/********************************************************************************
|
|
12
|
-
* Copyright (c) 2019-
|
|
15
|
+
* Copyright (c) 2019-2025 EclipseSource and others.
|
|
13
16
|
*
|
|
14
17
|
* This program and the accompanying materials are made available under the
|
|
15
18
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -25,7 +28,12 @@ exports.GlspDecorationPlacer = void 0;
|
|
|
25
28
|
********************************************************************************/
|
|
26
29
|
const sprotty_1 = require("@eclipse-glsp/sprotty");
|
|
27
30
|
const inversify_1 = require("inversify");
|
|
31
|
+
const editor_context_service_1 = require("../../base/editor-context-service");
|
|
32
|
+
const gmodel_util_1 = require("../../utils/gmodel-util");
|
|
28
33
|
let GlspDecorationPlacer = GlspDecorationPlacer_1 = class GlspDecorationPlacer extends sprotty_1.DecorationPlacer {
|
|
34
|
+
get editorContextService() {
|
|
35
|
+
return this.lazyInjector.get(editor_context_service_1.EditorContextService);
|
|
36
|
+
}
|
|
29
37
|
getPosition(element) {
|
|
30
38
|
if (element instanceof sprotty_1.GChildElement && element.parent instanceof sprotty_1.GRoutableElement) {
|
|
31
39
|
return super.getPosition(element);
|
|
@@ -38,9 +46,32 @@ let GlspDecorationPlacer = GlspDecorationPlacer_1 = class GlspDecorationPlacer e
|
|
|
38
46
|
}
|
|
39
47
|
return sprotty_1.Point.ORIGIN;
|
|
40
48
|
}
|
|
49
|
+
postUpdate(elementOrCause, _cause) {
|
|
50
|
+
// Called as HiddenVNodePostprocessor => no-op
|
|
51
|
+
if (!elementOrCause || sprotty_1.Action.is(elementOrCause)) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
// Called as ISvgExportPostProcessor
|
|
55
|
+
// Adjust the position of all decorations in the exported SVG
|
|
56
|
+
const svg = elementOrCause;
|
|
57
|
+
const translate = `translate(-${GlspDecorationPlacer_1.DECORATION_OFFSET.x}px, -${GlspDecorationPlacer_1.DECORATION_OFFSET.y}px)`;
|
|
58
|
+
(0, gmodel_util_1.filter)(this.editorContextService.modelRoot.index, sprotty_1.isDecoration).forEach(decoration => {
|
|
59
|
+
const domId = this.domHelper.createUniqueDOMElementId(decoration);
|
|
60
|
+
const element = svg.querySelector(`#${domId}`);
|
|
61
|
+
element.style.transform = translate;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
41
64
|
};
|
|
42
65
|
exports.GlspDecorationPlacer = GlspDecorationPlacer;
|
|
43
66
|
GlspDecorationPlacer.DECORATION_OFFSET = { x: 12, y: 10 };
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, inversify_1.inject)(sprotty_1.TYPES.DOMHelper),
|
|
69
|
+
__metadata("design:type", sprotty_1.DOMHelper)
|
|
70
|
+
], GlspDecorationPlacer.prototype, "domHelper", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, inversify_1.inject)(sprotty_1.LazyInjector),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], GlspDecorationPlacer.prototype, "lazyInjector", void 0);
|
|
44
75
|
exports.GlspDecorationPlacer = GlspDecorationPlacer = GlspDecorationPlacer_1 = __decorate([
|
|
45
76
|
(0, inversify_1.injectable)()
|
|
46
77
|
], GlspDecorationPlacer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decoration-placer.js","sourceRoot":"","sources":["../../../src/features/decoration/decoration-placer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"decoration-placer.js","sourceRoot":"","sources":["../../../src/features/decoration/decoration-placer.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;kFAckF;AAClF,mDAc+B;AAC/B,yCAA+C;AAC/C,8EAAyE;AACzE,yDAAiD;AAG1C,IAAM,oBAAoB,4BAA1B,MAAM,oB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AS,CAAC;QACzC,CAAC,CAAC,CAAC;IACP,CAAC;;AA3CQ,oDAAoB;AACH,sCAAiB,GAAU,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,AAA1B,CAA2B;AAE5D;IADT,IAAA,kBAAM,EAAC,eAAK,CAAC,SAAS,CAAC;8BACH,mBAAS;uDAAC;AAGrB;IADT,IAAA,kBAAM,EAAC,sBAAY,CAAC;;0DACgB;+BAN5B,oBAAoB;IADhC,IAAA,sBAAU,GAAE;GACA,oBAAoB,CA4ChC"}
|
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.8+8c40df4",
|
|
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.8+8c40df4",
|
|
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": "8c40df47b964efec74056b221a5827c1174bd1a1"
|
|
67
67
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2022-
|
|
2
|
+
* Copyright (c) 2022-2025 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -65,6 +65,10 @@ export class GLSPHiddenBoundsUpdater extends HiddenBoundsUpdater {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
override postUpdate(cause?: Action): void {
|
|
68
|
+
if (cause === undefined || cause.kind !== RequestBoundsAction.KIND) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
68
72
|
if (LocalRequestBoundsAction.is(cause) && cause.elementIDs) {
|
|
69
73
|
this.focusOnElements(cause.elementIDs);
|
|
70
74
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2025 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -20,6 +20,7 @@ import { GlspDecorationPlacer } from './decoration-placer';
|
|
|
20
20
|
export const decorationModule = new FeatureModule(
|
|
21
21
|
bind => {
|
|
22
22
|
bindAsService(bind, TYPES.IVNodePostprocessor, GlspDecorationPlacer);
|
|
23
|
+
bind(TYPES.ISvgExportPostprocessor).toService(GlspDecorationPlacer);
|
|
23
24
|
},
|
|
24
25
|
{ featureId: Symbol('decoration') }
|
|
25
26
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/********************************************************************************
|
|
2
|
-
* Copyright (c) 2019-
|
|
2
|
+
* Copyright (c) 2019-2025 EclipseSource and others.
|
|
3
3
|
*
|
|
4
4
|
* This program and the accompanying materials are made available under the
|
|
5
5
|
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
@@ -13,12 +13,37 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import {
|
|
17
|
-
|
|
16
|
+
import {
|
|
17
|
+
Action,
|
|
18
|
+
DOMHelper,
|
|
19
|
+
Decoration,
|
|
20
|
+
DecorationPlacer,
|
|
21
|
+
GChildElement,
|
|
22
|
+
GModelElement,
|
|
23
|
+
GRoutableElement,
|
|
24
|
+
ISvgExportPostProcessor,
|
|
25
|
+
LazyInjector,
|
|
26
|
+
Point,
|
|
27
|
+
TYPES,
|
|
28
|
+
isDecoration,
|
|
29
|
+
isSizeable
|
|
30
|
+
} from '@eclipse-glsp/sprotty';
|
|
31
|
+
import { inject, injectable } from 'inversify';
|
|
32
|
+
import { EditorContextService } from '../../base/editor-context-service';
|
|
33
|
+
import { filter } from '../../utils/gmodel-util';
|
|
18
34
|
|
|
19
35
|
@injectable()
|
|
20
|
-
export class GlspDecorationPlacer extends DecorationPlacer {
|
|
36
|
+
export class GlspDecorationPlacer extends DecorationPlacer implements ISvgExportPostProcessor {
|
|
21
37
|
protected static readonly DECORATION_OFFSET: Point = { x: 12, y: 10 };
|
|
38
|
+
@inject(TYPES.DOMHelper)
|
|
39
|
+
protected domHelper: DOMHelper;
|
|
40
|
+
|
|
41
|
+
@inject(LazyInjector)
|
|
42
|
+
protected lazyInjector: LazyInjector;
|
|
43
|
+
|
|
44
|
+
get editorContextService(): EditorContextService {
|
|
45
|
+
return this.lazyInjector.get(EditorContextService);
|
|
46
|
+
}
|
|
22
47
|
|
|
23
48
|
protected override getPosition(element: GModelElement & Decoration): Point {
|
|
24
49
|
if (element instanceof GChildElement && element.parent instanceof GRoutableElement) {
|
|
@@ -32,4 +57,24 @@ export class GlspDecorationPlacer extends DecorationPlacer {
|
|
|
32
57
|
}
|
|
33
58
|
return Point.ORIGIN;
|
|
34
59
|
}
|
|
60
|
+
// HiddenVNodePostprocessor implementation
|
|
61
|
+
override postUpdate(cause?: Action): void;
|
|
62
|
+
// ISvgExportPostProcessor implementation
|
|
63
|
+
override postUpdate(element: SVGSVGElement, cause?: Action): void;
|
|
64
|
+
override postUpdate(elementOrCause?: SVGSVGElement | Action, _cause?: Action): void {
|
|
65
|
+
// Called as HiddenVNodePostprocessor => no-op
|
|
66
|
+
if (!elementOrCause || Action.is(elementOrCause)) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Called as ISvgExportPostProcessor
|
|
71
|
+
// Adjust the position of all decorations in the exported SVG
|
|
72
|
+
const svg = elementOrCause;
|
|
73
|
+
const translate = `translate(-${GlspDecorationPlacer.DECORATION_OFFSET.x}px, -${GlspDecorationPlacer.DECORATION_OFFSET.y}px)`;
|
|
74
|
+
filter(this.editorContextService.modelRoot.index, isDecoration).forEach(decoration => {
|
|
75
|
+
const domId = this.domHelper.createUniqueDOMElementId(decoration);
|
|
76
|
+
const element = svg.querySelector<SVGElement>(`#${domId}`);
|
|
77
|
+
element!.style.transform = translate;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
35
80
|
}
|