mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 18:26:05 +08:00
refactor(editor): remove selection global types (#9532)
Closes: [BS-2217](https://linear.app/affine-design/issue/BS-2217/remove-global-types-in-selection)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { CaptionedBlockComponent } from '@blocksuite/affine-components/caption';
|
||||
import { createLitPortal } from '@blocksuite/affine-components/portal';
|
||||
import type { LatexBlockModel } from '@blocksuite/affine-model';
|
||||
import { BlockSelection } from '@blocksuite/block-std';
|
||||
import type { Placement } from '@floating-ui/dom';
|
||||
import { effect } from '@preact/signals-core';
|
||||
import katex from 'katex';
|
||||
@@ -19,7 +20,7 @@ export class LatexBlockComponent extends CaptionedBlockComponent<LatexBlockModel
|
||||
}
|
||||
|
||||
get isBlockSelected() {
|
||||
const blockSelection = this.selection.filter('block');
|
||||
const blockSelection = this.selection.filter(BlockSelection);
|
||||
return blockSelection.some(
|
||||
selection => selection.blockId === this.model.id
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user