Vanessa 2022-08-02 11:13:11 +08:00
parent 7881d97e84
commit 0e23e2c04b
12 changed files with 39 additions and 53 deletions

View file

@ -66,9 +66,9 @@ export class Menu {
this.element.append(element);
}
public popup(options: { x: number, y: number }) {
public popup(options: { x: number, y: number, h?: number }, isLeft = false) {
this.element.classList.remove("fn__none");
setPosition(this.element, options.x, options.y);
setPosition(this.element, options.x - (isLeft ? window.siyuan.menus.menu.element.clientWidth : 0), options.y, options.h);
}
}