Hello
I am trying to extend PopupMenuHandler and override .factoryMethod.
Currently, the signature is .factoryMethod(handler: PopupMenuItem, cell: Cell | null, me: MouseEvent) => void. However, based on everything I can gather, handler should have the type PopupMenuHandler.
My code is below, I am using the latest build.
import { Cell, Graph, PopupMenuHandler, PopupMenuItem } from "@maxgraph/core";
export default class CustomPopupMenuHandler extends PopupMenuHandler {
constructor(graph: Graph) {
super(graph);
this.addItem("Delete", null, function (){});
// @ts-ignore
this.factoryMethod = (handler: CustomPopupMenuHandler, cell: Cell, me: MouseEvent) => {
console.log(handler)
}
}
}
Thank you,
Eldon
Hello
I am trying to extend
PopupMenuHandlerand override.factoryMethod.Currently, the signature is
.factoryMethod(handler: PopupMenuItem, cell: Cell | null, me: MouseEvent) => void. However, based on everything I can gather,handlershould have the typePopupMenuHandler.My code is below, I am using the latest build.
Thank you,
Eldon