diff --git a/HISTORY.md b/HISTORY.md index 4c8558f9..cd0d87d1 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -22,6 +22,7 @@ http://visjs.org - Fixed error in repulsion physics model. - Improved physics handling for smoother network simulation. - Fixed infinite loop when an image can not be found and no brokenImage is provided. +- Added getBoundingBox method. ### Graph2d diff --git a/dist/vis.js b/dist/vis.js index 8717afcd..26449283 100644 --- a/dist/vis.js +++ b/dist/vis.js @@ -25134,6 +25134,13 @@ return /******/ (function(modules) { // webpackBootstrap return this.DOMtoCanvas({x: 0.5 * this.frame.canvas.clientWidth, y: 0.5 * this.frame.canvas.clientHeight}); }; + + Network.prototype.getBoundingBox = function(nodeId) { + if (this.nodes[nodeId] !== undefined) { + return this.nodes[nodeId].boundingBox; + } + } + module.exports = Network; diff --git a/docs/network.html b/docs/network.html index 44d5f400..4d729591 100644 --- a/docs/network.html +++ b/docs/network.html @@ -2155,6 +2155,12 @@ var options = {