Yes, I can do that, but at the moment my code has one, I hope the last, bug.
The script supports the marking of nodes, arcs, anotations, ect with:
var markNewLT = null, markNewLB = null, markNewRT = null, markNewRB = null;
var markOldLT = null, markOldLB = null, markOldRT = null, markOldRB = null;
// event handler
eventBus.on('element.click', function(e) {
// elemente markieren begin
markOldLT = markNewLT;
markOldLB = markNewLB;
markOldRT = markNewRT;
markOldRB = markNewRB;
if(markOldLT != null) { overlays.remove(markOldLT); }
if(markOldLB != null) { overlays.remove(markOldLB); }
if(markOldRT != null) { overlays.remove(markOldRT); }
if(markOldRB != null) { overlays.remove(markOldRB); }
markNewLT = overlays.add(e.element.id, 'note', {
position: { top: 0, left: 0 },
html: '<div style="width: 10px; height: 10px; background: red;"></div>'
});
markNewLB = overlays.add(e.element.id, 'note', {
position: { bottom: 0, left: 0 },
html: '<div style="width: 10px; height: 10px; background: red;"></div>'
});
markNewRT = overlays.add(e.element.id, 'note', {
position: { top: 0, right: 0 },
html: '<div style="width: 10px; height: 10px; background: red;"></div>'
});
markNewRB = overlays.add(e.element.id, 'note', {
position: { bottom: 0, right: 0 },
html: '<div style="width: 10px; height: 10px; background: red;"></div>'
});
// elemente markieren end
This works well in the firefox browser, but in my JavaFX application nodes, anotations, swimlines, ect. are marked, but no arcs. I think the reason is, that an arc is a line and has either no width or no height. I assume by rendering the diagram in JavaFX it can not detect objects with no width or no height. To check this, please send me the a link to the code where the detecting is managed.
Thanks, Christian