Browse Source

Fixed #200: unable to select a node after scrolling

v3_develop
jos 10 years ago
parent
commit
f5a7c7d2c3
5 changed files with 22 additions and 58 deletions
  1. +5
    -1
      HISTORY.md
  2. +3
    -23
      dist/vis.js
  3. +1
    -1
      dist/vis.map
  4. +11
    -11
      dist/vis.min.js
  5. +2
    -22
      lib/util.js

+ 5
- 1
HISTORY.md View File

@ -12,9 +12,12 @@ http://visjs.org
allows to specify different margins horizontally/vertically. allows to specify different margins horizontally/vertically.
- Removed check for number of arguments in callbacks `onAdd`, `onUpdate`, - Removed check for number of arguments in callbacks `onAdd`, `onUpdate`,
`onRemove`, and `onMove`. `onRemove`, and `onMove`.
- Refactored the code to commonjs modules, which are browserifyable. This allows
to create custom bundles.
- Fixed items in groups sometimes being displayed but not positioned correctly. - Fixed items in groups sometimes being displayed but not positioned correctly.
- Fixed range where the `end` of the first is equal to the `start` of the second - Fixed range where the `end` of the first is equal to the `start` of the second
sometimes being stacked instead of put besides each other when `item.margin=0`.
sometimes being stacked instead of put besides each other when `item.margin=0`
due to round-off errors.
### Network (formerly named Graph) ### Network (formerly named Graph)
@ -31,6 +34,7 @@ http://visjs.org
- Fixed recursively constructing of hierarchical layouts. - Fixed recursively constructing of hierarchical layouts.
- Added borderWidth option for nodes. - Added borderWidth option for nodes.
- Implemented new Hierarchical view solver. - Implemented new Hierarchical view solver.
- Fixed an issue with selecting nodes when the web page is scrolled down.

+ 3
- 23
dist/vis.js View File

@ -5,7 +5,7 @@
* A dynamic, browser-based visualization library. * A dynamic, browser-based visualization library.
* *
* @version 3.0.1-SNAPSHOT * @version 3.0.1-SNAPSHOT
* @date 2014-07-18
* @date 2014-07-21
* *
* @license * @license
* Copyright (C) 2011-2014 Almende B.V, http://almende.com * Copyright (C) 2011-2014 Almende B.V, http://almende.com
@ -561,17 +561,7 @@ return /******/ (function(modules) { // webpackBootstrap
* in the browser page. * in the browser page.
*/ */
exports.getAbsoluteLeft = function(elem) { exports.getAbsoluteLeft = function(elem) {
var doc = document.documentElement;
var body = document.body;
var left = elem.offsetLeft;
var e = elem.offsetParent;
while (e != null && e != body && e != doc) {
left += e.offsetLeft;
left -= e.scrollLeft;
e = e.offsetParent;
}
return left;
return elem.getBoundingClientRect().left + window.pageXOffset;
}; };
/** /**
@ -581,17 +571,7 @@ return /******/ (function(modules) { // webpackBootstrap
* in the browser page. * in the browser page.
*/ */
exports.getAbsoluteTop = function(elem) { exports.getAbsoluteTop = function(elem) {
var doc = document.documentElement;
var body = document.body;
var top = elem.offsetTop;
var e = elem.offsetParent;
while (e != null && e != body && e != doc) {
top += e.offsetTop;
top -= e.scrollTop;
e = e.offsetParent;
}
return top;
return elem.getBoundingClientRect().top + window.pageYOffset;
}; };
/** /**

+ 1
- 1
dist/vis.map
File diff suppressed because it is too large
View File


+ 11
- 11
dist/vis.min.js
File diff suppressed because it is too large
View File


+ 2
- 22
lib/util.js View File

@ -418,17 +418,7 @@ exports.getType = function(object) {
* in the browser page. * in the browser page.
*/ */
exports.getAbsoluteLeft = function(elem) { exports.getAbsoluteLeft = function(elem) {
var doc = document.documentElement;
var body = document.body;
var left = elem.offsetLeft;
var e = elem.offsetParent;
while (e != null && e != body && e != doc) {
left += e.offsetLeft;
left -= e.scrollLeft;
e = e.offsetParent;
}
return left;
return elem.getBoundingClientRect().left + window.pageXOffset;
}; };
/** /**
@ -438,17 +428,7 @@ exports.getAbsoluteLeft = function(elem) {
* in the browser page. * in the browser page.
*/ */
exports.getAbsoluteTop = function(elem) { exports.getAbsoluteTop = function(elem) {
var doc = document.documentElement;
var body = document.body;
var top = elem.offsetTop;
var e = elem.offsetParent;
while (e != null && e != body && e != doc) {
top += e.offsetTop;
top -= e.scrollTop;
e = e.offsetParent;
}
return top;
return elem.getBoundingClientRect().top + window.pageYOffset;
}; };
/** /**

Loading…
Cancel
Save