mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-18 08:01:37 +03:00
fix(whiteboard): disable editor rotation
This commit is contained in:
parent
fdc9a17f46
commit
c4e39980c6
@ -6,6 +6,7 @@ import {
|
|||||||
TldrawPatch,
|
TldrawPatch,
|
||||||
TDShape,
|
TDShape,
|
||||||
TDStatus,
|
TDStatus,
|
||||||
|
TDShapeType,
|
||||||
} from '@toeverything/components/board-types';
|
} from '@toeverything/components/board-types';
|
||||||
import { TLDR } from '@toeverything/components/board-state';
|
import { TLDR } from '@toeverything/components/board-state';
|
||||||
import { BaseSession } from './base-session';
|
import { BaseSession } from './base-session';
|
||||||
@ -75,6 +76,10 @@ export class RotateSession extends BaseSession {
|
|||||||
app: { currentPageId, currentPoint, shiftKey },
|
app: { currentPageId, currentPoint, shiftKey },
|
||||||
} = this;
|
} = this;
|
||||||
|
|
||||||
|
const filteredShapes = initialShapes.filter(
|
||||||
|
shape => shape.shape.type !== TDShapeType.Editor
|
||||||
|
);
|
||||||
|
|
||||||
const shapes: Record<string, Partial<TDShape>> = {};
|
const shapes: Record<string, Partial<TDShape>> = {};
|
||||||
|
|
||||||
let directionDelta =
|
let directionDelta =
|
||||||
@ -85,7 +90,7 @@ export class RotateSession extends BaseSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update the shapes
|
// Update the shapes
|
||||||
initialShapes.forEach(({ center, shape }) => {
|
filteredShapes.forEach(({ center, shape }) => {
|
||||||
const { rotation = 0 } = shape;
|
const { rotation = 0 } = shape;
|
||||||
let shapeDelta = 0;
|
let shapeDelta = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user