@plait/core 0.33.0 → 0.34.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/esm2022/board/board.component.mjs +3 -12
- package/esm2022/utils/viewport.mjs +32 -4
- package/fesm2022/plait-core.mjs +157 -137
- package/fesm2022/plait-core.mjs.map +1 -1
- package/package.json +1 -1
- package/utils/viewport.d.ts +1 -0
package/fesm2022/plait-core.mjs
CHANGED
|
@@ -1142,6 +1142,132 @@ function drawBezierPath(points, options) {
|
|
|
1142
1142
|
return g;
|
|
1143
1143
|
}
|
|
1144
1144
|
|
|
1145
|
+
function setViewport(board, viewport) {
|
|
1146
|
+
const operation = { type: 'set_viewport', properties: board.viewport, newProperties: viewport };
|
|
1147
|
+
board.apply(operation);
|
|
1148
|
+
}
|
|
1149
|
+
const ViewportTransforms$1 = {
|
|
1150
|
+
setViewport
|
|
1151
|
+
};
|
|
1152
|
+
|
|
1153
|
+
function setTheme(board, themeColorMode) {
|
|
1154
|
+
const operation = { type: 'set_theme', properties: board.theme, newProperties: themeColorMode };
|
|
1155
|
+
board.apply(operation);
|
|
1156
|
+
}
|
|
1157
|
+
const ViewportTransforms = {
|
|
1158
|
+
setTheme
|
|
1159
|
+
};
|
|
1160
|
+
|
|
1161
|
+
function updateViewport(board, origination, zoom) {
|
|
1162
|
+
zoom = zoom ?? board.viewport.zoom;
|
|
1163
|
+
setViewport(board, {
|
|
1164
|
+
...board.viewport,
|
|
1165
|
+
zoom,
|
|
1166
|
+
origination
|
|
1167
|
+
});
|
|
1168
|
+
clearViewportOrigination(board);
|
|
1169
|
+
}
|
|
1170
|
+
const updatePointerType = (board, pointer) => {
|
|
1171
|
+
board.pointer = pointer;
|
|
1172
|
+
const boardComponent = BOARD_TO_COMPONENT.get(board);
|
|
1173
|
+
boardComponent?.markForCheck();
|
|
1174
|
+
};
|
|
1175
|
+
function updateZoom(board, newZoom, isCenter = true) {
|
|
1176
|
+
newZoom = clampZoomLevel(newZoom);
|
|
1177
|
+
const mousePoint = PlaitBoard.getMovingPointInBoard(board);
|
|
1178
|
+
const nativeElement = PlaitBoard.getBoardContainer(board);
|
|
1179
|
+
const nativeElementRect = nativeElement.getBoundingClientRect();
|
|
1180
|
+
const boardContainerRect = PlaitBoard.getBoardContainer(board).getBoundingClientRect();
|
|
1181
|
+
let focusPoint = [boardContainerRect.width / 2, boardContainerRect.height / 2];
|
|
1182
|
+
if (!isCenter && mousePoint && distanceBetweenPointAndRectangle(mousePoint[0], mousePoint[1], nativeElementRect) === 0) {
|
|
1183
|
+
focusPoint = toPoint(mousePoint[0], mousePoint[1], nativeElement);
|
|
1184
|
+
}
|
|
1185
|
+
const zoom = board.viewport.zoom;
|
|
1186
|
+
const origination = getViewportOrigination(board);
|
|
1187
|
+
const centerX = origination[0] + focusPoint[0] / zoom;
|
|
1188
|
+
const centerY = origination[1] + focusPoint[1] / zoom;
|
|
1189
|
+
const newOrigination = [centerX - focusPoint[0] / newZoom, centerY - focusPoint[1] / newZoom];
|
|
1190
|
+
updateViewport(board, newOrigination, newZoom);
|
|
1191
|
+
}
|
|
1192
|
+
function fitViewport(board) {
|
|
1193
|
+
let scrollBarWidth = getRealScrollBarWidth(board);
|
|
1194
|
+
const boardContainerRect = PlaitBoard.getBoardContainer(board).getBoundingClientRect();
|
|
1195
|
+
const elementHostBox = getRectangleByElements(board, board.children, true);
|
|
1196
|
+
const zoom = board.viewport.zoom;
|
|
1197
|
+
const autoFitPadding = 16;
|
|
1198
|
+
const viewportWidth = boardContainerRect.width - 2 * autoFitPadding;
|
|
1199
|
+
const viewportHeight = boardContainerRect.height - 2 * autoFitPadding;
|
|
1200
|
+
let newZoom = zoom;
|
|
1201
|
+
if (viewportWidth < elementHostBox.width || viewportHeight < elementHostBox.height) {
|
|
1202
|
+
newZoom = Math.min(viewportWidth / elementHostBox.width, viewportHeight / elementHostBox.height);
|
|
1203
|
+
}
|
|
1204
|
+
else {
|
|
1205
|
+
newZoom = 1;
|
|
1206
|
+
}
|
|
1207
|
+
const centerPoint = getViewBoxCenterPoint(board);
|
|
1208
|
+
const newOrigination = [
|
|
1209
|
+
centerPoint[0] - boardContainerRect.width / 2 / newZoom + scrollBarWidth / 2 / zoom,
|
|
1210
|
+
centerPoint[1] - boardContainerRect.height / 2 / newZoom + scrollBarWidth / 2 / zoom
|
|
1211
|
+
];
|
|
1212
|
+
updateViewport(board, newOrigination, newZoom);
|
|
1213
|
+
}
|
|
1214
|
+
function fitViewportWidth(board, options) {
|
|
1215
|
+
let scrollBarWidth = getRealScrollBarWidth(board);
|
|
1216
|
+
const boardContainer = PlaitBoard.getBoardContainer(board);
|
|
1217
|
+
const boardContainerRectangle = boardContainer.getBoundingClientRect();
|
|
1218
|
+
let finalWidth = 0;
|
|
1219
|
+
if (options.maxWidth) {
|
|
1220
|
+
finalWidth = options.maxWidth;
|
|
1221
|
+
}
|
|
1222
|
+
else {
|
|
1223
|
+
finalWidth = boardContainerRectangle.width;
|
|
1224
|
+
}
|
|
1225
|
+
const elementHostBox = getRectangleByElements(board, board.children, true);
|
|
1226
|
+
const contentWidth = finalWidth - 2 * options.autoFitPadding;
|
|
1227
|
+
let newZoom = 0;
|
|
1228
|
+
if (contentWidth < elementHostBox.width) {
|
|
1229
|
+
newZoom = Math.min(contentWidth / elementHostBox.width);
|
|
1230
|
+
}
|
|
1231
|
+
else {
|
|
1232
|
+
newZoom = 1;
|
|
1233
|
+
}
|
|
1234
|
+
let finalHeight = elementHostBox.height * newZoom + 2 * options.autoFitPadding;
|
|
1235
|
+
if (finalHeight > options.limitHeight) {
|
|
1236
|
+
const containerEl = boardContainer.closest(`.${options.containerClass}`);
|
|
1237
|
+
containerEl.style.height = `${finalHeight}px`;
|
|
1238
|
+
initializeViewportContainer(board);
|
|
1239
|
+
}
|
|
1240
|
+
else {
|
|
1241
|
+
finalHeight = options.limitHeight;
|
|
1242
|
+
}
|
|
1243
|
+
const centerX = elementHostBox.x + elementHostBox.width / 2;
|
|
1244
|
+
const centerY = elementHostBox.y + elementHostBox.height / 2;
|
|
1245
|
+
const newOrigination = [
|
|
1246
|
+
centerX - finalWidth / 2 / newZoom + scrollBarWidth / 2 / newZoom,
|
|
1247
|
+
centerY - finalHeight / 2 / newZoom + scrollBarWidth / 2 / newZoom
|
|
1248
|
+
];
|
|
1249
|
+
updateViewport(board, newOrigination, newZoom);
|
|
1250
|
+
}
|
|
1251
|
+
/**
|
|
1252
|
+
* apply theme to every element (remove element custom properties)
|
|
1253
|
+
* invoke applyThemeColor
|
|
1254
|
+
*/
|
|
1255
|
+
function updateThemeColor(board, mode) {
|
|
1256
|
+
mode = mode ?? board.theme.themeColorMode;
|
|
1257
|
+
setTheme(board, { themeColorMode: mode });
|
|
1258
|
+
depthFirstRecursion(board, element => {
|
|
1259
|
+
board.applyTheme(element);
|
|
1260
|
+
});
|
|
1261
|
+
}
|
|
1262
|
+
const BoardTransforms = {
|
|
1263
|
+
updatePointerType,
|
|
1264
|
+
updateViewport,
|
|
1265
|
+
fitViewport,
|
|
1266
|
+
updateZoom,
|
|
1267
|
+
updateThemeColor,
|
|
1268
|
+
fitViewportWidth
|
|
1269
|
+
};
|
|
1270
|
+
|
|
1145
1271
|
const IS_FROM_SCROLLING = new WeakMap();
|
|
1146
1272
|
const IS_FROM_VIEWPORT_CHANGE = new WeakMap();
|
|
1147
1273
|
function getViewportContainerRect(board) {
|
|
@@ -1228,8 +1354,9 @@ function setSVGViewBox(board, viewBox) {
|
|
|
1228
1354
|
}
|
|
1229
1355
|
function updateViewportOffset(board) {
|
|
1230
1356
|
const origination = getViewportOrigination(board);
|
|
1231
|
-
if (!origination)
|
|
1357
|
+
if (!origination) {
|
|
1232
1358
|
return;
|
|
1359
|
+
}
|
|
1233
1360
|
const { zoom } = board.viewport;
|
|
1234
1361
|
const viewBox = getViewBox(board, zoom);
|
|
1235
1362
|
const scrollLeft = (origination[0] - viewBox[0]) * zoom;
|
|
@@ -1238,11 +1365,37 @@ function updateViewportOffset(board) {
|
|
|
1238
1365
|
}
|
|
1239
1366
|
function updateViewportContainerScroll(board, left, top, isFromViewportChange = true) {
|
|
1240
1367
|
const viewportContainer = PlaitBoard.getViewportContainer(board);
|
|
1368
|
+
const previousScrollLeft = viewportContainer.scrollLeft;
|
|
1369
|
+
const previousScrollTop = viewportContainer.scrollTop;
|
|
1241
1370
|
if (viewportContainer.scrollLeft !== left || viewportContainer.scrollTop !== top) {
|
|
1242
1371
|
viewportContainer.scrollLeft = left;
|
|
1243
1372
|
viewportContainer.scrollTop = top;
|
|
1244
|
-
|
|
1373
|
+
const offsetWidth = viewportContainer.offsetWidth;
|
|
1374
|
+
const offsetHeight = viewportContainer.offsetHeight;
|
|
1375
|
+
if (previousScrollLeft === viewportContainer.scrollLeft && previousScrollTop === viewportContainer.scrollTop) {
|
|
1376
|
+
// The scroll event cannot be triggered, so the origination is modified directly based on the scroll distance.
|
|
1377
|
+
updateViewportByScrolling(board, previousScrollLeft, previousScrollTop);
|
|
1378
|
+
}
|
|
1379
|
+
else {
|
|
1380
|
+
const isValidLeftOrTop = left > 0 &&
|
|
1381
|
+
top > 0 &&
|
|
1382
|
+
left < viewportContainer.scrollWidth - offsetWidth &&
|
|
1383
|
+
top < viewportContainer.scrollHeight - offsetHeight;
|
|
1384
|
+
if (isFromViewportChange && isValidLeftOrTop) {
|
|
1385
|
+
setIsFromViewportChange(board, true);
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
function updateViewportByScrolling(board, scrollLeft, scrollTop) {
|
|
1391
|
+
const zoom = board.viewport.zoom;
|
|
1392
|
+
const viewBox = getViewBox(board, zoom);
|
|
1393
|
+
const origination = [scrollLeft / zoom + viewBox[0], scrollTop / zoom + viewBox[1]];
|
|
1394
|
+
if (Point.isEquals(origination, board.viewport.origination)) {
|
|
1395
|
+
return;
|
|
1245
1396
|
}
|
|
1397
|
+
BoardTransforms.updateViewport(board, origination);
|
|
1398
|
+
setIsFromScrolling(board, true);
|
|
1246
1399
|
}
|
|
1247
1400
|
function initializeViewportContainer(board) {
|
|
1248
1401
|
const { width, height } = getViewportContainerRect(board);
|
|
@@ -2555,132 +2708,6 @@ function addSelectionWithTemporaryElements(board, elements) {
|
|
|
2555
2708
|
}
|
|
2556
2709
|
}
|
|
2557
2710
|
|
|
2558
|
-
function setViewport(board, viewport) {
|
|
2559
|
-
const operation = { type: 'set_viewport', properties: board.viewport, newProperties: viewport };
|
|
2560
|
-
board.apply(operation);
|
|
2561
|
-
}
|
|
2562
|
-
const ViewportTransforms$1 = {
|
|
2563
|
-
setViewport
|
|
2564
|
-
};
|
|
2565
|
-
|
|
2566
|
-
function setTheme(board, themeColorMode) {
|
|
2567
|
-
const operation = { type: 'set_theme', properties: board.theme, newProperties: themeColorMode };
|
|
2568
|
-
board.apply(operation);
|
|
2569
|
-
}
|
|
2570
|
-
const ViewportTransforms = {
|
|
2571
|
-
setTheme
|
|
2572
|
-
};
|
|
2573
|
-
|
|
2574
|
-
function updateViewport(board, origination, zoom) {
|
|
2575
|
-
zoom = zoom ?? board.viewport.zoom;
|
|
2576
|
-
setViewport(board, {
|
|
2577
|
-
...board.viewport,
|
|
2578
|
-
zoom,
|
|
2579
|
-
origination
|
|
2580
|
-
});
|
|
2581
|
-
clearViewportOrigination(board);
|
|
2582
|
-
}
|
|
2583
|
-
const updatePointerType = (board, pointer) => {
|
|
2584
|
-
board.pointer = pointer;
|
|
2585
|
-
const boardComponent = BOARD_TO_COMPONENT.get(board);
|
|
2586
|
-
boardComponent?.markForCheck();
|
|
2587
|
-
};
|
|
2588
|
-
function updateZoom(board, newZoom, isCenter = true) {
|
|
2589
|
-
newZoom = clampZoomLevel(newZoom);
|
|
2590
|
-
const mousePoint = PlaitBoard.getMovingPointInBoard(board);
|
|
2591
|
-
const nativeElement = PlaitBoard.getBoardContainer(board);
|
|
2592
|
-
const nativeElementRect = nativeElement.getBoundingClientRect();
|
|
2593
|
-
const boardContainerRect = PlaitBoard.getBoardContainer(board).getBoundingClientRect();
|
|
2594
|
-
let focusPoint = [boardContainerRect.width / 2, boardContainerRect.height / 2];
|
|
2595
|
-
if (!isCenter && mousePoint && distanceBetweenPointAndRectangle(mousePoint[0], mousePoint[1], nativeElementRect) === 0) {
|
|
2596
|
-
focusPoint = toPoint(mousePoint[0], mousePoint[1], nativeElement);
|
|
2597
|
-
}
|
|
2598
|
-
const zoom = board.viewport.zoom;
|
|
2599
|
-
const origination = getViewportOrigination(board);
|
|
2600
|
-
const centerX = origination[0] + focusPoint[0] / zoom;
|
|
2601
|
-
const centerY = origination[1] + focusPoint[1] / zoom;
|
|
2602
|
-
const newOrigination = [centerX - focusPoint[0] / newZoom, centerY - focusPoint[1] / newZoom];
|
|
2603
|
-
updateViewport(board, newOrigination, newZoom);
|
|
2604
|
-
}
|
|
2605
|
-
function fitViewport(board) {
|
|
2606
|
-
let scrollBarWidth = getRealScrollBarWidth(board);
|
|
2607
|
-
const boardContainerRect = PlaitBoard.getBoardContainer(board).getBoundingClientRect();
|
|
2608
|
-
const elementHostBox = getRectangleByElements(board, board.children, true);
|
|
2609
|
-
const zoom = board.viewport.zoom;
|
|
2610
|
-
const autoFitPadding = 16;
|
|
2611
|
-
const viewportWidth = boardContainerRect.width - 2 * autoFitPadding;
|
|
2612
|
-
const viewportHeight = boardContainerRect.height - 2 * autoFitPadding;
|
|
2613
|
-
let newZoom = zoom;
|
|
2614
|
-
if (viewportWidth < elementHostBox.width || viewportHeight < elementHostBox.height) {
|
|
2615
|
-
newZoom = Math.min(viewportWidth / elementHostBox.width, viewportHeight / elementHostBox.height);
|
|
2616
|
-
}
|
|
2617
|
-
else {
|
|
2618
|
-
newZoom = 1;
|
|
2619
|
-
}
|
|
2620
|
-
const centerPoint = getViewBoxCenterPoint(board);
|
|
2621
|
-
const newOrigination = [
|
|
2622
|
-
centerPoint[0] - boardContainerRect.width / 2 / newZoom + scrollBarWidth / 2 / zoom,
|
|
2623
|
-
centerPoint[1] - boardContainerRect.height / 2 / newZoom + scrollBarWidth / 2 / zoom
|
|
2624
|
-
];
|
|
2625
|
-
updateViewport(board, newOrigination, newZoom);
|
|
2626
|
-
}
|
|
2627
|
-
function fitViewportWidth(board, options) {
|
|
2628
|
-
let scrollBarWidth = getRealScrollBarWidth(board);
|
|
2629
|
-
const boardContainer = PlaitBoard.getBoardContainer(board);
|
|
2630
|
-
const boardContainerRectangle = boardContainer.getBoundingClientRect();
|
|
2631
|
-
let finalWidth = 0;
|
|
2632
|
-
if (options.maxWidth) {
|
|
2633
|
-
finalWidth = options.maxWidth;
|
|
2634
|
-
}
|
|
2635
|
-
else {
|
|
2636
|
-
finalWidth = boardContainerRectangle.width;
|
|
2637
|
-
}
|
|
2638
|
-
const elementHostBox = getRectangleByElements(board, board.children, true);
|
|
2639
|
-
const contentWidth = finalWidth - 2 * options.autoFitPadding;
|
|
2640
|
-
let newZoom = 0;
|
|
2641
|
-
if (contentWidth < elementHostBox.width) {
|
|
2642
|
-
newZoom = Math.min(contentWidth / elementHostBox.width);
|
|
2643
|
-
}
|
|
2644
|
-
else {
|
|
2645
|
-
newZoom = 1;
|
|
2646
|
-
}
|
|
2647
|
-
let finalHeight = elementHostBox.height * newZoom + 2 * options.autoFitPadding;
|
|
2648
|
-
if (finalHeight > options.limitHeight) {
|
|
2649
|
-
const containerEl = boardContainer.closest(`.${options.containerClass}`);
|
|
2650
|
-
containerEl.style.height = `${finalHeight}px`;
|
|
2651
|
-
initializeViewportContainer(board);
|
|
2652
|
-
}
|
|
2653
|
-
else {
|
|
2654
|
-
finalHeight = options.limitHeight;
|
|
2655
|
-
}
|
|
2656
|
-
const centerX = elementHostBox.x + elementHostBox.width / 2;
|
|
2657
|
-
const centerY = elementHostBox.y + elementHostBox.height / 2;
|
|
2658
|
-
const newOrigination = [
|
|
2659
|
-
centerX - finalWidth / 2 / newZoom + scrollBarWidth / 2 / newZoom,
|
|
2660
|
-
centerY - finalHeight / 2 / newZoom + scrollBarWidth / 2 / newZoom
|
|
2661
|
-
];
|
|
2662
|
-
updateViewport(board, newOrigination, newZoom);
|
|
2663
|
-
}
|
|
2664
|
-
/**
|
|
2665
|
-
* apply theme to every element (remove element custom properties)
|
|
2666
|
-
* invoke applyThemeColor
|
|
2667
|
-
*/
|
|
2668
|
-
function updateThemeColor(board, mode) {
|
|
2669
|
-
mode = mode ?? board.theme.themeColorMode;
|
|
2670
|
-
setTheme(board, { themeColorMode: mode });
|
|
2671
|
-
depthFirstRecursion(board, element => {
|
|
2672
|
-
board.applyTheme(element);
|
|
2673
|
-
});
|
|
2674
|
-
}
|
|
2675
|
-
const BoardTransforms = {
|
|
2676
|
-
updatePointerType,
|
|
2677
|
-
updateViewport,
|
|
2678
|
-
fitViewport,
|
|
2679
|
-
updateZoom,
|
|
2680
|
-
updateThemeColor,
|
|
2681
|
-
fitViewportWidth
|
|
2682
|
-
};
|
|
2683
|
-
|
|
2684
2711
|
const removeElements = (board, elements) => {
|
|
2685
2712
|
elements
|
|
2686
2713
|
.map(element => {
|
|
@@ -4050,14 +4077,7 @@ class PlaitBoardComponent {
|
|
|
4050
4077
|
}))
|
|
4051
4078
|
.subscribe((event) => {
|
|
4052
4079
|
const { scrollLeft, scrollTop } = event.target;
|
|
4053
|
-
|
|
4054
|
-
const viewBox = getViewBox(this.board, zoom);
|
|
4055
|
-
const origination = [scrollLeft / zoom + viewBox[0], scrollTop / zoom + viewBox[1]];
|
|
4056
|
-
if (Point.isEquals(origination, this.board.viewport.origination)) {
|
|
4057
|
-
return;
|
|
4058
|
-
}
|
|
4059
|
-
BoardTransforms.updateViewport(this.board, origination);
|
|
4060
|
-
setIsFromScrolling(this.board, true);
|
|
4080
|
+
updateViewportByScrolling(this.board, scrollLeft, scrollTop);
|
|
4061
4081
|
});
|
|
4062
4082
|
});
|
|
4063
4083
|
this.ngZone.runOutsideAngular(() => {
|
|
@@ -4346,5 +4366,5 @@ function createModModifierKeys() {
|
|
|
4346
4366
|
* Generated bundle index. Do not edit.
|
|
4347
4367
|
*/
|
|
4348
4368
|
|
|
4349
|
-
export { A, ACTIVE_STROKE_WIDTH, 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_TOUCH_REF, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, C, CAPS_LOCK, CLIP_BOARD_FORMAT_KEY, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, CoreTransforms, D, DASH, DELETE, DOWN_ARROW, DarkThemeColor, DefaultThemeColor, Direction, 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_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, PlaitChildrenElementComponent, PlaitContextService, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitIslandPopoverBaseComponent, 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, SELECTION_RECTANGLE_CLASS_NAME, 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, catmullRomFitting, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createFakeEvent, createForeignObject, createG, createKeyboardEvent, createMask, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createRect, createSVG, createSelectionRectangleG, createTestingBoard, createText, createTouchEvent, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, distanceBetweenPointAndSegments, downScale, downloadImage, drawArrow, drawBezierPath, drawCircle, drawLine, drawLinearPath, drawRectangle, drawRoundRectangle, fakeNodeWeakMap, findElements, getBoardRectangle, getClipboardByKey, getClipboardDataByMedia, getDataFromClipboard, getElementById, getElementHostBBox, getHitElementByPoint, getHitElementsBySelection, getIsRecursionFunc, getMovingElements, getNearestPointBetweenPointAndSegment, getNearestPointBetweenPointAndSegments, getRealScrollBarWidth, getRectangleByElements, getSelectedElements, getTemporaryElements, getTemporaryRef, getTextFromClipboard, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, handleTouchTarget, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isFromScrolling, isFromViewportChange, isInPlaitBoard, isLineHitLine, isMainPointer, isNullOrUndefined, isPointInEllipse, isPointInPolygon, isPointInRoundRectangle, isPolylineHitRectangle, isPreventTouchMove, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetViewportOperation, normalizePoint, preventTouchMove, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setClipboardData, setClipboardDataByMedia, setClipboardDataByText, setIsFromScrolling, setIsFromViewportChange, setPathStrokeLinecap, setSVGViewBox, setSelectionMoving, setStrokeLinecap, shouldClear, shouldMerge, shouldSave, temporaryDisableSelection, throttleRAF, toImage, toPoint, transformPoint, transformPoints, updateForeignObject, updateForeignObjectWidth, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
|
|
4369
|
+
export { A, ACTIVE_STROKE_WIDTH, 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_TOUCH_REF, BOARD_TO_VIEWPORT_ORIGINATION, BoardTransforms, C, CAPS_LOCK, CLIP_BOARD_FORMAT_KEY, CLOSE_SQUARE_BRACKET, COMMA, CONTEXT_MENU, CONTROL, ColorfulThemeColor, CoreTransforms, D, DASH, DELETE, DOWN_ARROW, DarkThemeColor, DefaultThemeColor, Direction, 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_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, PlaitChildrenElementComponent, PlaitContextService, PlaitElement, PlaitElementComponent, PlaitHistoryBoard, PlaitIslandBaseComponent, PlaitIslandPopoverBaseComponent, 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, SELECTION_RECTANGLE_CLASS_NAME, 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, catmullRomFitting, clampZoomLevel, clearNodeWeakMap, clearSelectedElement, clearSelectionMoving, clearViewportOrigination, createFakeEvent, createForeignObject, createG, createKeyboardEvent, createMask, createModModifierKeys, createMouseEvent, createPath, createPointerEvent, createRect, createSVG, createSelectionRectangleG, createTestingBoard, createText, createTouchEvent, debounce, deleteTemporaryElements, depthFirstRecursion, distanceBetweenPointAndPoint, distanceBetweenPointAndRectangle, distanceBetweenPointAndSegment, distanceBetweenPointAndSegments, downScale, downloadImage, drawArrow, drawBezierPath, drawCircle, drawLine, drawLinearPath, drawRectangle, drawRoundRectangle, fakeNodeWeakMap, findElements, getBoardRectangle, getClipboardByKey, getClipboardDataByMedia, getDataFromClipboard, getElementById, getElementHostBBox, getHitElementByPoint, getHitElementsBySelection, getIsRecursionFunc, getMovingElements, getNearestPointBetweenPointAndSegment, getNearestPointBetweenPointAndSegments, getRealScrollBarWidth, getRectangleByElements, getSelectedElements, getTemporaryElements, getTemporaryRef, getTextFromClipboard, getViewBox, getViewBoxCenterPoint, getViewportContainerRect, getViewportOrigination, handleTouchTarget, hasBeforeContextChange, hasInputOrTextareaTarget, hasOnBoardChange, hasOnContextChanged, hotkeys, idCreator, initializeViewBox, initializeViewportContainer, initializeViewportOffset, inverse, isDOMElement, isDOMNode, isFromScrolling, isFromViewportChange, isInPlaitBoard, isLineHitLine, isMainPointer, isNullOrUndefined, isPointInEllipse, isPointInPolygon, isPointInRoundRectangle, isPolylineHitRectangle, isPreventTouchMove, isSecondaryPointer, isSelectedElement, isSelectionMoving, isSetViewportOperation, normalizePoint, preventTouchMove, removeMovingElements, removeSelectedElement, rotate, scrollToRectangle, setClipboardData, setClipboardDataByMedia, setClipboardDataByText, setIsFromScrolling, setIsFromViewportChange, setPathStrokeLinecap, setSVGViewBox, setSelectionMoving, setStrokeLinecap, shouldClear, shouldMerge, shouldSave, temporaryDisableSelection, throttleRAF, toImage, toPoint, transformPoint, transformPoints, updateForeignObject, updateForeignObjectWidth, updateViewportByScrolling, updateViewportContainerScroll, updateViewportOffset, updateViewportOrigination, withMoving, withOptions, withSelection };
|
|
4350
4370
|
//# sourceMappingURL=plait-core.mjs.map
|