jgraph / mxgraph

mxGraph is a fully client side JavaScript diagramming library
Other
6.79k stars 2.06k forks source link

Feature request: DOM isolation #5

Closed denis60111 closed 12 years ago

denis60111 commented 12 years ago

#413849085 Application: diagram.ly, mxGraph JS 1.10.0.5

All DOM elements created by the library should be children of an element provided by API user. Small modifications in mxPopupMenu, mxGraph, mxPanningElementHandler are required.

alderg commented 12 years ago

mxGraph should not create anything outside of the given container. mxPopupMenu will add this.div to the document.body, but this can be changed by overriding mxPopupMenu.prototype.showMenu. mxPanningElementHandler is not one of our classes.

denis60111 commented 12 years ago

You're absolutely right about mxGraph (it adds everything to given element's children), and mxPanningElementHandler (yes, mixed this up, this is on of our classes).

There is still a problem with mxPopupMenu. Normally one will want to override it due to DOM and CSS scoping practices, so why it should not be done in library?

And another class that was not mentioned is mxTooltipHandler, it creates div.mxTooltip in document.body.

denis60111 commented 12 years ago

Any update on this?

davidjgraph commented 12 years ago

This is not a core feature, it has been rejected as a feature request.

denis60111 commented 12 years ago

Could you please close the issue here at Github, if it was rejected as a feature request?