forked from jgraph/mxgraph
-
Notifications
You must be signed in to change notification settings - Fork 198
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working