typed-mxgraph / typed-mxgraph

mxGraph typescript declarations
https://www.npmjs.com/package/@typed-mxgraph/typed-mxgraph
MIT License
62 stars 24 forks source link

fix: Change mxPopupMenu.addItem parent type to Element #14

Closed burkedavison closed 3 years ago

burkedavison commented 3 years ago

The parent parameter to mxPopupMenu.addItem() is described as: parent - Optional item returned by <addItem>. https://github.com/jgraph/mxgraph/blob/master/javascript/src/js/util/mxPopupMenu.js#L189

The return value type of mxPopupMenu.addItem() is Element.

This change is needed to support submenus as shown in this example: https://github.com/jgraph/mxgraph/blob/master/javascript/examples/touch.html#L113-L118