wrap onChange to see when the ribbon says something moved
This commit is contained in:
1 parent
aa62f35cbd
commit
4587612495
1 file changed
+6
-1
@@ -4,7 +4,12 @@ module.exports = class RibbonOrderLock extends Plugin {
|
||||
async onload() {
|
||||
this.app.workspace.onLayoutReady(() => {
|
||||
const ribbon = this.app.workspace.leftRibbon;
|
||||
console.log(ribbon.items.map((item) => item.id));
|
||||
const original = ribbon.onChange.bind(ribbon);
|
||||
|
||||
ribbon.onChange = (save) => {
|
||||
original(save);
|
||||
console.log('onChange', save, ribbon.items.map((item) => item.id));
|
||||
};
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user