mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-08 12:45:55 +08:00
fix: block should not be selectable when dragged into note (#10664)
### Changed - Fixed the issue that block can still be selected when dragged into note - Rewrite grid and layer with extension infra
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { EditorHost } from '@blocksuite/affine/block-std';
|
||||
import { LayerManager } from '@blocksuite/affine/block-std/gfx';
|
||||
import { GfxController, LayerManager } from '@blocksuite/affine/block-std/gfx';
|
||||
import {
|
||||
getSurfaceBlock,
|
||||
TemplateJob,
|
||||
@@ -14,9 +14,7 @@ export function createTemplateJob(host: EditorHost) {
|
||||
}
|
||||
|
||||
const middlewares: ((job: TemplateJob) => void)[] = [];
|
||||
const layer = new LayerManager(host.doc, surface, {
|
||||
watch: false,
|
||||
});
|
||||
const layer = new LayerManager(host.std.get(GfxController));
|
||||
const bounds = [...layer.blocks, ...layer.canvasElements].map(i =>
|
||||
Bound.deserialize(i.xywh)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user