refactor(editor): remove legacy block service spec slots (#11013)
This commit is contained in:
@@ -43,6 +43,7 @@ import {
|
||||
compareLayer,
|
||||
type GfxBlockElementModel,
|
||||
type GfxCompatibleProps,
|
||||
GfxControllerIdentifier,
|
||||
type GfxModel,
|
||||
type GfxPrimitiveElementModel,
|
||||
type SerializedElement,
|
||||
@@ -406,7 +407,7 @@ export class EdgelessClipboardController extends PageClipboard {
|
||||
}
|
||||
|
||||
private get selectionManager() {
|
||||
return this.host.service.selection;
|
||||
return this.std.get(GfxControllerIdentifier).selection;
|
||||
}
|
||||
|
||||
private get std() {
|
||||
|
||||
@@ -188,11 +188,11 @@ export class EdgelessAutoConnectWidget extends WidgetComponent<RootBlockModel> {
|
||||
}
|
||||
|
||||
private readonly _updateLabels = () => {
|
||||
const service = this.service;
|
||||
if (!service.doc.root) return;
|
||||
|
||||
const doc = this.std.store;
|
||||
const root = doc.root;
|
||||
if (!root) return;
|
||||
const pageVisibleBlocks = new Map<AutoConnectElement, number>();
|
||||
const notes = service.doc.root?.children.filter(child =>
|
||||
const notes = root.children.filter(child =>
|
||||
matchModels(child, [NoteBlockModel])
|
||||
);
|
||||
const edgelessOnlyNotesSet = new Set<NoteBlockModel>();
|
||||
|
||||
@@ -63,9 +63,7 @@ export class AffineScrollAnchoringWidget extends WidgetComponent {
|
||||
|
||||
anchorBounds$ = signal<Bound | null>(null);
|
||||
|
||||
highlighted$ = computed(() =>
|
||||
this.service.selectionManager.find(HighlightSelection)
|
||||
);
|
||||
highlighted$ = computed(() => this.std.selection.find(HighlightSelection));
|
||||
|
||||
#getBoundsInEdgeless() {
|
||||
const controller = this.std.get(GfxControllerIdentifier);
|
||||
|
||||
Reference in New Issue
Block a user