@plait/mind 0.50.1 → 0.51.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 +20 -134
- package/esm2022/plugins/with-mind-create.mjs +6 -6
- package/esm2022/plugins/with-mind-extend.mjs +1 -1
- package/esm2022/plugins/with-mind-hotkey.mjs +4 -4
- package/esm2022/plugins/with-mind.mjs +9 -9
- package/esm2022/plugins/with-node-hover-hit-test.mjs +19 -0
- package/esm2022/plugins/with-node-image-resize.mjs +10 -13
- package/esm2022/plugins/with-node-image.mjs +12 -12
- package/esm2022/plugins/with-node-resize.mjs +4 -4
- package/esm2022/utils/abstract/resize.mjs +2 -2
- package/esm2022/utils/node-hover/extend.mjs +14 -14
- package/esm2022/utils/position/emoji.mjs +2 -2
- package/esm2022/utils/position/image.mjs +2 -2
- package/fesm2022/plait-mind.mjs +65 -66
- package/fesm2022/plait-mind.mjs.map +1 -1
- package/package.json +1 -1
- package/plugins/with-node-hover-hit-test.d.ts +2 -0
- package/utils/node-hover/extend.d.ts +3 -3
- package/esm2022/plugins/with-node-hover-detect.mjs +0 -16
- package/plugins/with-node-hover-detect.d.ts +0 -2
package/fesm2022/plait-mind.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, ChangeDetectionStrategy, NgZone, Directive, Input, HostListener } from '@angular/core';
|
|
3
|
-
import { DefaultThemeColor, ColorfulThemeColor, SoftThemeColor, RetroThemeColor, DarkThemeColor, StarryThemeColor, PlaitElement, PlaitNode, Path, isNullOrUndefined, PlaitBoard, getSelectedElements, idCreator, Transforms, clearSelectedElement, addSelectedElement, distanceBetweenPointAndRectangle, RectangleClient, depthFirstRecursion, getIsRecursionFunc, drawRoundRectangle, drawLinearPath, drawBezierPath, createG, updateForeignObject, getRectangleByElements, NODE_TO_PARENT, createForeignObject, removeSelectedElement, PlaitHistoryBoard, setStrokeLinecap, ACTIVE_STROKE_WIDTH, createText, PlaitPointerType, NODE_TO_INDEX, PlaitChildrenElementComponent, isMainPointer, toViewBoxPoint, toHostPoint, getHitElementByPoint, distanceBetweenPointAndPoint, CoreTransforms, BOARD_TO_HOST, BoardTransforms, throttleRAF, isContextmenu, temporaryDisableSelection, hotkeys, createClipboardContext, WritableClipboardType, ResizeCursorClass, addClipboardContext, PlaitPluginKey } from '@plait/core';
|
|
3
|
+
import { DefaultThemeColor, ColorfulThemeColor, SoftThemeColor, RetroThemeColor, DarkThemeColor, StarryThemeColor, PlaitElement, PlaitNode, Path, isNullOrUndefined, PlaitBoard, getSelectedElements, idCreator, Transforms, clearSelectedElement, addSelectedElement, distanceBetweenPointAndRectangle, RectangleClient, depthFirstRecursion, getIsRecursionFunc, drawRoundRectangle, drawLinearPath, drawBezierPath, createG, updateForeignObject, getRectangleByElements, NODE_TO_PARENT, createForeignObject, removeSelectedElement, PlaitHistoryBoard, setStrokeLinecap, ACTIVE_STROKE_WIDTH, createText, PlaitPointerType, NODE_TO_INDEX, PlaitChildrenElementComponent, isMainPointer, toViewBoxPoint, toHostPoint, getHitElementByPoint, distanceBetweenPointAndPoint, CoreTransforms, BOARD_TO_HOST, BoardTransforms, throttleRAF, isContextmenu, temporaryDisableSelection, hotkeys, createClipboardContext, WritableClipboardType, ResizeCursorClass, Point, addClipboardContext, PlaitPluginKey } from '@plait/core';
|
|
4
4
|
import { MindLayoutType, AbstractNode, isIndentedLayout, isHorizontalLayout, isHorizontalLogicLayout, ConnectingPosition, getNonAbstractChildren, isStandardLayout, isLeftLayout, isRightLayout, isVerticalLogicLayout, isTopLayout, isBottomLayout, getCorrectStartEnd, getAbstractLayout, GlobalLayout } from '@plait/layouts';
|
|
5
5
|
import { TEXT_DEFAULT_HEIGHT, buildText, PlaitMarkEditor, MarkTypes, DEFAULT_FONT_SIZE, getTextSize, TextManage, ExitOrigin } from '@plait/text';
|
|
6
6
|
import { fromEvent, Subject } from 'rxjs';
|
|
7
|
-
import { getFirstTextEditor, RESIZE_HANDLE_DIAMETER, getRectangleResizeHandleRefs, addElementOfFocusedImage, removeElementOfFocusedImage, getFirstTextManage, PropertyTransforms, Generator, CommonPluginElement, ImageGenerator, WithTextPluginKey, isDrawingMode, isDndMode, setCreationMode, BoardCreationMode, isExpandHotkey, isTabHotkey, isEnterHotkey, isVirtualKey, isDelete, isSpaceHotkey, getElementOfFocusedImage, acceptImageTypes, buildImage, withResize,
|
|
7
|
+
import { getFirstTextEditor, RESIZE_HANDLE_DIAMETER, getRectangleResizeHandleRefs, addElementOfFocusedImage, removeElementOfFocusedImage, getFirstTextManage, PropertyTransforms, Generator, CommonPluginElement, ImageGenerator, WithTextPluginKey, isDrawingMode, isDndMode, setCreationMode, BoardCreationMode, isExpandHotkey, isTabHotkey, isEnterHotkey, isVirtualKey, isDelete, isSpaceHotkey, getElementOfFocusedImage, acceptImageTypes, buildImage, withResize, getElementsText } from '@plait/common';
|
|
8
8
|
import { Node as Node$1, Path as Path$1 } from 'slate';
|
|
9
9
|
import { pointsOnBezierCurves } from 'points-on-curve';
|
|
10
10
|
import { take, filter } from 'rxjs/operators';
|
|
@@ -991,7 +991,7 @@ function getEmojiForeignRectangle(board, element) {
|
|
|
991
991
|
};
|
|
992
992
|
}
|
|
993
993
|
const isHitEmojis = (board, element, point) => {
|
|
994
|
-
return RectangleClient.isHit(RectangleClient.
|
|
994
|
+
return RectangleClient.isHit(RectangleClient.getRectangleByPoints([point, point]), getEmojiRectangle(board, element));
|
|
995
995
|
};
|
|
996
996
|
|
|
997
997
|
function getTopicRectangleByNode(board, node) {
|
|
@@ -1034,7 +1034,7 @@ const getHitImageResizeHandleDirection = (board, element, point) => {
|
|
|
1034
1034
|
const imageRectangle = getImageForeignRectangle(board, element);
|
|
1035
1035
|
const resizeHandleRefs = getRectangleResizeHandleRefs(imageRectangle, RESIZE_HANDLE_DIAMETER);
|
|
1036
1036
|
const result = resizeHandleRefs.find(resizeHandleRef => {
|
|
1037
|
-
return RectangleClient.isHit(RectangleClient.
|
|
1037
|
+
return RectangleClient.isHit(RectangleClient.getRectangleByPoints([point, point]), resizeHandleRef.rectangle);
|
|
1038
1038
|
});
|
|
1039
1039
|
return result;
|
|
1040
1040
|
};
|
|
@@ -1861,7 +1861,7 @@ const getHitAbstractHandle = (board, element, point) => {
|
|
|
1861
1861
|
abstractRectangle = RectangleClient.getOutlineRectangle(abstractRectangle, -ABSTRACT_INCLUDED_OUTLINE_OFFSET);
|
|
1862
1862
|
const startHandleRec = getAbstractHandleRectangle(abstractRectangle, isHorizontal, AbstractHandlePosition.start);
|
|
1863
1863
|
const endHandleRec = getAbstractHandleRectangle(abstractRectangle, isHorizontal, AbstractHandlePosition.end);
|
|
1864
|
-
const pointRec = RectangleClient.
|
|
1864
|
+
const pointRec = RectangleClient.getRectangleByPoints([point, point]);
|
|
1865
1865
|
if (RectangleClient.isHit(pointRec, startHandleRec))
|
|
1866
1866
|
return AbstractHandlePosition.start;
|
|
1867
1867
|
if (RectangleClient.isHit(pointRec, endHandleRec))
|
|
@@ -3472,7 +3472,7 @@ const withMindExtend = (board) => {
|
|
|
3472
3472
|
const DefaultHotkey = 'm';
|
|
3473
3473
|
const withCreateMind = (board) => {
|
|
3474
3474
|
const newBoard = board;
|
|
3475
|
-
const {
|
|
3475
|
+
const { keyDown, pointerDown, pointerMove, pointerUp } = board;
|
|
3476
3476
|
let fakeCreateNodeRef = null;
|
|
3477
3477
|
let emptyMind = null;
|
|
3478
3478
|
newBoard.pointerDown = (event) => {
|
|
@@ -3495,7 +3495,7 @@ const withCreateMind = (board) => {
|
|
|
3495
3495
|
}
|
|
3496
3496
|
const isMindPointer = PlaitBoard.isPointer(board, MindPointerType.mind);
|
|
3497
3497
|
if (isDndMode(board) && isMindPointer) {
|
|
3498
|
-
throttleRAF(() => {
|
|
3498
|
+
throttleRAF(board, 'with-mind-create', () => {
|
|
3499
3499
|
let movingPoint = PlaitBoard.getMovingPointInBoard(board);
|
|
3500
3500
|
if (movingPoint) {
|
|
3501
3501
|
movingPoint = toViewBoxPoint(newBoard, toHostPoint(board, movingPoint[0], movingPoint[1]));
|
|
@@ -3550,9 +3550,9 @@ const withCreateMind = (board) => {
|
|
|
3550
3550
|
destroy();
|
|
3551
3551
|
pointerUp(event);
|
|
3552
3552
|
};
|
|
3553
|
-
board.
|
|
3553
|
+
board.keyDown = (event) => {
|
|
3554
3554
|
if (PlaitBoard.isReadonly(board) || getSelectedElements(board).length > 0) {
|
|
3555
|
-
|
|
3555
|
+
keyDown(event);
|
|
3556
3556
|
return;
|
|
3557
3557
|
}
|
|
3558
3558
|
if (event.key === DefaultHotkey && !PlaitBoard.isPointer(board, MindPointerType.mind)) {
|
|
@@ -3561,7 +3561,7 @@ const withCreateMind = (board) => {
|
|
|
3561
3561
|
event.preventDefault();
|
|
3562
3562
|
return;
|
|
3563
3563
|
}
|
|
3564
|
-
|
|
3564
|
+
keyDown(event);
|
|
3565
3565
|
};
|
|
3566
3566
|
function destroy() {
|
|
3567
3567
|
if (fakeCreateNodeRef) {
|
|
@@ -3575,8 +3575,8 @@ const withCreateMind = (board) => {
|
|
|
3575
3575
|
|
|
3576
3576
|
const withMindHotkey = (baseBoard) => {
|
|
3577
3577
|
const board = baseBoard;
|
|
3578
|
-
const {
|
|
3579
|
-
board.
|
|
3578
|
+
const { keyDown } = board;
|
|
3579
|
+
board.keyDown = (event) => {
|
|
3580
3580
|
const selectedElements = getSelectedElements(board);
|
|
3581
3581
|
const isSingleSelection = selectedElements.length === 1;
|
|
3582
3582
|
const isSingleMindElement = selectedElements.length === 1 && MindElement.isMindElement(board, selectedElements[0]);
|
|
@@ -3610,12 +3610,12 @@ const withMindHotkey = (baseBoard) => {
|
|
|
3610
3610
|
return;
|
|
3611
3611
|
}
|
|
3612
3612
|
}
|
|
3613
|
-
|
|
3613
|
+
keyDown(event);
|
|
3614
3614
|
};
|
|
3615
3615
|
return board;
|
|
3616
3616
|
};
|
|
3617
3617
|
|
|
3618
|
-
const
|
|
3618
|
+
const pointerMoveHandle = (board, event, nodeExtendHoveredRef) => {
|
|
3619
3619
|
let target = null;
|
|
3620
3620
|
const point = toViewBoxPoint(board, toHostPoint(board, event.x, event.y));
|
|
3621
3621
|
depthFirstRecursion(board, element => {
|
|
@@ -3630,29 +3630,29 @@ const mouseMoveHandle = (board, event, nodeHoveredExtendRef) => {
|
|
|
3630
3630
|
target = element;
|
|
3631
3631
|
}
|
|
3632
3632
|
}, getIsRecursionFunc(board), true);
|
|
3633
|
-
if (
|
|
3634
|
-
return
|
|
3633
|
+
if (nodeExtendHoveredRef && target && nodeExtendHoveredRef.element === target) {
|
|
3634
|
+
return nodeExtendHoveredRef;
|
|
3635
3635
|
}
|
|
3636
|
-
if (
|
|
3637
|
-
removeHovered(
|
|
3636
|
+
if (nodeExtendHoveredRef) {
|
|
3637
|
+
removeHovered(nodeExtendHoveredRef.element);
|
|
3638
3638
|
}
|
|
3639
3639
|
if (target) {
|
|
3640
3640
|
addHovered(target);
|
|
3641
|
-
if (
|
|
3642
|
-
|
|
3641
|
+
if (nodeExtendHoveredRef) {
|
|
3642
|
+
nodeExtendHoveredRef.element = target;
|
|
3643
3643
|
}
|
|
3644
3644
|
else {
|
|
3645
|
-
|
|
3645
|
+
nodeExtendHoveredRef = { element: target };
|
|
3646
3646
|
}
|
|
3647
3647
|
}
|
|
3648
3648
|
else {
|
|
3649
|
-
|
|
3649
|
+
nodeExtendHoveredRef = null;
|
|
3650
3650
|
}
|
|
3651
|
-
return
|
|
3651
|
+
return nodeExtendHoveredRef;
|
|
3652
3652
|
};
|
|
3653
|
-
const
|
|
3654
|
-
if (
|
|
3655
|
-
removeHovered(
|
|
3653
|
+
const pointerLeaveHandle = (board, event, nodeExtendHoveredRef) => {
|
|
3654
|
+
if (nodeExtendHoveredRef) {
|
|
3655
|
+
removeHovered(nodeExtendHoveredRef.element);
|
|
3656
3656
|
}
|
|
3657
3657
|
};
|
|
3658
3658
|
const addHovered = (element) => {
|
|
@@ -3666,31 +3666,33 @@ const removeHovered = (element) => {
|
|
|
3666
3666
|
}
|
|
3667
3667
|
};
|
|
3668
3668
|
|
|
3669
|
-
const
|
|
3670
|
-
const {
|
|
3671
|
-
let
|
|
3672
|
-
board.
|
|
3673
|
-
|
|
3674
|
-
|
|
3669
|
+
const withNodeHoverHitTest = (board) => {
|
|
3670
|
+
const { pointerMove, pointerLeave } = board;
|
|
3671
|
+
let nodeExtendHoveredRef = null;
|
|
3672
|
+
board.pointerMove = (event) => {
|
|
3673
|
+
throttleRAF(board, 'with-mind-node-hover-hit-test', () => {
|
|
3674
|
+
nodeExtendHoveredRef = pointerMoveHandle(board, event, nodeExtendHoveredRef);
|
|
3675
|
+
});
|
|
3676
|
+
pointerMove(event);
|
|
3675
3677
|
};
|
|
3676
|
-
board.
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3678
|
+
board.pointerLeave = (event) => {
|
|
3679
|
+
pointerLeaveHandle(board, event, nodeExtendHoveredRef);
|
|
3680
|
+
nodeExtendHoveredRef = null;
|
|
3681
|
+
pointerLeave(event);
|
|
3680
3682
|
};
|
|
3681
3683
|
return board;
|
|
3682
3684
|
};
|
|
3683
3685
|
|
|
3684
3686
|
const withNodeImage = (board) => {
|
|
3685
|
-
const {
|
|
3686
|
-
board.
|
|
3687
|
+
const { keyDown, pointerUp, globalPointerUp, setFragment, insertFragment, deleteFragment } = board;
|
|
3688
|
+
board.pointerUp = (event) => {
|
|
3687
3689
|
const elementOfFocusedImage = getElementOfFocusedImage(board);
|
|
3688
|
-
if (
|
|
3690
|
+
if (elementOfFocusedImage &&
|
|
3691
|
+
MindElement.isMindElement(board, elementOfFocusedImage) &&
|
|
3692
|
+
!isContextmenu(event) &&
|
|
3689
3693
|
(PlaitBoard.isReadonly(board) || !isMainPointer(event) || !PlaitBoard.isPointer(board, PlaitPointerType.selection))) {
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
}
|
|
3693
|
-
pointerDown(event);
|
|
3694
|
+
removeImageFocus(board, elementOfFocusedImage);
|
|
3695
|
+
pointerUp(event);
|
|
3694
3696
|
return;
|
|
3695
3697
|
}
|
|
3696
3698
|
const point = toViewBoxPoint(board, toHostPoint(board, event.x, event.y));
|
|
@@ -3701,7 +3703,7 @@ const withNodeImage = (board) => {
|
|
|
3701
3703
|
isHitImage(board, hitElement, point);
|
|
3702
3704
|
if (isHitImageResult && elementOfFocusedImage && hitElement === elementOfFocusedImage) {
|
|
3703
3705
|
temporaryDisableSelection(board);
|
|
3704
|
-
|
|
3706
|
+
pointerUp(event);
|
|
3705
3707
|
return;
|
|
3706
3708
|
}
|
|
3707
3709
|
if (elementOfFocusedImage && MindElement.isMindElement(board, elementOfFocusedImage)) {
|
|
@@ -3711,16 +3713,16 @@ const withNodeImage = (board) => {
|
|
|
3711
3713
|
temporaryDisableSelection(board);
|
|
3712
3714
|
addImageFocus(board, hitElement);
|
|
3713
3715
|
}
|
|
3714
|
-
|
|
3716
|
+
pointerUp(event);
|
|
3715
3717
|
};
|
|
3716
|
-
board.
|
|
3718
|
+
board.keyDown = (event) => {
|
|
3717
3719
|
const selectedImageElement = getElementOfFocusedImage(board);
|
|
3718
3720
|
if (!PlaitBoard.isReadonly(board) && selectedImageElement && (hotkeys.isDeleteBackward(event) || hotkeys.isDeleteForward(event))) {
|
|
3719
3721
|
addSelectedElement(board, selectedImageElement);
|
|
3720
3722
|
MindTransforms.removeImage(board, selectedImageElement);
|
|
3721
3723
|
return;
|
|
3722
3724
|
}
|
|
3723
|
-
|
|
3725
|
+
keyDown(event);
|
|
3724
3726
|
};
|
|
3725
3727
|
board.globalPointerUp = (event) => {
|
|
3726
3728
|
if (PlaitBoard.isFocus(board)) {
|
|
@@ -3781,7 +3783,7 @@ const withNodeResize = (board) => {
|
|
|
3781
3783
|
canResize: () => {
|
|
3782
3784
|
return !isDragging(board);
|
|
3783
3785
|
},
|
|
3784
|
-
|
|
3786
|
+
hitTest: (point) => {
|
|
3785
3787
|
const newTargetElement = getSelectedTarget(board, point);
|
|
3786
3788
|
if (newTargetElement) {
|
|
3787
3789
|
return {
|
|
@@ -3802,7 +3804,7 @@ const withNodeResize = (board) => {
|
|
|
3802
3804
|
},
|
|
3803
3805
|
onResize: (resizeRef, resizeState) => {
|
|
3804
3806
|
const zoom = board.viewport.zoom;
|
|
3805
|
-
let resizedWidth = targetElementRef.currentWidth + resizeState.
|
|
3807
|
+
let resizedWidth = targetElementRef.currentWidth + Point.getOffsetX(resizeState.startPoint, resizeState.endPoint);
|
|
3806
3808
|
if (resizedWidth <= targetElementRef.minWidth) {
|
|
3807
3809
|
resizedWidth = targetElementRef.minWidth;
|
|
3808
3810
|
}
|
|
@@ -3843,7 +3845,7 @@ const withNodeImageResize = (board) => {
|
|
|
3843
3845
|
canResize: () => {
|
|
3844
3846
|
return true;
|
|
3845
3847
|
},
|
|
3846
|
-
|
|
3848
|
+
hitTest: (point) => {
|
|
3847
3849
|
const elementOfFocusedImage = getElementOfFocusedImage(board);
|
|
3848
3850
|
const selectedMindElement = elementOfFocusedImage && MindElement.isMindElement(board, elementOfFocusedImage) ? elementOfFocusedImage : undefined;
|
|
3849
3851
|
if (selectedMindElement) {
|
|
@@ -3859,22 +3861,19 @@ const withNodeImageResize = (board) => {
|
|
|
3859
3861
|
return null;
|
|
3860
3862
|
},
|
|
3861
3863
|
onResize: (resizeRef, resizeState) => {
|
|
3862
|
-
|
|
3863
|
-
let offsetY = resizeState.offsetY;
|
|
3864
|
-
if (resizeRef.handle === ResizeHandle.nw || resizeRef.handle === ResizeHandle.sw) {
|
|
3865
|
-
offsetX = -offsetX;
|
|
3866
|
-
}
|
|
3864
|
+
const offsetX = Point.getOffsetX(resizeState.startPoint, resizeState.endPoint);
|
|
3867
3865
|
const originWidth = resizeRef.element.data.image.width;
|
|
3868
3866
|
const originHeight = resizeRef.element.data.image.height;
|
|
3867
|
+
const path = resizeRef.path;
|
|
3869
3868
|
let width = originWidth + offsetX;
|
|
3870
3869
|
if (width <= 100) {
|
|
3871
3870
|
width = 100;
|
|
3872
3871
|
}
|
|
3873
|
-
const ratio = originWidth /
|
|
3874
|
-
const height =
|
|
3872
|
+
const ratio = originWidth / originHeight;
|
|
3873
|
+
const height = width / ratio;
|
|
3875
3874
|
const imageItem = { ...resizeRef.element.data.image, width, height };
|
|
3876
|
-
MindTransforms.setImage(board, PlaitNode.get(board,
|
|
3877
|
-
addElementOfFocusedImage(board, PlaitNode.get(board,
|
|
3875
|
+
MindTransforms.setImage(board, PlaitNode.get(board, path), imageItem);
|
|
3876
|
+
addElementOfFocusedImage(board, PlaitNode.get(board, path));
|
|
3878
3877
|
}
|
|
3879
3878
|
};
|
|
3880
3879
|
withResize(board, options);
|
|
@@ -4066,7 +4065,7 @@ const getNextSelectedElement = (board, firstLevelElements) => {
|
|
|
4066
4065
|
|
|
4067
4066
|
const withMind = (baseBoard) => {
|
|
4068
4067
|
const board = baseBoard;
|
|
4069
|
-
const { drawElement,
|
|
4068
|
+
const { drawElement, dblClick, isRectangleHit, isHit, getRectangle, isMovable, isRecursion, isAlign, isImageBindingAllowed } = board;
|
|
4070
4069
|
board.drawElement = (context) => {
|
|
4071
4070
|
if (PlaitMind.isMind(context.element)) {
|
|
4072
4071
|
return PlaitMindComponent;
|
|
@@ -4099,7 +4098,7 @@ const withMind = (baseBoard) => {
|
|
|
4099
4098
|
board.isRectangleHit = (element, selection) => {
|
|
4100
4099
|
if (MindElement.isMindElement(board, element)) {
|
|
4101
4100
|
const client = getRectangleByNode(MindElement.getNode(element));
|
|
4102
|
-
const isHit = RectangleClient.isHit(RectangleClient.
|
|
4101
|
+
const isHit = RectangleClient.isHit(RectangleClient.getRectangleByPoints([selection.anchor, selection.focus]), client);
|
|
4103
4102
|
return isHit;
|
|
4104
4103
|
}
|
|
4105
4104
|
return isRectangleHit(element, selection);
|
|
@@ -4107,7 +4106,7 @@ const withMind = (baseBoard) => {
|
|
|
4107
4106
|
board.isHit = (element, point) => {
|
|
4108
4107
|
if (MindElement.isMindElement(board, element)) {
|
|
4109
4108
|
const client = getRectangleByNode(MindElement.getNode(element));
|
|
4110
|
-
const isHit = RectangleClient.isHit(RectangleClient.
|
|
4109
|
+
const isHit = RectangleClient.isHit(RectangleClient.getRectangleByPoints([point, point]), client);
|
|
4111
4110
|
return isHit;
|
|
4112
4111
|
}
|
|
4113
4112
|
return isHit(element, point);
|
|
@@ -4130,9 +4129,9 @@ const withMind = (baseBoard) => {
|
|
|
4130
4129
|
}
|
|
4131
4130
|
return isAlign(element);
|
|
4132
4131
|
};
|
|
4133
|
-
board.
|
|
4132
|
+
board.dblClick = (event) => {
|
|
4134
4133
|
if (PlaitBoard.isReadonly(board)) {
|
|
4135
|
-
|
|
4134
|
+
dblClick(event);
|
|
4136
4135
|
return;
|
|
4137
4136
|
}
|
|
4138
4137
|
const point = toViewBoxPoint(board, toHostPoint(board, event.x, event.y));
|
|
@@ -4148,9 +4147,9 @@ const withMind = (baseBoard) => {
|
|
|
4148
4147
|
if (PlaitBoard.hasBeenTextEditing(board)) {
|
|
4149
4148
|
return;
|
|
4150
4149
|
}
|
|
4151
|
-
|
|
4150
|
+
dblClick(event);
|
|
4152
4151
|
};
|
|
4153
|
-
return withNodeResize(withNodeImageResize(withNodeImage(
|
|
4152
|
+
return withNodeResize(withNodeImageResize(withNodeImage(withNodeHoverHitTest(withMindFragment(withMindHotkey(withMindExtend(withCreateMind(withAbstract(withNodeDnd(board))))))))));
|
|
4154
4153
|
};
|
|
4155
4154
|
|
|
4156
4155
|
class MindEmojiBaseComponent {
|