diff --git a/__snapshots__/test/package.test.ts.js b/__snapshots__/test/package.test.ts.js index 7d1215bea2..26bd999844 100644 --- a/__snapshots__/test/package.test.ts.js +++ b/__snapshots__/test/package.test.ts.js @@ -63,10 +63,6 @@ exports['Package Exported files 1'] = { " declarations/network/options.d.ts.map", " declarations/network/shapes.d.ts", " declarations/network/shapes.d.ts.map", - " declarations/shared/configurator-types.d.ts", - " declarations/shared/configurator-types.d.ts.map", - " declarations/shared/index.d.ts", - " declarations/shared/index.d.ts.map", " dist/dist/vis-network.css", " dist/dist/vis-network.min.css", " dist/img/network/acceptDeleteIcon.png", @@ -142,10 +138,6 @@ exports['Package Exported files 1'] = { " dist/types/network/options.d.ts.map", " dist/types/network/shapes.d.ts", " dist/types/network/shapes.d.ts.map", - " dist/types/shared/configurator-types.d.ts", - " dist/types/shared/configurator-types.d.ts.map", - " dist/types/shared/index.d.ts", - " dist/types/shared/index.d.ts.map", " dist/vis-network.esm.js", " dist/vis-network.esm.js.map", " dist/vis-network.esm.min.js", diff --git a/examples/network/other/popups.html b/examples/network/other/popups.html new file mode 100644 index 0000000000..d90eaa4da0 --- /dev/null +++ b/examples/network/other/popups.html @@ -0,0 +1,169 @@ + + +
+ +Both nodes and edges can have popup shown when hovered by a cursor.
+ +It is possible to use plain text:
+
+const nodes = [{
+ id: 1,
+ title: "Popup text",
+}];
+
+
+ Alternatively an element can be supplied:
+
+const element = document.createElement("div");
+// Add child nodes, change styles…
+
+const nodes = [{
+ id: 1,
+ title: element,
+}];
+
+
+ + In the past the popup was filled using innerHTML. It is still possible + to achieve similar behavior via an element. +
+
+function createHTMLTitle(html) {
+ var element = document.createElement("div");
+ element.innerHTML = html;
+ return element;
+}
+
+ + Keep in mind though that this can lead to XSS attacks: + +
+