ngx-svg-graphics 1.0.0 → 1.1.0
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/README.md +3 -3
- package/fesm2022/ngx-svg-graphics.mjs +535 -0
- package/fesm2022/ngx-svg-graphics.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/arrows/arrow-between-boxes/arrow-between-boxes.component.d.ts +24 -0
- package/lib/components/arrows/arrow-between-elems/arrow-between-elems.component.d.ts +33 -0
- package/lib/components/arrows/arrow-between-points/arrow-between-points.component.d.ts +20 -0
- package/lib/components/draggable/draggable.component.d.ts +19 -0
- package/lib/components/text-area-svg/text-area-svg.component.d.ts +19 -0
- package/lib/models/arrow-style-configuration.d.ts +6 -0
- package/lib/models/bounding-box.d.ts +6 -0
- package/lib/models/dragger.d.ts +14 -0
- package/{src/lib/models/identifiable.ts → lib/models/identifiable.d.ts} +1 -1
- package/lib/models/positionable.d.ts +6 -0
- package/{src/lib/services/arrow-style-configuration.service.ts → lib/services/arrow-style-configuration.service.d.ts} +7 -16
- package/lib/services/svg-access.service.d.ts +13 -0
- package/lib/utils/path-layouter.d.ts +7 -0
- package/lib/utils/position-helper.d.ts +8 -0
- package/lib/utils/text-distributor.d.ts +7 -0
- package/package.json +21 -4
- package/{src/public-api.ts → public-api.d.ts} +9 -12
- package/ng-package.json +0 -7
- package/src/lib/components/arrows/arrow-between-boxes/arrow-between-boxes.component.css +0 -0
- package/src/lib/components/arrows/arrow-between-boxes/arrow-between-boxes.component.spec.ts +0 -32
- package/src/lib/components/arrows/arrow-between-boxes/arrow-between-boxes.component.svg +0 -12
- package/src/lib/components/arrows/arrow-between-boxes/arrow-between-boxes.component.ts +0 -61
- package/src/lib/components/arrows/arrow-between-elems/arrow-between-elems.component.css +0 -0
- package/src/lib/components/arrows/arrow-between-elems/arrow-between-elems.component.spec.ts +0 -23
- package/src/lib/components/arrows/arrow-between-elems/arrow-between-elems.component.svg +0 -9
- package/src/lib/components/arrows/arrow-between-elems/arrow-between-elems.component.ts +0 -97
- package/src/lib/components/arrows/arrow-between-points/arrow-between-points.component.css +0 -0
- package/src/lib/components/arrows/arrow-between-points/arrow-between-points.component.spec.ts +0 -23
- package/src/lib/components/arrows/arrow-between-points/arrow-between-points.component.svg +0 -15
- package/src/lib/components/arrows/arrow-between-points/arrow-between-points.component.ts +0 -39
- package/src/lib/components/draggable/draggable.component.css +0 -0
- package/src/lib/components/draggable/draggable.component.spec.ts +0 -33
- package/src/lib/components/draggable/draggable.component.svg +0 -9
- package/src/lib/components/draggable/draggable.component.ts +0 -49
- package/src/lib/models/arrow-style-configuration.ts +0 -8
- package/src/lib/models/bounding-box.ts +0 -7
- package/src/lib/models/dragger.spec.ts +0 -9
- package/src/lib/models/dragger.ts +0 -57
- package/src/lib/models/positionable.ts +0 -8
- package/src/lib/services/arrow-style-configuration.service.spec.ts +0 -16
- package/src/lib/services/svg-access.service.spec.ts +0 -16
- package/src/lib/services/svg-access.service.ts +0 -37
- package/src/lib/utils/path-layouter.spec.ts +0 -7
- package/src/lib/utils/path-layouter.ts +0 -41
- package/src/lib/utils/position-helper.spec.ts +0 -7
- package/src/lib/utils/position-helper.ts +0 -32
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SVG-Graphics
|
|
2
2
|
|
|
3
3
|
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.1.0.
|
|
4
4
|
|
|
@@ -21,7 +21,7 @@ ng generate --help
|
|
|
21
21
|
To build the library, run:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
ng build
|
|
24
|
+
ng build svg-graphics
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
@@ -32,7 +32,7 @@ Once the project is built, you can publish your library by following these steps
|
|
|
32
32
|
|
|
33
33
|
1. Navigate to the `dist` directory:
|
|
34
34
|
```bash
|
|
35
|
-
cd dist/
|
|
35
|
+
cd dist/svg-graphics
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, EventEmitter, Output, Component, Input, ViewChild } from '@angular/core';
|
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
|
4
|
+
import { NgIf, NgFor } from '@angular/common';
|
|
5
|
+
import { v4 } from 'uuid';
|
|
6
|
+
import * as i1 from '@angular/forms';
|
|
7
|
+
import { FormsModule } from '@angular/forms';
|
|
8
|
+
|
|
9
|
+
class Dragger {
|
|
10
|
+
element;
|
|
11
|
+
elem;
|
|
12
|
+
dragActive = false;
|
|
13
|
+
wasReallyDragged = false;
|
|
14
|
+
dragStartX = 0;
|
|
15
|
+
dragStartY = 0;
|
|
16
|
+
constructor(element) {
|
|
17
|
+
this.element = element;
|
|
18
|
+
this.elem = element;
|
|
19
|
+
}
|
|
20
|
+
startDrag(event) {
|
|
21
|
+
console.log('startDrag');
|
|
22
|
+
this.dragActive = true;
|
|
23
|
+
this.dragStartX = event.clientX;
|
|
24
|
+
this.dragStartY = event.clientY;
|
|
25
|
+
}
|
|
26
|
+
// returns true in the case of a real drag event, false otherwise
|
|
27
|
+
drag(event) {
|
|
28
|
+
if (this.dragActive) {
|
|
29
|
+
this.wasReallyDragged = true;
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
const dragX = event.clientX;
|
|
32
|
+
this.elem.position.x += (dragX - this.dragStartX);
|
|
33
|
+
this.dragStartX = dragX;
|
|
34
|
+
const dragY = event.clientY;
|
|
35
|
+
this.elem.position.y += (dragY - this.dragStartY);
|
|
36
|
+
this.dragStartY = dragY;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
endDrag(event) {
|
|
42
|
+
console.log('endDrag');
|
|
43
|
+
this.dragActive = false;
|
|
44
|
+
// todo was working for click vs drag, not now setTimeout(() => {this.dragActive = false;}, 50);
|
|
45
|
+
event.preventDefault();
|
|
46
|
+
}
|
|
47
|
+
//returns true if the click should be treated as click, false if it was from drag
|
|
48
|
+
clickElem(event) {
|
|
49
|
+
if (this.wasReallyDragged) {
|
|
50
|
+
this.wasReallyDragged = false;
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
class PositionHelper {
|
|
61
|
+
static absolutePosition(elem) {
|
|
62
|
+
let relativePosition = elem.getBBox();
|
|
63
|
+
let translationMatrix = elem.getCTM();
|
|
64
|
+
let x = relativePosition.x;
|
|
65
|
+
let y = relativePosition.y;
|
|
66
|
+
let x_abs = translationMatrix.a * x + translationMatrix.c * y + translationMatrix.e;
|
|
67
|
+
let y_abs = translationMatrix.b * x + translationMatrix.d * y + translationMatrix.f;
|
|
68
|
+
return { x: x_abs, y: y_abs, w: relativePosition.width, h: relativePosition.height };
|
|
69
|
+
}
|
|
70
|
+
static makeRelativeToElem(p, elem) {
|
|
71
|
+
this.matrixTransform(p, elem.getCTM().inverse());
|
|
72
|
+
}
|
|
73
|
+
static matrixTransform(p, translationMatrix) {
|
|
74
|
+
let x = p.x;
|
|
75
|
+
let y = p.y;
|
|
76
|
+
let x_trans = translationMatrix.a * x + translationMatrix.c * y + translationMatrix.e;
|
|
77
|
+
let y_trans = translationMatrix.b * x + translationMatrix.d * y + translationMatrix.f;
|
|
78
|
+
p.x = x_trans;
|
|
79
|
+
p.y = y_trans;
|
|
80
|
+
}
|
|
81
|
+
static newBoundingBox(x = 0, y = 0, width = 5, height = 5) {
|
|
82
|
+
return { x: x, y: y, w: width, h: height };
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
class SVGAccessService {
|
|
87
|
+
positionChange = new BehaviorSubject('');
|
|
88
|
+
constructor() { }
|
|
89
|
+
notifyPositionChange(id) {
|
|
90
|
+
this.positionChange.next(id);
|
|
91
|
+
}
|
|
92
|
+
listenToPositionChange() {
|
|
93
|
+
return this.positionChange.asObservable();
|
|
94
|
+
}
|
|
95
|
+
getElemById(id) {
|
|
96
|
+
let elem = document.getElementById(id);
|
|
97
|
+
return elem;
|
|
98
|
+
}
|
|
99
|
+
getRelativePosition(id, node) {
|
|
100
|
+
let elem = this.getElemById(id);
|
|
101
|
+
if (elem) {
|
|
102
|
+
let abs = PositionHelper.absolutePosition(elem);
|
|
103
|
+
PositionHelper.makeRelativeToElem(abs, node);
|
|
104
|
+
return abs;
|
|
105
|
+
}
|
|
106
|
+
return undefined;
|
|
107
|
+
}
|
|
108
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: SVGAccessService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
109
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: SVGAccessService, providedIn: 'root' });
|
|
110
|
+
}
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: SVGAccessService, decorators: [{
|
|
112
|
+
type: Injectable,
|
|
113
|
+
args: [{
|
|
114
|
+
providedIn: 'root'
|
|
115
|
+
}]
|
|
116
|
+
}], ctorParameters: () => [] });
|
|
117
|
+
|
|
118
|
+
class DraggableComponent {
|
|
119
|
+
svgAccessService;
|
|
120
|
+
chooseElem = new EventEmitter();
|
|
121
|
+
//the caller must initialize both required elements (elem and elementDragger) either in the constructor
|
|
122
|
+
// (or if they are inputs) in the ngOnInit life cycle hook
|
|
123
|
+
elem;
|
|
124
|
+
elemDragger;
|
|
125
|
+
constructor(svgAccessService) {
|
|
126
|
+
this.svgAccessService = svgAccessService;
|
|
127
|
+
}
|
|
128
|
+
ngAfterViewInit() {
|
|
129
|
+
this.svgAccessService.notifyPositionChange(this.elem.gId);
|
|
130
|
+
}
|
|
131
|
+
startDrag(event) {
|
|
132
|
+
this.elemDragger.startDrag(event);
|
|
133
|
+
}
|
|
134
|
+
drag(event) {
|
|
135
|
+
if (this.elemDragger.drag(event)) {
|
|
136
|
+
this.svgAccessService.notifyPositionChange(this.elem.gId);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
endDrag(event) {
|
|
140
|
+
this.elemDragger.endDrag(event);
|
|
141
|
+
}
|
|
142
|
+
clickElem(event) {
|
|
143
|
+
if (this.elemDragger.clickElem(event)) {
|
|
144
|
+
this.chooseElem.emit(this.elem);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: DraggableComponent, deps: [{ token: SVGAccessService }], target: i0.ɵɵFactoryTarget.Component });
|
|
148
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: DraggableComponent, isStandalone: true, selector: "[draggable]", outputs: { chooseElem: "chooseElem" }, ngImport: i0, template: "<svg:g>\n <g [attr.id]=\"elem.gId\"\n (mousedown)=\"startDrag($event)\"\n (mousemove)=\"drag($event)\"\n (mouseup)=\"endDrag($event)\"\n (mouseleave)=\"endDrag($event)\"\n (click)=\"clickElem($event)\">\n </g>\n</svg:g>\n", styles: [""] });
|
|
149
|
+
}
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: DraggableComponent, decorators: [{
|
|
151
|
+
type: Component,
|
|
152
|
+
args: [{ imports: [], selector: '[draggable]', template: "<svg:g>\n <g [attr.id]=\"elem.gId\"\n (mousedown)=\"startDrag($event)\"\n (mousemove)=\"drag($event)\"\n (mouseup)=\"endDrag($event)\"\n (mouseleave)=\"endDrag($event)\"\n (click)=\"clickElem($event)\">\n </g>\n</svg:g>\n" }]
|
|
153
|
+
}], ctorParameters: () => [{ type: SVGAccessService }], propDecorators: { chooseElem: [{
|
|
154
|
+
type: Output
|
|
155
|
+
}] } });
|
|
156
|
+
|
|
157
|
+
class PathLayouter {
|
|
158
|
+
static bestPoints(p1, p2) {
|
|
159
|
+
//assumption is that both boxes do not intersect
|
|
160
|
+
//since we only deal with bounding boxes, all relevant lines are parallel/orthogonal
|
|
161
|
+
let xPoints = this.getPointsInOneDimension(p1.x, p1.w, p2.x, p2.w);
|
|
162
|
+
let yPoints = this.getPointsInOneDimension(p1.y, p1.h, p2.y, p2.h);
|
|
163
|
+
let result1 = { x: xPoints[0], y: yPoints[0] };
|
|
164
|
+
let result2 = { x: xPoints[1], y: yPoints[1] };
|
|
165
|
+
return [result1, result2];
|
|
166
|
+
}
|
|
167
|
+
// assumes that x1 is smaller than x2
|
|
168
|
+
//works for width (careful with height, y axis is wrong way)
|
|
169
|
+
static determineOverlapX(x1, w1, x2, w2) {
|
|
170
|
+
let x1right = x1 + w1;
|
|
171
|
+
if (x1right >= x2) {
|
|
172
|
+
//find end of overlap
|
|
173
|
+
let x2right = x2 + w2;
|
|
174
|
+
let end = Math.min(x1right, x2right);
|
|
175
|
+
//overlap interval is [x2, end]
|
|
176
|
+
let middle = (x2 + end) / 2;
|
|
177
|
+
return [middle, middle];
|
|
178
|
+
}
|
|
179
|
+
else
|
|
180
|
+
return [x1right, x2];
|
|
181
|
+
}
|
|
182
|
+
static getPointsInOneDimension(x1, w1, x2, w2) {
|
|
183
|
+
//determine overlap (and then middle of it) or closest points in one dimension
|
|
184
|
+
if (x1 < x2) {
|
|
185
|
+
return this.determineOverlapX(x1, w1, x2, w2);
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
return this.determineOverlapX(x2, w2, x1, w1).reverse();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/*****
|
|
194
|
+
default implementation
|
|
195
|
+
You can extend this base case with an own service implementation.
|
|
196
|
+
Make sure to configure DI to use your service instead of this one
|
|
197
|
+
In 20205, the way to do so is to declare it as provider in app.config.ts or app.component.ts
|
|
198
|
+
providers: [{ provide: ArrowStyleConfigurationService, useClass: YourServiceImplementation }],
|
|
199
|
+
See https://angular.dev/guide/di/dependency-injection-providers
|
|
200
|
+
***/
|
|
201
|
+
class ArrowStyleConfigurationService {
|
|
202
|
+
constructor() { }
|
|
203
|
+
styleArrow(arrowType) {
|
|
204
|
+
return {
|
|
205
|
+
color: 'black',
|
|
206
|
+
dashed: [0]
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ArrowStyleConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
210
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ArrowStyleConfigurationService, providedIn: 'root' });
|
|
211
|
+
}
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ArrowStyleConfigurationService, decorators: [{
|
|
213
|
+
type: Injectable,
|
|
214
|
+
args: [{
|
|
215
|
+
providedIn: 'root'
|
|
216
|
+
}]
|
|
217
|
+
}], ctorParameters: () => [] });
|
|
218
|
+
|
|
219
|
+
class ArrowBetweenPointsComponent {
|
|
220
|
+
arrowStyleConfigService;
|
|
221
|
+
startX;
|
|
222
|
+
startY;
|
|
223
|
+
endX;
|
|
224
|
+
endY;
|
|
225
|
+
text;
|
|
226
|
+
style;
|
|
227
|
+
arrowType;
|
|
228
|
+
arrowStyleConfiguration;
|
|
229
|
+
id = v4();
|
|
230
|
+
constructor(arrowStyleConfigService) {
|
|
231
|
+
this.arrowStyleConfigService = arrowStyleConfigService;
|
|
232
|
+
this.arrowStyleConfiguration = this.arrowStyleConfigService.styleArrow();
|
|
233
|
+
}
|
|
234
|
+
ngOnChanges() {
|
|
235
|
+
this.arrowStyleConfiguration = this.arrowStyleConfigService.styleArrow(this.arrowType);
|
|
236
|
+
}
|
|
237
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ArrowBetweenPointsComponent, deps: [{ token: ArrowStyleConfigurationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
238
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: ArrowBetweenPointsComponent, isStandalone: true, selector: "[arrow-between-points]", inputs: { startX: "startX", startY: "startY", endX: "endX", endY: "endY", text: "text", style: "style", arrowType: "arrowType" }, usesOnChanges: true, ngImport: i0, template: "<svg:g>\n <path [attr.id]=\"id+'-path'\"\n [attr.d]=\"'M '+startX+','+startY+' L '+endX+','+endY\"\n [attr.stroke]=\"arrowStyleConfiguration.color\"\n [attr.stroke-dasharray]=\"arrowStyleConfiguration.dashed\"\n [attr.marker-start]='\"url(#\"+arrowStyleConfiguration.startPointer+\")\"'\n [attr.marker-end]='\"url(#\"+arrowStyleConfiguration.endPointer+\")\"'\n style=\"{{style}}\">\n </path>\n <text *ngIf=\"text\">\n <textPath [attr.href]=\"'#'+id+'-path'\">\n {{text}}\n </textPath>\n </text>\n</svg:g>", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
239
|
+
}
|
|
240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ArrowBetweenPointsComponent, decorators: [{
|
|
241
|
+
type: Component,
|
|
242
|
+
args: [{ selector: '[arrow-between-points]', imports: [
|
|
243
|
+
NgIf
|
|
244
|
+
], template: "<svg:g>\n <path [attr.id]=\"id+'-path'\"\n [attr.d]=\"'M '+startX+','+startY+' L '+endX+','+endY\"\n [attr.stroke]=\"arrowStyleConfiguration.color\"\n [attr.stroke-dasharray]=\"arrowStyleConfiguration.dashed\"\n [attr.marker-start]='\"url(#\"+arrowStyleConfiguration.startPointer+\")\"'\n [attr.marker-end]='\"url(#\"+arrowStyleConfiguration.endPointer+\")\"'\n style=\"{{style}}\">\n </path>\n <text *ngIf=\"text\">\n <textPath [attr.href]=\"'#'+id+'-path'\">\n {{text}}\n </textPath>\n </text>\n</svg:g>" }]
|
|
245
|
+
}], ctorParameters: () => [{ type: ArrowStyleConfigurationService }], propDecorators: { startX: [{
|
|
246
|
+
type: Input
|
|
247
|
+
}], startY: [{
|
|
248
|
+
type: Input
|
|
249
|
+
}], endX: [{
|
|
250
|
+
type: Input
|
|
251
|
+
}], endY: [{
|
|
252
|
+
type: Input
|
|
253
|
+
}], text: [{
|
|
254
|
+
type: Input
|
|
255
|
+
}], style: [{
|
|
256
|
+
type: Input
|
|
257
|
+
}], arrowType: [{
|
|
258
|
+
type: Input
|
|
259
|
+
}] } });
|
|
260
|
+
|
|
261
|
+
class ArrowBetweenBoxesComponent {
|
|
262
|
+
cdr;
|
|
263
|
+
start;
|
|
264
|
+
end;
|
|
265
|
+
arrowType;
|
|
266
|
+
text;
|
|
267
|
+
style;
|
|
268
|
+
x1 = 0;
|
|
269
|
+
y1 = 0;
|
|
270
|
+
x2 = 5;
|
|
271
|
+
y2 = 5;
|
|
272
|
+
id = v4();
|
|
273
|
+
positioned = false;
|
|
274
|
+
constructor(cdr) {
|
|
275
|
+
this.cdr = cdr;
|
|
276
|
+
}
|
|
277
|
+
ngAfterViewInit() {
|
|
278
|
+
this.computePositions();
|
|
279
|
+
this.positioned = true;
|
|
280
|
+
this.cdr.detectChanges();
|
|
281
|
+
}
|
|
282
|
+
ngOnChanges() {
|
|
283
|
+
if (this.positioned) {
|
|
284
|
+
this.computePositions();
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
computePositions() {
|
|
288
|
+
let res = PathLayouter.bestPoints(this.start, this.end);
|
|
289
|
+
this.applyBestPoints(res);
|
|
290
|
+
}
|
|
291
|
+
applyBestPoints(res) {
|
|
292
|
+
this.x1 = res[0].x;
|
|
293
|
+
this.y1 = res[0].y;
|
|
294
|
+
this.x2 = res[1].x;
|
|
295
|
+
this.y2 = res[1].y;
|
|
296
|
+
}
|
|
297
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ArrowBetweenBoxesComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
298
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: ArrowBetweenBoxesComponent, isStandalone: true, selector: "[arrow-between-boxes]", inputs: { start: "start", end: "end", arrowType: "arrowType", text: "text", style: "style" }, usesOnChanges: true, ngImport: i0, template: "<svg:g>\n <g arrow-between-points\n [startX]=\"x1\"\n [startY]=\"y1\"\n [endX]=\"x2\"\n [endY]=\"y2\"\n [text]=\"text\"\n [arrowType]=\"arrowType\"\n [style]=\"style\"\n >\n </g>\n</svg:g>\n", styles: [""], dependencies: [{ kind: "component", type: ArrowBetweenPointsComponent, selector: "[arrow-between-points]", inputs: ["startX", "startY", "endX", "endY", "text", "style", "arrowType"] }] });
|
|
299
|
+
}
|
|
300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ArrowBetweenBoxesComponent, decorators: [{
|
|
301
|
+
type: Component,
|
|
302
|
+
args: [{ selector: '[arrow-between-boxes]', standalone: true, imports: [ArrowBetweenPointsComponent], template: "<svg:g>\n <g arrow-between-points\n [startX]=\"x1\"\n [startY]=\"y1\"\n [endX]=\"x2\"\n [endY]=\"y2\"\n [text]=\"text\"\n [arrowType]=\"arrowType\"\n [style]=\"style\"\n >\n </g>\n</svg:g>\n" }]
|
|
303
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { start: [{
|
|
304
|
+
type: Input
|
|
305
|
+
}], end: [{
|
|
306
|
+
type: Input
|
|
307
|
+
}], arrowType: [{
|
|
308
|
+
type: Input
|
|
309
|
+
}], text: [{
|
|
310
|
+
type: Input
|
|
311
|
+
}], style: [{
|
|
312
|
+
type: Input
|
|
313
|
+
}] } });
|
|
314
|
+
|
|
315
|
+
class ArrowBetweenElemsComponent {
|
|
316
|
+
svgAccessService;
|
|
317
|
+
cdr;
|
|
318
|
+
startGID;
|
|
319
|
+
startSuffix;
|
|
320
|
+
endGID;
|
|
321
|
+
endSuffix;
|
|
322
|
+
arrowType;
|
|
323
|
+
breaks = [];
|
|
324
|
+
text;
|
|
325
|
+
style; //todo move into ArrowStyleConfig?
|
|
326
|
+
startId;
|
|
327
|
+
endId;
|
|
328
|
+
start;
|
|
329
|
+
end;
|
|
330
|
+
positioned = false;
|
|
331
|
+
node;
|
|
332
|
+
changeNotifier;
|
|
333
|
+
changeSubscription;
|
|
334
|
+
//idea: compute the two input positions as relative to the current elem
|
|
335
|
+
constructor(svgAccessService, cdr) {
|
|
336
|
+
this.svgAccessService = svgAccessService;
|
|
337
|
+
this.cdr = cdr;
|
|
338
|
+
this.changeNotifier = this.svgAccessService.listenToPositionChange();
|
|
339
|
+
this.changeSubscription = this.changeNotifier.subscribe(nextString => {
|
|
340
|
+
if (nextString == this.startGID || nextString == this.endGID) {
|
|
341
|
+
setTimeout(() => {
|
|
342
|
+
this.computePositionsByIds();
|
|
343
|
+
this.cdr.detectChanges();
|
|
344
|
+
}, 0);
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
ngOnInit() {
|
|
349
|
+
this.startId = this.startGID + this.startSuffix;
|
|
350
|
+
this.endId = this.endGID + this.endSuffix;
|
|
351
|
+
}
|
|
352
|
+
ngOnChanges(_) {
|
|
353
|
+
this.startId = this.startGID + this.startSuffix;
|
|
354
|
+
this.endId = this.endGID + this.endSuffix;
|
|
355
|
+
this.computePositionsByIds();
|
|
356
|
+
this.cdr.detectChanges();
|
|
357
|
+
}
|
|
358
|
+
ngAfterViewInit() {
|
|
359
|
+
this.positioned = true;
|
|
360
|
+
this.computePositionsByIds();
|
|
361
|
+
this.cdr.detectChanges();
|
|
362
|
+
}
|
|
363
|
+
computePositionsByIds() {
|
|
364
|
+
if (this.node?.nativeElement) {
|
|
365
|
+
let rel = this.node.nativeElement;
|
|
366
|
+
let startOpt = this.svgAccessService.getRelativePosition(this.startId, rel);
|
|
367
|
+
if (startOpt) {
|
|
368
|
+
this.start = startOpt;
|
|
369
|
+
}
|
|
370
|
+
let endOpt = this.svgAccessService.getRelativePosition(this.endId, rel);
|
|
371
|
+
if (endOpt) {
|
|
372
|
+
this.end = endOpt;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
else
|
|
376
|
+
console.log('No native element yet');
|
|
377
|
+
}
|
|
378
|
+
ngOnDestroy() {
|
|
379
|
+
this.changeSubscription.unsubscribe();
|
|
380
|
+
}
|
|
381
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ArrowBetweenElemsComponent, deps: [{ token: SVGAccessService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
382
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: ArrowBetweenElemsComponent, isStandalone: true, selector: "[arrowElems]", inputs: { startGID: "startGID", startSuffix: "startSuffix", endGID: "endGID", endSuffix: "endSuffix", arrowType: "arrowType", breaks: "breaks", text: "text", style: "style" }, viewQueries: [{ propertyName: "node", first: true, predicate: ["arrow"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<svg:g #arrow>\n <g arrow-between-boxes *ngIf=\"start && end\"\n [start]=\"start\"\n [end]=\"end\"\n [arrowType]=\"arrowType\"\n [text]=\"text\"\n [style]=\"style\">\n </g>\n></svg:g>\n", styles: [""], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ArrowBetweenBoxesComponent, selector: "[arrow-between-boxes]", inputs: ["start", "end", "arrowType", "text", "style"] }] });
|
|
383
|
+
}
|
|
384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: ArrowBetweenElemsComponent, decorators: [{
|
|
385
|
+
type: Component,
|
|
386
|
+
args: [{ selector: '[arrowElems]', standalone: true, imports: [NgIf, ArrowBetweenBoxesComponent], template: "<svg:g #arrow>\n <g arrow-between-boxes *ngIf=\"start && end\"\n [start]=\"start\"\n [end]=\"end\"\n [arrowType]=\"arrowType\"\n [text]=\"text\"\n [style]=\"style\">\n </g>\n></svg:g>\n" }]
|
|
387
|
+
}], ctorParameters: () => [{ type: SVGAccessService }, { type: i0.ChangeDetectorRef }], propDecorators: { startGID: [{
|
|
388
|
+
type: Input
|
|
389
|
+
}], startSuffix: [{
|
|
390
|
+
type: Input
|
|
391
|
+
}], endGID: [{
|
|
392
|
+
type: Input
|
|
393
|
+
}], endSuffix: [{
|
|
394
|
+
type: Input
|
|
395
|
+
}], arrowType: [{
|
|
396
|
+
type: Input
|
|
397
|
+
}], breaks: [{
|
|
398
|
+
type: Input
|
|
399
|
+
}], text: [{
|
|
400
|
+
type: Input
|
|
401
|
+
}], style: [{
|
|
402
|
+
type: Input
|
|
403
|
+
}], node: [{
|
|
404
|
+
type: ViewChild,
|
|
405
|
+
args: ['arrow']
|
|
406
|
+
}] } });
|
|
407
|
+
|
|
408
|
+
class TextDistributor {
|
|
409
|
+
static determineHowManyChars(w) {
|
|
410
|
+
return Math.floor(w / 7.6);
|
|
411
|
+
}
|
|
412
|
+
static determineLines(h) {
|
|
413
|
+
return Math.floor(h / 20);
|
|
414
|
+
}
|
|
415
|
+
// idea: distribute words over lines,
|
|
416
|
+
// if a single word is too long for a line, cut it early enough to have three dots afterwards
|
|
417
|
+
// if you need to indicate that there is more text after the last complete word, also use three dots, but after a break
|
|
418
|
+
static distributeText(text, w, h) {
|
|
419
|
+
let distributedText = [];
|
|
420
|
+
let broken = text?.split(' ');
|
|
421
|
+
let maxLines = this.determineLines(h);
|
|
422
|
+
if (maxLines <= 0) {
|
|
423
|
+
console.error('Text area too low for text ' + text);
|
|
424
|
+
distributedText = ['...'];
|
|
425
|
+
}
|
|
426
|
+
for (let i = 0; i < maxLines; i++) {
|
|
427
|
+
if (broken.length > 0) {
|
|
428
|
+
distributedText[i] = this.takeNextLine(broken, w);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
// now deal with last line: here we need special care for adding ... if necessary
|
|
432
|
+
if (broken.length > 0) {
|
|
433
|
+
// we need to indicate that there is more text - this could be the 4 signs to many...
|
|
434
|
+
distributedText[maxLines - 1] += ' ...';
|
|
435
|
+
}
|
|
436
|
+
return distributedText.filter(w => w != '');
|
|
437
|
+
}
|
|
438
|
+
// if a single word is too long for a line, cut it early enough to have three dots afterwards
|
|
439
|
+
static limitSingleWord(word, w) {
|
|
440
|
+
let maxSize = this.determineHowManyChars(w);
|
|
441
|
+
if (word.length > maxSize) {
|
|
442
|
+
let ending = '...';
|
|
443
|
+
// care for far too short width:
|
|
444
|
+
if (maxSize <= 3) {
|
|
445
|
+
return ending.substring(0, maxSize);
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
return word.substring(0, maxSize - 3) + '...';
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
return word;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
// adapts input words array in place by removing all those that are taken into the result
|
|
456
|
+
static takeNextLine(words, w) {
|
|
457
|
+
if (words?.length > 0) {
|
|
458
|
+
let res = this.limitSingleWord(words[0], w);
|
|
459
|
+
let i = 1;
|
|
460
|
+
let maxSize = this.determineHowManyChars(w);
|
|
461
|
+
let testRes = res + ' ' + words[i];
|
|
462
|
+
while (testRes.length <= maxSize && i < words.length - 1) {
|
|
463
|
+
res = testRes;
|
|
464
|
+
i++;
|
|
465
|
+
testRes = res + ' ' + words[i];
|
|
466
|
+
}
|
|
467
|
+
words.splice(0, i);
|
|
468
|
+
return res;
|
|
469
|
+
}
|
|
470
|
+
else
|
|
471
|
+
return '';
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
class TextAreaSvgComponent {
|
|
476
|
+
/*
|
|
477
|
+
a fixed size svg. If the text exceeds the possible size, we will do a ... for now
|
|
478
|
+
*/
|
|
479
|
+
text;
|
|
480
|
+
x;
|
|
481
|
+
y;
|
|
482
|
+
w;
|
|
483
|
+
h;
|
|
484
|
+
singleEdit = false;
|
|
485
|
+
textChange = new EventEmitter();
|
|
486
|
+
//only with singleEdit since that opens an overlay where one can change the text in place
|
|
487
|
+
distributedText = [];
|
|
488
|
+
isActive = false;
|
|
489
|
+
ngOnChanges() {
|
|
490
|
+
this.distributeText();
|
|
491
|
+
}
|
|
492
|
+
handleClick() {
|
|
493
|
+
if (this.singleEdit) {
|
|
494
|
+
this.isActive = true;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
leaveTextInput() {
|
|
498
|
+
this.textChange.emit(this.text);
|
|
499
|
+
this.isActive = false;
|
|
500
|
+
}
|
|
501
|
+
distributeText() {
|
|
502
|
+
this.distributedText = TextDistributor.distributeText(this.text, this.w, this.h);
|
|
503
|
+
}
|
|
504
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TextAreaSvgComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
505
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.4", type: TextAreaSvgComponent, isStandalone: true, selector: "[text-area-svg]", inputs: { text: "text", x: "x", y: "y", w: "w", h: "h", singleEdit: "singleEdit" }, outputs: { textChange: "textChange" }, usesOnChanges: true, ngImport: i0, template: "<svg:text [attr.x]=\"x\" [attr.y]=\"y\" [attr.width]=\"w\" [attr.height]=\"h\" dy=\"0\" [attr.style]=\"\" (click)=\"handleClick()\">\n <tspan dy=\"1.2em\" [attr.x]=\"x\" *ngFor=\"let line of distributedText\">{{line}}</tspan>\n</svg:text>\n<svg:foreignObject *ngIf=\"isActive\" [attr.x]=\"x\" [attr.y]=\"y\" [attr.width]=\"w\" [attr.height]=\"h\">\n <input id=\"text-area\" type=\"text\" [(ngModel)]=\"this.text\" (focusout)=\"leaveTextInput()\"/>\n</svg:foreignObject>\n", styles: [""], dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
506
|
+
}
|
|
507
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TextAreaSvgComponent, decorators: [{
|
|
508
|
+
type: Component,
|
|
509
|
+
args: [{ selector: '[text-area-svg]', imports: [NgFor, NgIf, FormsModule], template: "<svg:text [attr.x]=\"x\" [attr.y]=\"y\" [attr.width]=\"w\" [attr.height]=\"h\" dy=\"0\" [attr.style]=\"\" (click)=\"handleClick()\">\n <tspan dy=\"1.2em\" [attr.x]=\"x\" *ngFor=\"let line of distributedText\">{{line}}</tspan>\n</svg:text>\n<svg:foreignObject *ngIf=\"isActive\" [attr.x]=\"x\" [attr.y]=\"y\" [attr.width]=\"w\" [attr.height]=\"h\">\n <input id=\"text-area\" type=\"text\" [(ngModel)]=\"this.text\" (focusout)=\"leaveTextInput()\"/>\n</svg:foreignObject>\n" }]
|
|
510
|
+
}], propDecorators: { text: [{
|
|
511
|
+
type: Input
|
|
512
|
+
}], x: [{
|
|
513
|
+
type: Input
|
|
514
|
+
}], y: [{
|
|
515
|
+
type: Input
|
|
516
|
+
}], w: [{
|
|
517
|
+
type: Input
|
|
518
|
+
}], h: [{
|
|
519
|
+
type: Input
|
|
520
|
+
}], singleEdit: [{
|
|
521
|
+
type: Input
|
|
522
|
+
}], textChange: [{
|
|
523
|
+
type: Output
|
|
524
|
+
}] } });
|
|
525
|
+
|
|
526
|
+
/*
|
|
527
|
+
* Public API Surface of arrows
|
|
528
|
+
*/
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Generated bundle index. Do not edit.
|
|
532
|
+
*/
|
|
533
|
+
|
|
534
|
+
export { ArrowBetweenBoxesComponent, ArrowBetweenElemsComponent, ArrowBetweenPointsComponent, ArrowStyleConfigurationService, DraggableComponent, Dragger, PathLayouter, PositionHelper, SVGAccessService, TextAreaSvgComponent, TextDistributor };
|
|
535
|
+
//# sourceMappingURL=ngx-svg-graphics.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-svg-graphics.mjs","sources":["../../../projects/svg-graphics/src/lib/models/dragger.ts","../../../projects/svg-graphics/src/lib/utils/position-helper.ts","../../../projects/svg-graphics/src/lib/services/svg-access.service.ts","../../../projects/svg-graphics/src/lib/components/draggable/draggable.component.ts","../../../projects/svg-graphics/src/lib/components/draggable/draggable.component.svg","../../../projects/svg-graphics/src/lib/utils/path-layouter.ts","../../../projects/svg-graphics/src/lib/services/arrow-style-configuration.service.ts","../../../projects/svg-graphics/src/lib/components/arrows/arrow-between-points/arrow-between-points.component.ts","../../../projects/svg-graphics/src/lib/components/arrows/arrow-between-points/arrow-between-points.component.svg","../../../projects/svg-graphics/src/lib/components/arrows/arrow-between-boxes/arrow-between-boxes.component.ts","../../../projects/svg-graphics/src/lib/components/arrows/arrow-between-boxes/arrow-between-boxes.component.svg","../../../projects/svg-graphics/src/lib/components/arrows/arrow-between-elems/arrow-between-elems.component.ts","../../../projects/svg-graphics/src/lib/components/arrows/arrow-between-elems/arrow-between-elems.component.svg","../../../projects/svg-graphics/src/lib/utils/text-distributor.ts","../../../projects/svg-graphics/src/lib/components/text-area-svg/text-area-svg.component.ts","../../../projects/svg-graphics/src/lib/components/text-area-svg/text-area-svg.component.svg","../../../projects/svg-graphics/src/public-api.ts","../../../projects/svg-graphics/src/ngx-svg-graphics.ts"],"sourcesContent":["import {Positionable} from './positionable';\n\nexport class Dragger<T extends Positionable> {\n elem: T;\n\n dragActive = false;\n wasReallyDragged = false;\n dragStartX: number = 0;\n dragStartY: number = 0;\n\n constructor(private element: T) {\n this.elem = element;\n }\n\n startDrag(event: MouseEvent) {\n console.log('startDrag');\n this.dragActive = true;\n this.dragStartX = event.clientX;\n this.dragStartY = event.clientY;\n }\n\n // returns true in the case of a real drag event, false otherwise\n drag(event: MouseEvent): boolean {\n if (this.dragActive) {\n this.wasReallyDragged = true;\n event.preventDefault();\n const dragX = event.clientX;\n this.elem.position.x+= (dragX - this.dragStartX);\n this.dragStartX = dragX;\n const dragY = event.clientY;\n this.elem.position.y+= (dragY - this.dragStartY);\n this.dragStartY = dragY;\n return true;\n }\n return false;\n }\n\n endDrag(event: MouseEvent) {\n console.log('endDrag');\n this.dragActive = false;\n // todo was working for click vs drag, not now setTimeout(() => {this.dragActive = false;}, 50);\n event.preventDefault();\n }\n\n //returns true if the click should be treated as click, false if it was from drag\n clickElem(event: MouseEvent): boolean {\n if (this.wasReallyDragged) {\n this.wasReallyDragged = false;\n return false;\n } else {\n event.preventDefault();\n return true;\n }\n }\n\n\n}\n","import {Point} from \"@angular/cdk/drag-drop\";\nimport {BoundingBox} from \"../models/bounding-box\";\n\nexport class PositionHelper {\n\n static absolutePosition(elem: SVGGraphicsElement): BoundingBox {\n let relativePosition: DOMRect = elem.getBBox();\n let translationMatrix: DOMMatrix = elem.getCTM()!;\n let x = relativePosition.x;\n let y = relativePosition.y;\n let x_abs = translationMatrix.a*x+translationMatrix.c*y+translationMatrix.e;\n let y_abs = translationMatrix.b*x+translationMatrix.d*y+translationMatrix.f;\n return {x: x_abs, y: y_abs, w: relativePosition.width, h: relativePosition.height}\n }\n\n static makeRelativeToElem(p: Point, elem: SVGGraphicsElement): void {\n this.matrixTransform(p, elem.getCTM()!.inverse())\n }\n\n static matrixTransform(p: Point, translationMatrix: DOMMatrix): void {\n let x = p.x;\n let y = p.y;\n let x_trans = translationMatrix.a*x+translationMatrix.c*y+translationMatrix.e;\n let y_trans = translationMatrix.b*x+translationMatrix.d*y+translationMatrix.f;\n p.x = x_trans\n p.y = y_trans\n }\n\n static newBoundingBox(x: number = 0, y: number = 0, width: number = 5, height: number = 5): BoundingBox {\n return {x: x, y: y, w: width, h: height};\n }\n}\n","import { Injectable } from '@angular/core';\nimport {BehaviorSubject, Observable} from \"rxjs\";\nimport {BoundingBox} from \"../models/bounding-box\";\nimport {PositionHelper} from \"../utils/position-helper\";\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SVGAccessService {\n\n positionChange: BehaviorSubject<string> = new BehaviorSubject<string>('');\n\n constructor() { }\n\n notifyPositionChange(id: string) {\n this.positionChange.next(id);\n }\n\n listenToPositionChange(): Observable<string> {\n return this.positionChange.asObservable()\n }\n\n getElemById(id: string): SVGGraphicsElement | undefined {\n let elem = document.getElementById(id)\n return elem as unknown as SVGGraphicsElement\n }\n\n getRelativePosition(id: string, node: SVGGraphicsElement): BoundingBox | undefined {\n let elem = this.getElemById(id)\n if (elem) {\n let abs = PositionHelper.absolutePosition(elem)\n PositionHelper.makeRelativeToElem(abs, node)\n return abs;\n }\n return undefined\n }\n}\n","import {AfterViewInit, Component, EventEmitter, Output} from '@angular/core';\nimport {SVGAccessService} from '../../services/svg-access.service';\nimport { Draggable } from '../../models/positionable';\nimport {Dragger} from \"../../models/dragger\";\n\n@Component({\n imports: [],\n selector: '[draggable]',\n templateUrl: './draggable.component.svg',\n styleUrl: './draggable.component.css'\n})\nexport abstract class DraggableComponent<T extends Draggable> implements AfterViewInit {\n\n @Output() chooseElem = new EventEmitter<T>();\n //the caller must initialize both required elements (elem and elementDragger) either in the constructor\n // (or if they are inputs) in the ngOnInit life cycle hook\n elem!: T;\n elemDragger!: Dragger<T>;\n\n protected constructor(\n protected svgAccessService: SVGAccessService\n ) {}\n\n\n ngAfterViewInit() {\n this.svgAccessService.notifyPositionChange(this.elem.gId)\n }\n\n startDrag(event: MouseEvent) {\n this.elemDragger.startDrag(event);\n }\n\n drag(event: MouseEvent) {\n if (this.elemDragger.drag(event)) {\n this.svgAccessService.notifyPositionChange(this.elem.gId)\n }\n }\n\n endDrag(event: MouseEvent) {\n this.elemDragger.endDrag(event);\n }\n\n clickElem(event: MouseEvent) {\n if (this.elemDragger.clickElem(event)) {\n this.chooseElem.emit(this.elem);\n }\n }\n\n}\n","<svg:g>\n <g [attr.id]=\"elem.gId\"\n (mousedown)=\"startDrag($event)\"\n (mousemove)=\"drag($event)\"\n (mouseup)=\"endDrag($event)\"\n (mouseleave)=\"endDrag($event)\"\n (click)=\"clickElem($event)\">\n </g>\n</svg:g>\n","import {BoundingBox} from \"../models/bounding-box\";\nimport {Point} from \"@angular/cdk/drag-drop\";\n\nexport class PathLayouter {\n\n static bestPoints(p1: BoundingBox, p2: BoundingBox) {\n //assumption is that both boxes do not intersect\n //since we only deal with bounding boxes, all relevant lines are parallel/orthogonal\n\n let xPoints = this.getPointsInOneDimension(p1.x, p1.w, p2.x, p2.w)\n let yPoints = this.getPointsInOneDimension(p1.y, p1.h, p2.y, p2.h)\n let result1: Point = {x: xPoints[0], y: yPoints[0]}\n let result2: Point = {x: xPoints[1], y: yPoints[1]}\n return [result1, result2];\n }\n\n // assumes that x1 is smaller than x2\n //works for width (careful with height, y axis is wrong way)\n static determineOverlapX(x1: number, w1: number, x2: number, w2: number): number[] {\n let x1right = x1+w1\n if (x1right >= x2) {\n //find end of overlap\n let x2right = x2+w2\n let end = Math.min(x1right, x2right)\n //overlap interval is [x2, end]\n let middle = (x2+end)/2\n return [middle, middle]\n } else return [x1right, x2]\n }\n\n\n static getPointsInOneDimension(x1: number, w1: number, x2: number, w2: number): number[] {\n //determine overlap (and then middle of it) or closest points in one dimension\n if (x1 < x2) {\n return this.determineOverlapX(x1, w1, x2, w2)\n } else {\n return this.determineOverlapX(x2, w2, x1, w1).reverse()\n }\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport {ArrowStyleConfiguration} from \"../models/arrow-style-configuration\";\n\n/*****\n default implementation\n You can extend this base case with an own service implementation.\n Make sure to configure DI to use your service instead of this one\n In 20205, the way to do so is to declare it as provider in app.config.ts or app.component.ts\n providers: [{ provide: ArrowStyleConfigurationService, useClass: YourServiceImplementation }],\n See https://angular.dev/guide/di/dependency-injection-providers\n ***/\n@Injectable({\n providedIn: 'root'\n})\nexport class ArrowStyleConfigurationService {\n\n constructor() { }\n\n styleArrow(arrowType?: string): ArrowStyleConfiguration {\n return {\n color: 'black',\n dashed: [0]\n };\n }\n}\n","import {Component, Input, OnChanges} from '@angular/core';\nimport {NgIf} from \"@angular/common\";\nimport {ArrowStyleConfigurationService} from \"../../../services/arrow-style-configuration.service\";\nimport {ArrowStyleConfiguration} from \"../../../models/arrow-style-configuration\";\nimport {v4 as uuidv4} from \"uuid\";\n\n@Component({\n selector: '[arrow-between-points]',\n imports: [\n NgIf\n ],\n templateUrl: './arrow-between-points.component.svg',\n styleUrl: './arrow-between-points.component.css'\n})\nexport class ArrowBetweenPointsComponent implements OnChanges {\n\n @Input() startX!: number;\n @Input() startY!: number;\n @Input() endX!: number;\n @Input() endY!: number;\n @Input() text?: string;\n @Input() style?: string;\n\n @Input() arrowType?: string;\n\n arrowStyleConfiguration: ArrowStyleConfiguration;\n id = uuidv4();\n\n constructor(\n private arrowStyleConfigService: ArrowStyleConfigurationService,) {\n\n this.arrowStyleConfiguration = this.arrowStyleConfigService.styleArrow()\n }\n\n ngOnChanges() {\n this.arrowStyleConfiguration = this.arrowStyleConfigService.styleArrow(this.arrowType)\n }\n\n}\n","<svg:g>\n <path [attr.id]=\"id+'-path'\"\n [attr.d]=\"'M '+startX+','+startY+' L '+endX+','+endY\"\n [attr.stroke]=\"arrowStyleConfiguration.color\"\n [attr.stroke-dasharray]=\"arrowStyleConfiguration.dashed\"\n [attr.marker-start]='\"url(#\"+arrowStyleConfiguration.startPointer+\")\"'\n [attr.marker-end]='\"url(#\"+arrowStyleConfiguration.endPointer+\")\"'\n style=\"{{style}}\">\n </path>\n <text *ngIf=\"text\">\n <textPath [attr.href]=\"'#'+id+'-path'\">\n {{text}}\n </textPath>\n </text>\n</svg:g>","import { AfterViewInit, ChangeDetectorRef, Component, Input, OnChanges,} from '@angular/core';\nimport { Point } from \"@angular/cdk/drag-drop\";\nimport {v4 as uuidv4} from \"uuid\";\nimport {BoundingBox} from \"../../../models/bounding-box\";\nimport {PathLayouter} from \"../../../utils/path-layouter\";\nimport {ArrowBetweenPointsComponent} from \"../arrow-between-points/arrow-between-points.component\";\n\n@Component({\n selector: '[arrow-between-boxes]',\n templateUrl: './arrow-between-boxes.component.svg',\n styleUrl: './arrow-between-boxes.component.css',\n standalone: true,\n imports: [ArrowBetweenPointsComponent]\n})\nexport class ArrowBetweenBoxesComponent implements OnChanges, AfterViewInit {\n @Input() start!: BoundingBox;\n @Input() end!: BoundingBox;\n @Input() arrowType?: string;\n @Input() text?: string;\n @Input() style?: string;\n\n\n x1: number = 0;\n y1: number = 0;\n x2: number = 5;\n y2: number = 5;\n\n id = uuidv4();\n\n positioned= false;\n\n constructor(\n private cdr: ChangeDetectorRef,\n ) {}\n\n ngAfterViewInit() {\n this.computePositions()\n this.positioned = true;\n this.cdr.detectChanges();\n }\n\n ngOnChanges() {\n if(this.positioned) {\n this.computePositions()\n }\n }\n\n\n private computePositions() {\n let res = PathLayouter.bestPoints(this.start, this.end);\n this.applyBestPoints(res)\n }\n\n private applyBestPoints(res: Point[]) {\n this.x1 = res[0].x;\n this.y1 = res[0].y;\n this.x2 = res[1].x;\n this.y2 = res[1].y;\n }\n\n}\n","<svg:g>\n <g arrow-between-points\n [startX]=\"x1\"\n [startY]=\"y1\"\n [endX]=\"x2\"\n [endY]=\"y2\"\n [text]=\"text\"\n [arrowType]=\"arrowType\"\n [style]=\"style\"\n >\n </g>\n</svg:g>\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Component, ElementRef,\n Input, OnChanges, OnDestroy,\n OnInit, SimpleChanges,\n ViewChild\n} from '@angular/core';\nimport {Observable, Subscription} from \"rxjs\";\nimport { NgIf } from '@angular/common';\nimport {BoundingBox} from \"../../../models/bounding-box\";\nimport {ArrowBetweenBoxesComponent} from \"../arrow-between-boxes/arrow-between-boxes.component\";\nimport {SVGAccessService} from \"../../../services/svg-access.service\";\n\n@Component({\n selector: '[arrowElems]',\n templateUrl: './arrow-between-elems.component.svg',\n styleUrl: './arrow-between-elems.component.css',\n standalone: true,\n imports: [NgIf, ArrowBetweenBoxesComponent]\n})\nexport class ArrowBetweenElemsComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy {\n\n @Input() startGID!: string;\n @Input() startSuffix!: string;\n @Input() endGID!: string;\n @Input() endSuffix!: string;\n @Input() arrowType?: string;\n\n @Input() breaks: BoundingBox[] = [];\n @Input() text?: string;\n @Input() style?: string; //todo move into ArrowStyleConfig?\n\n startId!: string;\n endId!: string;\n\n start?: BoundingBox;\n end?: BoundingBox;\n\n positioned= false;\n @ViewChild('arrow') node!: ElementRef<SVGGraphicsElement>;\n\n changeNotifier: Observable<string>;\n changeSubscription: Subscription;\n\n //idea: compute the two input positions as relative to the current elem\n constructor(\n private svgAccessService: SVGAccessService,\n private cdr: ChangeDetectorRef) {\n this.changeNotifier = this.svgAccessService.listenToPositionChange()\n this.changeSubscription = this.changeNotifier.subscribe(nextString => {\n if (nextString == this.startGID || nextString == this.endGID) {\n setTimeout(() => {\n this.computePositionsByIds()\n this.cdr.detectChanges()\n }, 0)\n }\n })\n }\n\n ngOnInit() {\n this.startId = this.startGID+this.startSuffix;\n this.endId = this.endGID+this.endSuffix;\n }\n\n ngOnChanges(_: SimpleChanges) {\n this.startId = this.startGID+this.startSuffix;\n this.endId = this.endGID+this.endSuffix;\n this.computePositionsByIds()\n this.cdr.detectChanges()\n }\n\n ngAfterViewInit() {\n this.positioned = true;\n this.computePositionsByIds()\n this.cdr.detectChanges()\n }\n\n private computePositionsByIds() {\n if (this.node?.nativeElement){\n let rel = this.node.nativeElement as SVGGraphicsElement\n let startOpt = this.svgAccessService.getRelativePosition(this.startId, rel)\n if (startOpt) {\n this.start = startOpt\n }\n let endOpt = this.svgAccessService.getRelativePosition(this.endId, rel)\n if (endOpt) {\n this.end = endOpt\n }\n } else console.log('No native element yet')\n }\n\n ngOnDestroy() {\n this.changeSubscription.unsubscribe();\n }\n\n}\n","<svg:g #arrow>\n <g arrow-between-boxes *ngIf=\"start && end\"\n [start]=\"start\"\n [end]=\"end\"\n [arrowType]=\"arrowType\"\n [text]=\"text\"\n [style]=\"style\">\n </g>\n></svg:g>\n","export class TextDistributor {\n\n private static determineHowManyChars(w: number): number {\n return Math.floor(w/7.6)\n }\n\n private static determineLines(h: number): number {\n return Math.floor(h/20)\n }\n\n // idea: distribute words over lines,\n // if a single word is too long for a line, cut it early enough to have three dots afterwards\n // if you need to indicate that there is more text after the last complete word, also use three dots, but after a break\n static distributeText(text: string, w: number, h: number): string[] {\n let distributedText: string[] = [];\n\n let broken = text?.split(' ')\n let maxLines = this.determineLines(h)\n if (maxLines <= 0) {\n console.error('Text area too low for text ' + text)\n distributedText = ['...']\n }\n for (let i = 0; i < maxLines; i++) {\n if (broken.length > 0) {\n distributedText[i] = this.takeNextLine(broken, w)\n }\n }\n // now deal with last line: here we need special care for adding ... if necessary\n if (broken.length > 0) {\n // we need to indicate that there is more text - this could be the 4 signs to many...\n distributedText[maxLines - 1] +=' ...'\n }\n return distributedText.filter(w => w != '')\n }\n\n // if a single word is too long for a line, cut it early enough to have three dots afterwards\n static limitSingleWord(word: string, w: number): string {\n let maxSize = this.determineHowManyChars(w)\n if (word.length > maxSize) {\n let ending = '...'\n // care for far too short width:\n if (maxSize <= 3) {\n return ending.substring(0, maxSize)\n } else {\n return word.substring(0, maxSize-3)+'...'\n }\n } else {\n return word\n }\n }\n\n // adapts input words array in place by removing all those that are taken into the result\n static takeNextLine(words: string[], w: number): string {\n if (words?.length > 0) {\n let res = this.limitSingleWord(words[0], w)\n let i = 1;\n let maxSize = this.determineHowManyChars(w)\n let testRes = res + ' ' + words[i]\n while (testRes.length <= maxSize && i < words.length-1) {\n res = testRes\n i++\n testRes = res + ' ' + words[i]\n }\n words.splice(0, i)\n return res;\n } else return ''\n }\n}\n","import {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { NgFor, NgIf } from '@angular/common';\nimport {TextDistributor} from \"../../utils/text-distributor\";\n\n@Component({\n selector: '[text-area-svg]',\n templateUrl: './text-area-svg.component.svg',\n styleUrl: './text-area-svg.component.css',\n imports: [NgFor, NgIf, FormsModule]\n})\nexport class TextAreaSvgComponent implements OnChanges {\n /*\n a fixed size svg. If the text exceeds the possible size, we will do a ... for now\n */\n\n @Input() text!: string\n @Input() x!: number\n @Input() y!: number\n @Input() w!: number\n @Input() h!: number\n @Input() singleEdit: boolean = false\n @Output() textChange = new EventEmitter<string>();\n //only with singleEdit since that opens an overlay where one can change the text in place\n\n distributedText: string[] = []\n isActive: boolean = false;\n\n\n ngOnChanges() {\n this.distributeText();\n }\n\n handleClick() {\n if(this.singleEdit) {\n this.isActive = true\n }\n }\n\n leaveTextInput() {\n this.textChange.emit(this.text)\n this.isActive = false;\n }\n\n distributeText(){\n this.distributedText = TextDistributor.distributeText(\n this.text, this.w, this.h\n )\n }\n\n}\n","<svg:text [attr.x]=\"x\" [attr.y]=\"y\" [attr.width]=\"w\" [attr.height]=\"h\" dy=\"0\" [attr.style]=\"\" (click)=\"handleClick()\">\n <tspan dy=\"1.2em\" [attr.x]=\"x\" *ngFor=\"let line of distributedText\">{{line}}</tspan>\n</svg:text>\n<svg:foreignObject *ngIf=\"isActive\" [attr.x]=\"x\" [attr.y]=\"y\" [attr.width]=\"w\" [attr.height]=\"h\">\n <input id=\"text-area\" type=\"text\" [(ngModel)]=\"this.text\" (focusout)=\"leaveTextInput()\"/>\n</svg:foreignObject>\n","/*\n * Public API Surface of arrows\n */\n\nexport * from './lib/models/dragger'\nexport * from './lib/components/draggable/draggable.component';\nexport * from './lib/components/arrows/arrow-between-elems/arrow-between-elems.component';\nexport * from './lib/components/arrows/arrow-between-boxes/arrow-between-boxes.component';\nexport * from './lib/components/arrows/arrow-between-points/arrow-between-points.component';\nexport * from './lib/components/text-area-svg/text-area-svg.component';\nexport * from './lib/services/arrow-style-configuration.service';\nexport * from './lib/services/svg-access.service';\nexport * from './lib/utils/position-helper';\nexport * from './lib/utils/path-layouter';\nexport * from './lib/utils/text-distributor';\n\nexport type {BoundingBox} from './lib/models/bounding-box';\nexport type {ArrowStyleConfiguration} from './lib/models/arrow-style-configuration';\nexport type {Identifiable} from './lib/models/identifiable'; //gId: string - soft connection to Referencable\nexport type {Positionable, Draggable} from './lib/models/positionable';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SVGAccessService","uuidv4","i1.ArrowStyleConfigurationService"],"mappings":";;;;;;;;MAEa,OAAO,CAAA;AAQE,IAAA,OAAA;AAPpB,IAAA,IAAI;IAEJ,UAAU,GAAG,KAAK;IAClB,gBAAgB,GAAG,KAAK;IACxB,UAAU,GAAW,CAAC;IACtB,UAAU,GAAW,CAAC;AAEtB,IAAA,WAAA,CAAoB,OAAU,EAAA;QAAV,IAAO,CAAA,OAAA,GAAP,OAAO;AACzB,QAAA,IAAI,CAAC,IAAI,GAAG,OAAO;;AAGrB,IAA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