mirror of
https://github.com/kotaindah55/extended-markdown-syntax.git
synced 2026-07-22 12:00:23 +00:00
feat: cache last selected item when provided
This commit is contained in:
parent
eca8b359f2
commit
bb47d81e7a
1 changed files with 3 additions and 1 deletions
|
|
@ -55,7 +55,8 @@ export class ColorMenu extends Menu {
|
|||
});
|
||||
});
|
||||
}
|
||||
showMenu() {
|
||||
showMenu(offset?: number) {
|
||||
this.checkItemIndexCache();
|
||||
this.view.requestMeasure({
|
||||
read: (view) => {
|
||||
let app = view.state.facet(appFacet.reader),
|
||||
|
|
@ -72,6 +73,7 @@ export class ColorMenu extends Menu {
|
|||
menuCoords.y += canvasNodeCoords.y;
|
||||
}
|
||||
this.showAtPosition(menuCoords);
|
||||
this.select(this.itemIndexCache.number);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue