mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 10:36:22 +08:00
fix:shapaes bidings error
This commit is contained in:
@@ -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';
|
||||
@@ -440,7 +440,6 @@ export class TldrawApp extends StateManager<TDSnapshot> {
|
||||
if (visitedShapes.has(fromShape)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We only need to update the binding's "from" shape (an arrow)
|
||||
const fromDelta = TLDR.update_arrow_bindings(
|
||||
page,
|
||||
@@ -856,14 +855,15 @@ export class TldrawApp extends StateManager<TDSnapshot> {
|
||||
if (!page.bindings[binding.id]) {
|
||||
return;
|
||||
}
|
||||
|
||||
const fromShape = page.shapes[binding.fromId] as ArrowShape;
|
||||
|
||||
if (visitedShapes.has(fromShape)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// We only need to update the binding's "from" shape (an arrow)
|
||||
|
||||
const fromDelta = TLDR.update_arrow_bindings(page, fromShape);
|
||||
visitedShapes.add(fromShape);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user