feat add jump shapes

This commit is contained in:
DiamondThree
2022-08-19 20:06:44 +08:00
parent f29ad0f840
commit 27a35ea6a2
5 changed files with 97 additions and 12 deletions
@@ -15,13 +15,13 @@ import {
TLPointerEventHandler,
TLShapeCloneHandler,
TLWheelEventHandler,
Utils
Utils,
} from '@tldraw/core';
import { Vec } from '@tldraw/vec';
import {
clearPrevSize,
defaultStyle,
shapeUtils
shapeUtils,
} from '@toeverything/components/board-shapes';
import {
AlignType,
@@ -54,7 +54,7 @@ import {
TDUser,
TldrawCommand,
USER_COLORS,
VIDEO_EXTENSIONS
VIDEO_EXTENSIONS,
} from '@toeverything/components/board-types';
import { MIN_PAGE_WIDTH } from '@toeverything/components/editor-core';
import {
@@ -67,7 +67,7 @@ import {
migrate,
openAssetFromFileSystem,
openFromFileSystem,
saveToFileSystem
saveToFileSystem,
} from './data';
import { getClipboard, setClipboard } from './idb-clipboard';
import { StateManager } from './manager/state-manager';
@@ -865,9 +865,8 @@ export class TldrawApp extends StateManager<TDSnapshot> {
return;
}
// We only need to update the binding's "from" shape (an arrow)
const fromDelta = TLDR.update_arrow_bindings(page, fromShape);
visitedShapes.add(fromShape);