revert to http

This commit is contained in:
nothingismagick 2019-09-23 12:04:39 +02:00 committed by GitHub
parent f30f607b0c
commit 7ca13fd163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -83,13 +83,13 @@ export const addVertices = function(vert, g, svgId) {
vertexNode = addHtmlLabel(svg, node).node();
vertexNode.parentNode.removeChild(vertexNode);
} else {
const svgLabel = document.createElementNS('https://www.w3.org/2000/svg', 'text');
const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');
const rows = vertexText.split(/<br[/]{0,1}>/);
for (let j = 0; j < rows.length; j++) {
const tspan = document.createElementNS('https://www.w3.org/2000/svg', 'tspan');
tspan.setAttributeNS('https://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');
tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
tspan.setAttribute('dy', '1em');
tspan.setAttribute('x', '1');
tspan.textContent = rows[j];
@ -100,9 +100,9 @@ export const addVertices = function(vert, g, svgId) {
// If the node has a link, we wrap it in a SVG link
if (vertex.link) {
const link = document.createElementNS('https://www.w3.org/2000/svg', 'a');
link.setAttributeNS('https://www.w3.org/2000/svg', 'href', vertex.link);
link.setAttributeNS('https://www.w3.org/2000/svg', 'rel', 'noopener');
const link = document.createElementNS('http://www.w3.org/2000/svg', 'a');
link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);
link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');
link.appendChild(vertexNode);
vertexNode = link;
}
@ -609,7 +609,7 @@ export const draw = function(text, id) {
// Get dimensions of label
const dim = label.getBBox();
const rect = document.createElementNS('https://www.w3.org/2000/svg', 'rect');
const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
rect.setAttribute('rx', 0);
rect.setAttribute('ry', 0);
rect.setAttribute('width', dim.width);