fix d3-force debug link messing up svg text elements
This commit is contained in:
@@ -1524,8 +1524,9 @@ function netGobrechtsD3Force(domContainerId, options, apexPluginId, apexPageItem
|
||||
if (!v.status.customize &&
|
||||
(v.conf.debug || document.querySelector("#apex-dev-toolbar") || document.querySelector("#apexDevToolbar"))
|
||||
) {
|
||||
if (document.querySelector("#" + v.dom.containerId + " svg text.link") === null) {
|
||||
if (document.querySelector("#d3-force-customize-link") === null) {
|
||||
v.dom.svg.append("svg:text")
|
||||
.attr("id", "d3-force-customize-link")
|
||||
.attr("class", "link")
|
||||
.attr("x", 5)
|
||||
.attr("y", 15)
|
||||
@@ -1540,7 +1541,7 @@ function netGobrechtsD3Force(domContainerId, options, apexPluginId, apexPageItem
|
||||
|
||||
// remove customize link
|
||||
v.tools.removeCustomizeLink = function() {
|
||||
v.dom.svg.select("#" + v.dom.containerId + " svg text.link").remove();
|
||||
v.dom.svg.select("#d3-force-customize-link").remove();
|
||||
};
|
||||
|
||||
// dragability for customizing container
|
||||
|
||||
@@ -27,7 +27,7 @@ function resizeGraphContainer() {
|
||||
graph.width( parseInt(netmap_pane.parent().css('width')) ).resume();
|
||||
graph.height( window.innerHeight - 100 ).resume();
|
||||
d3.select("#nd2_netmap-spinner-container").attr("transform",
|
||||
"translate(" + (graph.width() - 16) + "," + (graph.height() - 16) + ")")
|
||||
"translate(" + (graph.width() - 15) + "," + (graph.height() - 15) + ")")
|
||||
}, 500)
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ $.getJSON('[% uri_for('/ajax/data/device/netmap') %]?[% my_query %]', function(m
|
||||
.maxNodeRadius(14)
|
||||
.minZoomFactor(0.1)
|
||||
.maxZoomFactor(10)
|
||||
.charge(-900)
|
||||
.charge(-550)
|
||||
.gravity(0.3);
|
||||
|
||||
graph['nd2'] = {};
|
||||
@@ -169,7 +169,7 @@ $.getJSON('[% uri_for('/ajax/data/device/netmap') %]?[% my_query %]', function(m
|
||||
graph.inspect().dom.svg
|
||||
.append("g")
|
||||
.attr("id", "nd2_netmap-spinner-container")
|
||||
.attr("transform", "translate(" + (graph.width() - 16) + "," + (graph.height() - 16) + ")")
|
||||
.attr("transform", "translate(" + (graph.width() - 15) + "," + (graph.height() - 15) + ")")
|
||||
.append("path")
|
||||
.attr("id", "nd2_netmap-spinner");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user