@plait/core 0.24.0-next.1 → 0.24.0-next.3
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/board/board.component.d.ts +1 -1
- package/core/children/children.component.d.ts +1 -1
- package/core/element/element.component.d.ts +1 -1
- package/core/element/plugin-element.d.ts +1 -1
- package/core/island/island-base.component.d.ts +1 -1
- package/{esm2020 → esm2022}/board/board.component.mjs +6 -6
- package/{esm2020 → esm2022}/core/children/children.component.mjs +6 -6
- package/{esm2020 → esm2022}/core/element/element.component.mjs +4 -4
- package/{esm2020 → esm2022}/core/element/plugin-element.mjs +4 -4
- package/{esm2020 → esm2022}/core/island/island-base.component.mjs +7 -7
- package/esm2022/interfaces/rectangle-client.mjs +56 -0
- package/{esm2020 → esm2022}/plait.module.mjs +5 -5
- package/esm2022/plugins/with-moving.mjs +98 -0
- package/{esm2020 → esm2022}/services/image-context.service.mjs +4 -4
- package/esm2022/utils/dom/common.mjs +68 -0
- package/esm2022/utils/element.mjs +53 -0
- package/esm2022/utils/math.mjs +128 -0
- package/{fesm2020 → fesm2022}/plait-core.mjs +199 -80
- package/fesm2022/plait-core.mjs.map +1 -0
- package/interfaces/rectangle-client.d.ts +2 -0
- package/package.json +14 -14
- package/utils/dom/common.d.ts +4 -0
- package/utils/element.d.ts +1 -0
- package/utils/math.d.ts +6 -0
- package/esm2020/interfaces/rectangle-client.mjs +0 -40
- package/esm2020/plugins/with-moving.mjs +0 -97
- package/esm2020/utils/dom/common.mjs +0 -53
- package/esm2020/utils/element.mjs +0 -44
- package/esm2020/utils/math.mjs +0 -48
- package/fesm2015/plait-core.mjs +0 -3454
- package/fesm2015/plait-core.mjs.map +0 -1
- package/fesm2020/plait-core.mjs.map +0 -1
- /package/{esm2020 → esm2022}/board/board.component.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/constants/index.mjs +0 -0
- /package/{esm2020 → esm2022}/constants/keycodes.mjs +0 -0
- /package/{esm2020 → esm2022}/constants/resize.mjs +0 -0
- /package/{esm2020 → esm2022}/constants/selection.mjs +0 -0
- /package/{esm2020 → esm2022}/core/children/effect.mjs +0 -0
- /package/{esm2020 → esm2022}/core/element/context-change.mjs +0 -0
- /package/{esm2020 → esm2022}/core/element/context.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/board.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/custom-types.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/element.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/history.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/index.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/node.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/operation.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/path-ref.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/path.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/plugin-key.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/plugin.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/point.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/pointer.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/selection.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/theme.mjs +0 -0
- /package/{esm2020 → esm2022}/interfaces/viewport.mjs +0 -0
- /package/{esm2020 → esm2022}/plait-core.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/create-board.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-board.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-hand.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-history.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-hotkey.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-options.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-selection.mjs +0 -0
- /package/{esm2020 → esm2022}/plugins/with-viewport.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/core/create-board.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/core/fake-weak-map.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/core/index.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/fake-events/event-objects.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/fake-events/index.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/index.mjs +0 -0
- /package/{esm2020 → esm2022}/testing/test-element.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/board.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/general.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/index.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/node.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/selection.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/theme.mjs +0 -0
- /package/{esm2020 → esm2022}/transforms/viewport.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/board.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/clipboard.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/common.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/dom/environment.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/dom/foreign.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/dom/index.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/draw/arrow.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/draw/circle.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/draw/line.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/draw/rectangle.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/environment.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/helper.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/history.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/hotkeys.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/id-creator.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/index.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/moving-element.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/selected-element.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/to-image.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/touch.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/tree.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/viewport.mjs +0 -0
- /package/{esm2020 → esm2022}/utils/weak-maps.mjs +0 -0
|
@@ -96,6 +96,15 @@ function getRectangleByElements(board, elements, recursion) {
|
|
|
96
96
|
function getBoardRectangle(board) {
|
|
97
97
|
return getRectangleByElements(board, board.children, true);
|
|
98
98
|
}
|
|
99
|
+
function getElementById(board, id) {
|
|
100
|
+
let element = null;
|
|
101
|
+
depthFirstRecursion(board, node => {
|
|
102
|
+
if (id === node.id) {
|
|
103
|
+
element = node;
|
|
104
|
+
}
|
|
105
|
+
}, getIsRecursionFunc(board), true);
|
|
106
|
+
return element;
|
|
107
|
+
}
|
|
99
108
|
|
|
100
109
|
var ThemeColorMode;
|
|
101
110
|
(function (ThemeColorMode) {
|
|
@@ -145,6 +154,62 @@ const ThemeColors = [
|
|
|
145
154
|
StarryThemeColor
|
|
146
155
|
];
|
|
147
156
|
|
|
157
|
+
const RectangleClient = {
|
|
158
|
+
isHit: (origin, target) => {
|
|
159
|
+
const minX = origin.x < target.x ? origin.x : target.x;
|
|
160
|
+
const maxX = origin.x + origin.width > target.x + target.width ? origin.x + origin.width : target.x + target.width;
|
|
161
|
+
const minY = origin.y < target.y ? origin.y : target.y;
|
|
162
|
+
const maxY = origin.y + origin.height > target.y + target.height ? origin.y + origin.height : target.y + target.height;
|
|
163
|
+
// float calculate error( eg: 1.4210854715202004e-14 > 0)
|
|
164
|
+
if (Math.floor(maxX - minX - origin.width - target.width) <= 0 && Math.floor(maxY - minY - origin.height - target.height) <= 0) {
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
toRectangleClient: (points) => {
|
|
172
|
+
const xArray = points.map(ele => ele[0]);
|
|
173
|
+
const yArray = points.map(ele => ele[1]);
|
|
174
|
+
const xMin = Math.min(...xArray);
|
|
175
|
+
const xMax = Math.max(...xArray);
|
|
176
|
+
const yMin = Math.min(...yArray);
|
|
177
|
+
const yMax = Math.max(...yArray);
|
|
178
|
+
const rect = { x: xMin, y: yMin, width: xMax - xMin, height: yMax - yMin };
|
|
179
|
+
return rect;
|
|
180
|
+
},
|
|
181
|
+
getOutlineRectangle: (rectangle, offset) => {
|
|
182
|
+
return {
|
|
183
|
+
x: rectangle.x + offset,
|
|
184
|
+
y: rectangle.y + offset,
|
|
185
|
+
width: rectangle.width - offset * 2,
|
|
186
|
+
height: rectangle.height - offset * 2
|
|
187
|
+
};
|
|
188
|
+
},
|
|
189
|
+
isEqual: (rectangle, otherRectangle) => {
|
|
190
|
+
return (rectangle.x === otherRectangle.x &&
|
|
191
|
+
rectangle.y === otherRectangle.y &&
|
|
192
|
+
rectangle.width === otherRectangle.width &&
|
|
193
|
+
rectangle.height === otherRectangle.height);
|
|
194
|
+
},
|
|
195
|
+
getCornerPoints: (rectangle) => {
|
|
196
|
+
return [
|
|
197
|
+
[rectangle.x, rectangle.y],
|
|
198
|
+
[rectangle.x + rectangle.width, rectangle.y],
|
|
199
|
+
[rectangle.x + rectangle.width, rectangle.y + rectangle.height],
|
|
200
|
+
[rectangle.x, rectangle.y + rectangle.height]
|
|
201
|
+
];
|
|
202
|
+
},
|
|
203
|
+
getEdgeCenterPoints: (rectangle) => {
|
|
204
|
+
return [
|
|
205
|
+
[rectangle.x + rectangle.width / 2, rectangle.y],
|
|
206
|
+
[rectangle.x + rectangle.width, rectangle.y + rectangle.height / 2],
|
|
207
|
+
[rectangle.x + rectangle.width / 2, rectangle.y + rectangle.height],
|
|
208
|
+
[rectangle.x, rectangle.y + rectangle.height / 2]
|
|
209
|
+
];
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
|
|
148
213
|
// https://stackoverflow.com/a/6853926/232122
|
|
149
214
|
function distanceBetweenPointAndSegment(x, y, x1, y1, x2, y2) {
|
|
150
215
|
const A = x - x1;
|
|
@@ -175,6 +240,62 @@ function distanceBetweenPointAndSegment(x, y, x1, y1, x2, y2) {
|
|
|
175
240
|
const dy = y - yy;
|
|
176
241
|
return Math.hypot(dx, dy);
|
|
177
242
|
}
|
|
243
|
+
function getNearestPointBetweenPointAndSegment(point, linePoints) {
|
|
244
|
+
const x = point[0], y = point[1], x1 = linePoints[0][0], y1 = linePoints[0][1], x2 = linePoints[1][0], y2 = linePoints[1][1];
|
|
245
|
+
const A = x - x1;
|
|
246
|
+
const B = y - y1;
|
|
247
|
+
const C = x2 - x1;
|
|
248
|
+
const D = y2 - y1;
|
|
249
|
+
const dot = A * C + B * D;
|
|
250
|
+
const lenSquare = C * C + D * D;
|
|
251
|
+
let param = -1;
|
|
252
|
+
if (lenSquare !== 0) {
|
|
253
|
+
// in case of 0 length line
|
|
254
|
+
param = dot / lenSquare;
|
|
255
|
+
}
|
|
256
|
+
let xx, yy;
|
|
257
|
+
if (param < 0) {
|
|
258
|
+
xx = x1;
|
|
259
|
+
yy = y1;
|
|
260
|
+
}
|
|
261
|
+
else if (param > 1) {
|
|
262
|
+
xx = x2;
|
|
263
|
+
yy = y2;
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
xx = x1 + param * C;
|
|
267
|
+
yy = y1 + param * D;
|
|
268
|
+
}
|
|
269
|
+
return [xx, yy];
|
|
270
|
+
}
|
|
271
|
+
function distanceBetweenPointAndSegments(points, point) {
|
|
272
|
+
const len = points.length;
|
|
273
|
+
let distance = Infinity;
|
|
274
|
+
for (let i = 0; i < len - 1; i++) {
|
|
275
|
+
const p = points[i];
|
|
276
|
+
const p2 = points[i + 1];
|
|
277
|
+
const currentDistance = distanceBetweenPointAndSegment(point[0], point[1], p[0], p[1], p2[0], p2[1]);
|
|
278
|
+
if (currentDistance < distance) {
|
|
279
|
+
distance = currentDistance;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return distance;
|
|
283
|
+
}
|
|
284
|
+
function getNearestPointBetweenPointAndSegments(point, points) {
|
|
285
|
+
const len = points.length;
|
|
286
|
+
let distance = Infinity;
|
|
287
|
+
let result = point;
|
|
288
|
+
for (let i = 0; i < len; i++) {
|
|
289
|
+
const p = points[i];
|
|
290
|
+
const p2 = i === len - 1 ? points[0] : points[i + 1];
|
|
291
|
+
const currentDistance = distanceBetweenPointAndSegment(point[0], point[1], p[0], p[1], p2[0], p2[1]);
|
|
292
|
+
if (currentDistance < distance) {
|
|
293
|
+
distance = currentDistance;
|
|
294
|
+
result = getNearestPointBetweenPointAndSegment(point, [p, p2]);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return result;
|
|
298
|
+
}
|
|
178
299
|
function rotate(x1, y1, x2, y2, angle) {
|
|
179
300
|
// 𝑎′𝑥=(𝑎𝑥−𝑐𝑥)cos𝜃−(𝑎𝑦−𝑐𝑦)sin𝜃+𝑐𝑥
|
|
180
301
|
// 𝑎′𝑦=(𝑎𝑥−𝑐𝑥)sin𝜃+(𝑎𝑦−𝑐𝑦)cos𝜃+𝑐𝑦.
|
|
@@ -192,6 +313,29 @@ function distanceBetweenPointAndRectangle(x, y, rect) {
|
|
|
192
313
|
var dy = Math.max(rect.y - y, 0, y - (rect.y + rect.height));
|
|
193
314
|
return Math.sqrt(dx * dx + dy * dy);
|
|
194
315
|
}
|
|
316
|
+
const isLineHitLine = (a, b, c, d) => {
|
|
317
|
+
const crossProduct = (v1, v2) => v1[0] * v2[1] - v1[1] * v2[0];
|
|
318
|
+
const ab = [b[0] - a[0], b[1] - a[1]];
|
|
319
|
+
const ac = [c[0] - a[0], c[1] - a[1]];
|
|
320
|
+
const ad = [d[0] - a[0], d[1] - a[1]];
|
|
321
|
+
const ca = [a[0] - c[0], a[1] - c[1]];
|
|
322
|
+
const cb = [b[0] - c[0], b[1] - c[1]];
|
|
323
|
+
const cd = [d[0] - c[0], d[1] - c[1]];
|
|
324
|
+
return crossProduct(ab, ac) * crossProduct(ab, ad) <= 0 && crossProduct(cd, ca) * crossProduct(cd, cb) <= 0;
|
|
325
|
+
};
|
|
326
|
+
const isPolylineHitRectangle = (points, rectangle) => {
|
|
327
|
+
const rectanglePoints = RectangleClient.getCornerPoints(rectangle);
|
|
328
|
+
for (let i = 1; i < points.length; i++) {
|
|
329
|
+
const isIntersect = isLineHitLine(points[i], points[i - 1], rectanglePoints[0], rectanglePoints[1]) ||
|
|
330
|
+
isLineHitLine(points[i], points[i - 1], rectanglePoints[1], rectanglePoints[2]) ||
|
|
331
|
+
isLineHitLine(points[i], points[i - 1], rectanglePoints[2], rectanglePoints[3]) ||
|
|
332
|
+
isLineHitLine(points[i], points[i - 1], rectanglePoints[3], rectanglePoints[0]);
|
|
333
|
+
if (isIntersect) {
|
|
334
|
+
return true;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
return false;
|
|
338
|
+
};
|
|
195
339
|
|
|
196
340
|
const PlaitBoard = {
|
|
197
341
|
isBoard(value) {
|
|
@@ -898,6 +1042,21 @@ function createPath() {
|
|
|
898
1042
|
const newG = document.createElementNS(NS, 'path');
|
|
899
1043
|
return newG;
|
|
900
1044
|
}
|
|
1045
|
+
function createRect(rectangle, options) {
|
|
1046
|
+
const rect = document.createElementNS(NS, 'rect');
|
|
1047
|
+
rect.setAttribute('x', `${rectangle.x}`);
|
|
1048
|
+
rect.setAttribute('y', `${rectangle.y}`);
|
|
1049
|
+
rect.setAttribute('width', `${rectangle.width}`);
|
|
1050
|
+
rect.setAttribute('height', `${rectangle.height}`);
|
|
1051
|
+
for (let key in options) {
|
|
1052
|
+
const optionKey = key;
|
|
1053
|
+
rect.setAttribute(key, `${options[optionKey]}`);
|
|
1054
|
+
}
|
|
1055
|
+
return rect;
|
|
1056
|
+
}
|
|
1057
|
+
function createMask() {
|
|
1058
|
+
return document.createElementNS(NS, 'mask');
|
|
1059
|
+
}
|
|
901
1060
|
function createSVG() {
|
|
902
1061
|
const svg = document.createElementNS(NS, 'svg');
|
|
903
1062
|
return svg;
|
|
@@ -1087,10 +1246,10 @@ class PlaitPluginElementComponent {
|
|
|
1087
1246
|
removeSelectedElement(this.board, this.element);
|
|
1088
1247
|
(this.rootG || this.g).remove();
|
|
1089
1248
|
}
|
|
1249
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitPluginElementComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1250
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.3", type: PlaitPluginElementComponent, inputs: { context: "context" }, ngImport: i0 }); }
|
|
1090
1251
|
}
|
|
1091
|
-
|
|
1092
|
-
PlaitPluginElementComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: PlaitPluginElementComponent, inputs: { context: "context" }, ngImport: i0 });
|
|
1093
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitPluginElementComponent, decorators: [{
|
|
1252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitPluginElementComponent, decorators: [{
|
|
1094
1253
|
type: Directive
|
|
1095
1254
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { context: [{
|
|
1096
1255
|
type: Input
|
|
@@ -1638,46 +1797,6 @@ const PlaitElement = {
|
|
|
1638
1797
|
}
|
|
1639
1798
|
};
|
|
1640
1799
|
|
|
1641
|
-
const RectangleClient = {
|
|
1642
|
-
isHit: (origin, target) => {
|
|
1643
|
-
const minX = origin.x < target.x ? origin.x : target.x;
|
|
1644
|
-
const maxX = origin.x + origin.width > target.x + target.width ? origin.x + origin.width : target.x + target.width;
|
|
1645
|
-
const minY = origin.y < target.y ? origin.y : target.y;
|
|
1646
|
-
const maxY = origin.y + origin.height > target.y + target.height ? origin.y + origin.height : target.y + target.height;
|
|
1647
|
-
// float calculate error( eg: 1.4210854715202004e-14 > 0)
|
|
1648
|
-
if (Math.floor(maxX - minX - origin.width - target.width) <= 0 && Math.floor(maxY - minY - origin.height - target.height) <= 0) {
|
|
1649
|
-
return true;
|
|
1650
|
-
}
|
|
1651
|
-
else {
|
|
1652
|
-
return false;
|
|
1653
|
-
}
|
|
1654
|
-
},
|
|
1655
|
-
toRectangleClient: (points) => {
|
|
1656
|
-
const xArray = points.map(ele => ele[0]);
|
|
1657
|
-
const yArray = points.map(ele => ele[1]);
|
|
1658
|
-
const xMin = Math.min(...xArray);
|
|
1659
|
-
const xMax = Math.max(...xArray);
|
|
1660
|
-
const yMin = Math.min(...yArray);
|
|
1661
|
-
const yMax = Math.max(...yArray);
|
|
1662
|
-
const rect = { x: xMin, y: yMin, width: xMax - xMin, height: yMax - yMin };
|
|
1663
|
-
return rect;
|
|
1664
|
-
},
|
|
1665
|
-
getOutlineRectangle: (rectangle, offset) => {
|
|
1666
|
-
return {
|
|
1667
|
-
x: rectangle.x + offset,
|
|
1668
|
-
y: rectangle.y + offset,
|
|
1669
|
-
width: rectangle.width + Math.abs(offset) * 2,
|
|
1670
|
-
height: rectangle.height + Math.abs(offset) * 2
|
|
1671
|
-
};
|
|
1672
|
-
},
|
|
1673
|
-
isEqual: (rectangle, otherRectangle) => {
|
|
1674
|
-
return (rectangle.x === otherRectangle.x &&
|
|
1675
|
-
rectangle.y === otherRectangle.y &&
|
|
1676
|
-
rectangle.width === otherRectangle.width &&
|
|
1677
|
-
rectangle.height === otherRectangle.height);
|
|
1678
|
-
}
|
|
1679
|
-
};
|
|
1680
|
-
|
|
1681
1800
|
const isSetViewportOperation = (value) => {
|
|
1682
1801
|
return value.type === 'set_viewport';
|
|
1683
1802
|
};
|
|
@@ -2520,18 +2639,18 @@ function withViewport(board) {
|
|
|
2520
2639
|
}
|
|
2521
2640
|
|
|
2522
2641
|
function withMoving(board) {
|
|
2523
|
-
const {
|
|
2642
|
+
const { pointerDown, pointerMove, globalPointerUp, globalPointerMove } = board;
|
|
2524
2643
|
let offsetX = 0;
|
|
2525
2644
|
let offsetY = 0;
|
|
2526
2645
|
let isPreventDefault = false;
|
|
2527
2646
|
let startPoint;
|
|
2528
2647
|
let activeElements = [];
|
|
2529
|
-
board.
|
|
2648
|
+
board.pointerDown = (event) => {
|
|
2530
2649
|
const host = BOARD_TO_HOST.get(board);
|
|
2531
2650
|
const point = transformPoint(board, toPoint(event.x, event.y, host));
|
|
2532
2651
|
const range = { anchor: point, focus: point };
|
|
2533
2652
|
let movableElements = board.children.filter(item => board.isMovable(item));
|
|
2534
|
-
if (movableElements.length) {
|
|
2653
|
+
if (movableElements.length && !isPreventTouchMove(board)) {
|
|
2535
2654
|
startPoint = point;
|
|
2536
2655
|
const selectedRootElements = getSelectedElements(board).filter(item => movableElements.includes(item));
|
|
2537
2656
|
const hitElement = getHitElementOfRoot(board, movableElements, range);
|
|
@@ -2542,9 +2661,9 @@ function withMoving(board) {
|
|
|
2542
2661
|
activeElements = [hitElement];
|
|
2543
2662
|
}
|
|
2544
2663
|
}
|
|
2545
|
-
|
|
2664
|
+
pointerDown(event);
|
|
2546
2665
|
};
|
|
2547
|
-
board.
|
|
2666
|
+
board.pointerMove = (event) => {
|
|
2548
2667
|
if (startPoint && activeElements.length && !PlaitBoard.hasBeenTextEditing(board)) {
|
|
2549
2668
|
if (!isPreventDefault) {
|
|
2550
2669
|
isPreventDefault = true;
|
|
@@ -2576,23 +2695,23 @@ function withMoving(board) {
|
|
|
2576
2695
|
// 阻止 move 过程中触发画布滚动行为
|
|
2577
2696
|
event.preventDefault();
|
|
2578
2697
|
}
|
|
2579
|
-
|
|
2698
|
+
pointerMove(event);
|
|
2580
2699
|
};
|
|
2581
|
-
board.
|
|
2700
|
+
board.globalPointerMove = (event) => {
|
|
2582
2701
|
if (startPoint) {
|
|
2583
2702
|
const inPlaitBoardElement = isInPlaitBoard(board, event.x, event.y);
|
|
2584
2703
|
if (!inPlaitBoardElement) {
|
|
2585
2704
|
cancelMove(board);
|
|
2586
2705
|
}
|
|
2587
2706
|
}
|
|
2588
|
-
|
|
2707
|
+
globalPointerMove(event);
|
|
2589
2708
|
};
|
|
2590
|
-
board.
|
|
2709
|
+
board.globalPointerUp = event => {
|
|
2591
2710
|
isPreventDefault = false;
|
|
2592
2711
|
if (startPoint) {
|
|
2593
2712
|
cancelMove(board);
|
|
2594
2713
|
}
|
|
2595
|
-
|
|
2714
|
+
globalPointerUp(event);
|
|
2596
2715
|
};
|
|
2597
2716
|
function cancelMove(board) {
|
|
2598
2717
|
startPoint = null;
|
|
@@ -2630,10 +2749,10 @@ class PlaitIslandBaseComponent {
|
|
|
2630
2749
|
markForCheck() {
|
|
2631
2750
|
this.cdr.markForCheck();
|
|
2632
2751
|
}
|
|
2752
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitIslandBaseComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2753
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.3", type: PlaitIslandBaseComponent, host: { classAttribute: "plait-island-container" }, ngImport: i0 }); }
|
|
2633
2754
|
}
|
|
2634
|
-
|
|
2635
|
-
PlaitIslandBaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: PlaitIslandBaseComponent, host: { classAttribute: "plait-island-container" }, ngImport: i0 });
|
|
2636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitIslandBaseComponent, decorators: [{
|
|
2755
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitIslandBaseComponent, decorators: [{
|
|
2637
2756
|
type: Directive,
|
|
2638
2757
|
args: [{
|
|
2639
2758
|
host: {
|
|
@@ -2664,10 +2783,10 @@ class PlaitIslandPopoverBaseComponent {
|
|
|
2664
2783
|
this.board.onChange = this.onChange;
|
|
2665
2784
|
this.islandOnDestroy();
|
|
2666
2785
|
}
|
|
2786
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitIslandPopoverBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2787
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.3", type: PlaitIslandPopoverBaseComponent, inputs: { board: "board" }, host: { classAttribute: "plait-island-popover-container" }, ngImport: i0 }); }
|
|
2667
2788
|
}
|
|
2668
|
-
|
|
2669
|
-
PlaitIslandPopoverBaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.5", type: PlaitIslandPopoverBaseComponent, inputs: { board: "board" }, host: { classAttribute: "plait-island-popover-container" }, ngImport: i0 });
|
|
2670
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitIslandPopoverBaseComponent, decorators: [{
|
|
2789
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitIslandPopoverBaseComponent, decorators: [{
|
|
2671
2790
|
type: Directive,
|
|
2672
2791
|
args: [{
|
|
2673
2792
|
host: {
|
|
@@ -2752,10 +2871,10 @@ class PlaitContextService {
|
|
|
2752
2871
|
removeUploadingFile(fileEntry) {
|
|
2753
2872
|
this.uploadingFiles = this.uploadingFiles.filter(file => file.url !== fileEntry.url);
|
|
2754
2873
|
}
|
|
2874
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitContextService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2875
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitContextService }); }
|
|
2755
2876
|
}
|
|
2756
|
-
|
|
2757
|
-
PlaitContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitContextService });
|
|
2758
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitContextService, decorators: [{
|
|
2877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitContextService, decorators: [{
|
|
2759
2878
|
type: Injectable
|
|
2760
2879
|
}] });
|
|
2761
2880
|
|
|
@@ -2832,10 +2951,10 @@ class PlaitElementComponent {
|
|
|
2832
2951
|
ngOnDestroy() {
|
|
2833
2952
|
this.board.destroyElement(this.getContext());
|
|
2834
2953
|
}
|
|
2954
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitElementComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2955
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.3", type: PlaitElementComponent, selector: "plait-element", inputs: { index: "index", element: "element", parent: "parent", board: "board", effect: "effect", parentG: "parentG" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2835
2956
|
}
|
|
2836
|
-
|
|
2837
|
-
PlaitElementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: PlaitElementComponent, selector: "plait-element", inputs: { index: "index", element: "element", parent: "parent", board: "board", effect: "effect", parentG: "parentG" }, usesOnChanges: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2838
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitElementComponent, decorators: [{
|
|
2957
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitElementComponent, decorators: [{
|
|
2839
2958
|
type: Component,
|
|
2840
2959
|
args: [{
|
|
2841
2960
|
selector: 'plait-element',
|
|
@@ -2870,9 +2989,8 @@ class PlaitChildrenElement {
|
|
|
2870
2989
|
this.parentG = PlaitBoard.getElementHost(this.board);
|
|
2871
2990
|
}
|
|
2872
2991
|
}
|
|
2873
|
-
}
|
|
2874
|
-
|
|
2875
|
-
PlaitChildrenElement.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: PlaitChildrenElement, selector: "plait-children", inputs: { board: "board", parent: "parent", effect: "effect", parentG: "parentG" }, ngImport: i0, template: `
|
|
2992
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitChildrenElement, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2993
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.3", type: PlaitChildrenElement, selector: "plait-children", inputs: { board: "board", parent: "parent", effect: "effect", parentG: "parentG" }, ngImport: i0, template: `
|
|
2876
2994
|
<plait-element
|
|
2877
2995
|
*ngFor="let item of parent.children; let index = index; trackBy: trackBy"
|
|
2878
2996
|
[index]="index"
|
|
@@ -2882,8 +3000,9 @@ PlaitChildrenElement.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", v
|
|
|
2882
3000
|
[effect]="effect"
|
|
2883
3001
|
[parentG]="parentG"
|
|
2884
3002
|
></plait-element>
|
|
2885
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PlaitElementComponent, selector: "plait-element", inputs: ["index", "element", "parent", "board", "effect", "parentG"] }] });
|
|
2886
|
-
|
|
3003
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: PlaitElementComponent, selector: "plait-element", inputs: ["index", "element", "parent", "board", "effect", "parentG"] }] }); }
|
|
3004
|
+
}
|
|
3005
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitChildrenElement, decorators: [{
|
|
2887
3006
|
type: Component,
|
|
2888
3007
|
args: [{
|
|
2889
3008
|
selector: 'plait-children',
|
|
@@ -3222,9 +3341,8 @@ class PlaitBoardComponent {
|
|
|
3222
3341
|
this.updateIslands();
|
|
3223
3342
|
});
|
|
3224
3343
|
}
|
|
3225
|
-
}
|
|
3226
|
-
|
|
3227
|
-
PlaitBoardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.5", type: PlaitBoardComponent, selector: "plait-board", inputs: { plaitValue: "plaitValue", plaitViewport: "plaitViewport", plaitPlugins: "plaitPlugins", plaitOptions: "plaitOptions", plaitTheme: "plaitTheme" }, outputs: { plaitChange: "plaitChange", plaitBoardInitialized: "plaitBoardInitialized" }, host: { properties: { "class": "this.hostClass", "class.readonly": "this.readonly", "class.focused": "this.isFocused", "class.disabled-scroll": "this.disabledScrollOnNonFocus" } }, providers: [PlaitContextService], queries: [{ propertyName: "islands", predicate: PlaitIslandBaseComponent, descendants: true }], viewQueries: [{ propertyName: "svg", first: true, predicate: ["svg"], descendants: true, static: true }, { propertyName: "viewportContainer", first: true, predicate: ["viewportContainer"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
3344
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitBoardComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3345
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.3", type: PlaitBoardComponent, selector: "plait-board", inputs: { plaitValue: "plaitValue", plaitViewport: "plaitViewport", plaitPlugins: "plaitPlugins", plaitOptions: "plaitOptions", plaitTheme: "plaitTheme" }, outputs: { plaitChange: "plaitChange", plaitBoardInitialized: "plaitBoardInitialized" }, host: { properties: { "class": "this.hostClass", "class.readonly": "this.readonly", "class.focused": "this.isFocused", "class.disabled-scroll": "this.disabledScrollOnNonFocus" } }, providers: [PlaitContextService], queries: [{ propertyName: "islands", predicate: PlaitIslandBaseComponent, descendants: true }], viewQueries: [{ propertyName: "svg", first: true, predicate: ["svg"], descendants: true, static: true }, { propertyName: "viewportContainer", first: true, predicate: ["viewportContainer"], descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
3228
3346
|
<div class="viewport-container" #viewportContainer>
|
|
3229
3347
|
<svg #svg width="100%" height="100%" style="position: relative;" class="board-host-svg">
|
|
3230
3348
|
<g class="element-host"></g>
|
|
@@ -3234,8 +3352,9 @@ PlaitBoardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", ve
|
|
|
3234
3352
|
<plait-children [board]="board" [effect]="effect"></plait-children>
|
|
3235
3353
|
</div>
|
|
3236
3354
|
<ng-content></ng-content>
|
|
3237
|
-
`, isInline: true, dependencies: [{ kind: "component", type: PlaitChildrenElement, selector: "plait-children", inputs: ["board", "parent", "effect", "parentG"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3238
|
-
|
|
3355
|
+
`, isInline: true, dependencies: [{ kind: "component", type: PlaitChildrenElement, selector: "plait-children", inputs: ["board", "parent", "effect", "parentG"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3356
|
+
}
|
|
3357
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitBoardComponent, decorators: [{
|
|
3239
3358
|
type: Component,
|
|
3240
3359
|
args: [{
|
|
3241
3360
|
selector: 'plait-board',
|
|
@@ -3292,11 +3411,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImpor
|
|
|
3292
3411
|
|
|
3293
3412
|
const COMPONENTS = [PlaitBoardComponent, PlaitChildrenElement, PlaitElementComponent];
|
|
3294
3413
|
class PlaitModule {
|
|
3414
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3415
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.3", ngImport: i0, type: PlaitModule, declarations: [PlaitBoardComponent, PlaitChildrenElement, PlaitElementComponent], imports: [CommonModule], exports: [PlaitBoardComponent, PlaitChildrenElement, PlaitElementComponent] }); }
|
|
3416
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitModule, imports: [CommonModule] }); }
|
|
3295
3417
|
}
|
|
3296
|
-
|
|
3297
|
-
PlaitModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.5", ngImport: i0, type: PlaitModule, declarations: [PlaitBoardComponent, PlaitChildrenElement, PlaitElementComponent], imports: [CommonModule], exports: [PlaitBoardComponent, PlaitChildrenElement, PlaitElementComponent] });
|
|
3298
|
-
PlaitModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitModule, imports: [CommonModule] });
|
|
3299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.5", ngImport: i0, type: PlaitModule, decorators: [{
|
|
3418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: PlaitModule, decorators: [{
|
|
3300
3419
|
type: NgModule,
|
|
3301
3420
|
args: [{
|
|
3302
3421
|
declarations: [...COMPONENTS],
|
|
@@ -3473,5 +3592,5 @@ function createModModifierKeys() {
|
|
|
3473
3592
|
* Generated bundle index. Do not edit.
|
|
3474
3593
|
*/
|
|
3475
3594
|
|
|
3476
|
-
export { A, ALT, APOSTROPHE, ATTACHED_ELEMENT_CLASS_NAME, AT_SIGN, B, BACKSLASH, BACKSPACE, BOARD_TO_COMPONENT, BOARD_TO_ELEMENT_HOST, BOARD_TO_HOST, BOARD_TO_IS_SELECTION_MOVING, BOARD_TO_MOVING_ELEMENT, BOARD_TO_MOVING_POINT, BOARD_TO_MOVING_POINT_IN_BOARD, BOARD_TO_ON_CHANGE, BOARD_TO_ROUGH_SVG, BOARD_TO_SELECTED_ELEMENT, BOARD_TO_TEMPORARY_ELEMENTS, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, C, CAPS_LOCK, CLIP_BOARD_FORMAT_KEY, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, D, DASH, DELETE, DOWN_ARROW, DarkThemeColor, DefaultThemeColor, E, EIGHT, ELEMENT_TO_COMPONENT, END, ENTER, EQUALS, ESCAPE, F, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, FF_EQUALS, FF_MINUS, FF_MUTE, FF_SEMICOLON, FF_VOLUME_DOWN, FF_VOLUME_UP, FIRST_MEDIA, FIVE, FLUSHING, FOUR, G, H, HOME, HOST_CLASS_NAME, I, INSERT, IS_APPLE, IS_BOARD_CACHE, IS_CHROME, IS_CHROME_LEGACY, IS_EDGE_LEGACY, IS_FIREFOX, IS_IOS, IS_MAC, IS_PREVENT_TOUCH_MOVE, IS_SAFARI, IS_TEXT_EDITABLE, J, K, L, LAST_MEDIA, LEFT_ARROW, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, MAX_RADIUS, MERGING, META, MUTE, N, NINE, NODE_TO_INDEX, NODE_TO_PARENT, NS, NUMPAD_DIVIDE, NUMPAD_EIGHT, NUMPAD_FIVE, NUMPAD_FOUR, NUMPAD_MINUS, NUMPAD_MULTIPLY, NUMPAD_NINE, NUMPAD_ONE, NUMPAD_PERIOD, NUMPAD_PLUS, NUMPAD_SEVEN, NUMPAD_SIX, NUMPAD_THREE, NUMPAD_TWO, NUMPAD_ZERO, NUM_CENTER, NUM_LOCK, O, ONE, OPEN_SQUARE_BRACKET, P, PAGE_DOWN, PAGE_UP, PATH_REFS, PAUSE, PERIOD, PLUS_SIGN, POINTER_BUTTON, PRESS_AND_MOVE_BUFFER, PRINT_SCREEN, Path, PlaitBoard, PlaitBoardComponent, PlaitChildrenElement, PlaitContextService, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitIslandPopoverBaseComponent, PlaitModule, PlaitNode, PlaitOperation, PlaitPluginElementComponent, PlaitPluginKey, PlaitPointerType, Point, Q, QUESTION_MARK, R, RIGHT_ARROW, RectangleClient, ResizeCursorClass, RetroThemeColor, S, SAVING, SCROLL_BAR_WIDTH, SCROLL_LOCK, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SPACE, Selection, SoftThemeColor, StarryThemeColor, T, TAB, THREE, TILDE, TWO, ThemeColorMode, ThemeColors, Transforms, U, UP_ARROW, V, VOLUME_DOWN, VOLUME_UP, Viewport, W, X, Y, Z, ZERO, addMovingElements, addSelectedElement, arrowPoints, cacheMovingElements, cacheSelectedElements, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createFakeEvent, createForeignObject, createG, createKeyboardEvent, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createSVG, createSelectionOuterG, createTestingBoard, createText, createTouchEvent, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, downloadImage, drawArrow, drawBezierPath, drawCircle, drawLine, drawLinearPath, drawRoundRectangle, fakeNodeWeakMap, getBoardRectangle, getClipboardByKey, getClipboardDataByMedia, getDataFromClipboard, getElementHostBBox, getHitElementOfRoot, getHitElements, getIsRecursionFunc, getMovingElements, getRealScrollBarWidth, getRectangleByElements, getSelectedElements, getTemporaryElements, getTextFromClipboard, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isFromScrolling, isFromViewportChange, isHitElements, isInPlaitBoard, isMainPointer, isNullOrUndefined, isPreventTouchMove, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetViewportOperation, normalizePoint, preventTouchMove, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setClipboardData, setClipboardDataByMedia, setClipboardDataByText, setIsFromScrolling, setIsFromViewportChange, setSVGViewBox, setSelectionMoving, shouldClear, shouldMerge, shouldSave, throttleRAF, toImage, toPoint, transformPoint, transformPoints, updateForeignObject, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
|
|
3595
|
+
export { A, ALT, APOSTROPHE, ATTACHED_ELEMENT_CLASS_NAME, AT_SIGN, B, BACKSLASH, BACKSPACE, BOARD_TO_COMPONENT, BOARD_TO_ELEMENT_HOST, BOARD_TO_HOST, BOARD_TO_IS_SELECTION_MOVING, BOARD_TO_MOVING_ELEMENT, BOARD_TO_MOVING_POINT, BOARD_TO_MOVING_POINT_IN_BOARD, BOARD_TO_ON_CHANGE, BOARD_TO_ROUGH_SVG, BOARD_TO_SELECTED_ELEMENT, BOARD_TO_TEMPORARY_ELEMENTS, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, C, CAPS_LOCK, CLIP_BOARD_FORMAT_KEY, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, D, DASH, DELETE, DOWN_ARROW, DarkThemeColor, DefaultThemeColor, E, EIGHT, ELEMENT_TO_COMPONENT, END, ENTER, EQUALS, ESCAPE, F, F1, F10, F11, F12, F2, F3, F4, F5, F6, F7, F8, F9, FF_EQUALS, FF_MINUS, FF_MUTE, FF_SEMICOLON, FF_VOLUME_DOWN, FF_VOLUME_UP, FIRST_MEDIA, FIVE, FLUSHING, FOUR, G, H, HOME, HOST_CLASS_NAME, I, INSERT, IS_APPLE, IS_BOARD_CACHE, IS_CHROME, IS_CHROME_LEGACY, IS_EDGE_LEGACY, IS_FIREFOX, IS_IOS, IS_MAC, IS_PREVENT_TOUCH_MOVE, IS_SAFARI, IS_TEXT_EDITABLE, J, K, L, LAST_MEDIA, LEFT_ARROW, M, MAC_ENTER, MAC_META, MAC_WK_CMD_LEFT, MAC_WK_CMD_RIGHT, MAX_RADIUS, MERGING, META, MUTE, N, NINE, NODE_TO_INDEX, NODE_TO_PARENT, NS, NUMPAD_DIVIDE, NUMPAD_EIGHT, NUMPAD_FIVE, NUMPAD_FOUR, NUMPAD_MINUS, NUMPAD_MULTIPLY, NUMPAD_NINE, NUMPAD_ONE, NUMPAD_PERIOD, NUMPAD_PLUS, NUMPAD_SEVEN, NUMPAD_SIX, NUMPAD_THREE, NUMPAD_TWO, NUMPAD_ZERO, NUM_CENTER, NUM_LOCK, O, ONE, OPEN_SQUARE_BRACKET, P, PAGE_DOWN, PAGE_UP, PATH_REFS, PAUSE, PERIOD, PLUS_SIGN, POINTER_BUTTON, PRESS_AND_MOVE_BUFFER, PRINT_SCREEN, Path, PlaitBoard, PlaitBoardComponent, PlaitChildrenElement, PlaitContextService, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitIslandPopoverBaseComponent, PlaitModule, PlaitNode, PlaitOperation, PlaitPluginElementComponent, PlaitPluginKey, PlaitPointerType, Point, Q, QUESTION_MARK, R, RIGHT_ARROW, RectangleClient, ResizeCursorClass, RetroThemeColor, S, SAVING, SCROLL_BAR_WIDTH, SCROLL_LOCK, SELECTION_BORDER_COLOR, SELECTION_FILL_COLOR, SEMICOLON, SEVEN, SHIFT, SINGLE_QUOTE, SIX, SLASH, SPACE, Selection, SoftThemeColor, StarryThemeColor, T, TAB, THREE, TILDE, TWO, ThemeColorMode, ThemeColors, Transforms, U, UP_ARROW, V, VOLUME_DOWN, VOLUME_UP, Viewport, W, X, Y, Z, ZERO, addMovingElements, addSelectedElement, arrowPoints, cacheMovingElements, cacheSelectedElements, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createFakeEvent, createForeignObject, createG, createKeyboardEvent, createMask, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createRect, createSVG, createSelectionOuterG, createTestingBoard, createText, createTouchEvent, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, distanceBetweenPointAndSegments, downloadImage, drawArrow, drawBezierPath, drawCircle, drawLine, drawLinearPath, drawRoundRectangle, fakeNodeWeakMap, getBoardRectangle, getClipboardByKey, getClipboardDataByMedia, getDataFromClipboard, getElementById, getElementHostBBox, getHitElementOfRoot, getHitElements, getIsRecursionFunc, getMovingElements, getNearestPointBetweenPointAndSegment, getNearestPointBetweenPointAndSegments, getRealScrollBarWidth, getRectangleByElements, getSelectedElements, getTemporaryElements, getTextFromClipboard, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isFromScrolling, isFromViewportChange, isHitElements, isInPlaitBoard, isLineHitLine, isMainPointer, isNullOrUndefined, isPolylineHitRectangle, isPreventTouchMove, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetViewportOperation, normalizePoint, preventTouchMove, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setClipboardData, setClipboardDataByMedia, setClipboardDataByText, setIsFromScrolling, setIsFromViewportChange, setSVGViewBox, setSelectionMoving, shouldClear, shouldMerge, shouldSave, throttleRAF, toImage, toPoint, transformPoint, transformPoints, updateForeignObject, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
|
|
3477
3596
|
//# sourceMappingURL=plait-core.mjs.map
|