mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 16:19:43 +08:00
feat(editor): improve select perf (#15353)
maybe fix #12675 #### PR Dependency Tree * **PR #15353** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved block selection updates so selected states refresh reliably. - Corrected selected-block ordering and duplicate handling. - Improved toolbar positioning accuracy and reduced unnecessary layout recalculations. - Adjusted toolbar animation behavior for surface-based tools. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { ThemeProvider } from '@blocksuite/affine-shared/services';
|
||||
import { watch } from '@blocksuite/global/lit';
|
||||
import { BlockComponent, type BlockService } from '@blocksuite/std';
|
||||
import type { BlockModel } from '@blocksuite/store';
|
||||
import { html, nothing } from 'lit';
|
||||
@@ -59,7 +60,7 @@ export class CaptionedBlockComponent<
|
||||
: nothing}
|
||||
${this.selectedStyle === SelectedStyle.Background
|
||||
? html`<affine-block-selection
|
||||
.selected=${this.selected$.value}
|
||||
.selected=${watch(this.selected$)}
|
||||
></affine-block-selection>`
|
||||
: null}
|
||||
${this.useZeroWidth && !this.store.readonly
|
||||
|
||||
Reference in New Issue
Block a user