Browse Source

Merge remote-tracking branch 'origin/develop' into develop

Conflicts:
	dist/vis.js
v3_develop
Alex de Mulder 10 years ago
parent
commit
eed0edd5d3
20 changed files with 999 additions and 895 deletions
  1. +1
    -0
      .gitignore
  2. +8
    -3
      HISTORY.md
  3. +1
    -1
      bower.json
  4. +1
    -1
      dist/vis.css
  5. +939
    -851
      dist/vis.js
  6. +1
    -1
      dist/vis.map
  7. +1
    -1
      dist/vis.min.css
  8. +14
    -14
      dist/vis.min.js
  9. +2
    -2
      lib/graph3d/Camera.js
  10. +6
    -6
      lib/graph3d/Graph3d.js
  11. +2
    -2
      lib/graph3d/Point2d.js
  12. +2
    -0
      lib/header.js
  13. +1
    -1
      lib/network/Network.js
  14. +1
    -1
      lib/network/dotparser.js
  15. +2
    -2
      lib/network/mixins/NavigationMixin.js
  16. +1
    -1
      lib/timeline/Range.js
  17. +1
    -1
      lib/timeline/component/css/item.css
  18. +13
    -5
      lib/timeline/component/item/RangeItem.js
  19. +1
    -1
      package.json
  20. +1
    -1
      test/timeline.html

+ 1
- 0
.gitignore View File

@ -1,4 +1,5 @@
.idea
.c9
*.iml
node_modules
.project

+ 8
- 3
HISTORY.md View File

@ -2,7 +2,12 @@
http://visjs.org
## not yet released, version 3.7.1
## not yet released, version 3.7.2-SNAPSHOT
## 2014-11-28, version 3.7.1
### Timeline
@ -19,14 +24,14 @@ http://visjs.org
- Added `alignZeros` option to dataAxis with default value true.
- Fixed bug with points drawn on bargraphs
- Fixed docs
- Fixed height increase on scolling if only graphHeight is defined.
- Fixed height increase on scrolling if only `graphHeight` is defined.
### Network
- dragEnd event now does not give the selected nodes if only the viewport has been dragged #453
- merged high DPI fix by @crubier, thanks!
## 2014-11-14, version 3.7.0
### Graph2D

+ 1
- 1
bower.json View File

@ -1,6 +1,6 @@
{
"name": "vis",
"version": "3.7.1-SNAPSHOT",
"version": "3.7.2-SNAPSHOT",
"main": ["dist/vis.min.js", "dist/vis.min.css"],
"description": "A dynamic, browser-based visualization library.",
"homepage": "http://visjs.org/",

+ 1
- 1
dist/vis.css View File

@ -214,7 +214,6 @@
border-style: solid;
border-radius: 2px;
box-sizing: border-box;
overflow: hidden;
}
.vis.timeline .item.background {
@ -229,6 +228,7 @@
.vis.timeline .item.range .content {
position: relative;
display: inline-block;
max-width: 100%;
overflow: hidden;
}

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


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


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


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


+ 2
- 2
lib/graph3d/Camera.js View File

@ -10,7 +10,7 @@ var Point3d = require('./Point3d');
* Documentation:
* http://en.wikipedia.org/wiki/3D_projection
*/
Camera = function () {
function Camera() {
this.armLocation = new Point3d();
this.armRotation = {};
this.armRotation.horizontal = 0;
@ -21,7 +21,7 @@ Camera = function () {
this.cameraRotation = new Point3d(0.5*Math.PI, 0, 0);
this.calculateCameraOrientation();
};
}
/**
* Set the location (origin) of the arm

+ 6
- 6
lib/graph3d/Graph3d.js View File

@ -525,9 +525,9 @@ Graph3d.prototype._getDataPoints = function (data) {
}
}
function sortNumber(a, b) {
var sortNumber = function (a, b) {
return a - b;
}
};
dataX.sort(sortNumber);
dataY.sort(sortNumber);
@ -2260,19 +2260,19 @@ Graph3d.prototype._hideTooltip = function () {
* @param {Event} event
* @return {Number} mouse x
*/
getMouseX = function(event) {
function getMouseX (event) {
if ('clientX' in event) return event.clientX;
return event.targetTouches[0] && event.targetTouches[0].clientX || 0;
};
}
/**
* Get the vertical mouse position from a mouse event
* @param {Event} event
* @return {Number} mouse y
*/
getMouseY = function(event) {
function getMouseY (event) {
if ('clientY' in event) return event.clientY;
return event.targetTouches[0] && event.targetTouches[0].clientY || 0;
};
}
module.exports = Graph3d;

+ 2
- 2
lib/graph3d/Point2d.js View File

@ -3,9 +3,9 @@
* @param {Number} [x]
* @param {Number} [y]
*/
Point2d = function (x, y) {
function Point2d (x, y) {
this.x = x !== undefined ? x : 0;
this.y = y !== undefined ? y : 0;
};
}
module.exports = Point2d;

+ 2
- 0
lib/header.js View File

@ -22,3 +22,5 @@
*
* Vis.js may be distributed under either license.
*/
"use strict";

+ 1
- 1
lib/network/Network.js View File

@ -219,7 +219,7 @@ function Network (container, data, options) {
this.hoverObj = {nodes:{},edges:{}};
this.controlNodesActive = false;
this.navigationHammers = {existing:[], new: []};
this.navigationHammers = {existing:[], _new: []};
// animation properties
this.animationSpeed = 1/this.renderRefreshRate;

+ 1
- 1
lib/network/dotparser.js View File

@ -761,7 +761,7 @@ function DOTToGraph (data) {
* @param {Object} dotEdge
* @returns {Object} graphEdge
*/
function convertEdge(dotEdge) {
var convertEdge = function (dotEdge) {
var graphEdge = {
from: dotEdge.from,
to: dotEdge.to

+ 2
- 2
lib/network/mixins/NavigationMixin.js View File

@ -43,12 +43,12 @@ exports._loadNavigationElements = function() {
var hammer = Hammer(this.navigationDivs[navigationDivs[i]], {prevent_default: true});
hammer.on('touch', this[navigationDivActions[i]].bind(this));
this.navigationHammers.new.push(hammer);
this.navigationHammers._new.push(hammer);
}
this._navigationReleaseOverload = this._stopMovement;
this.navigationHammers.existing = this.navigationHammers.new;
this.navigationHammers.existing = this.navigationHammers._new;
};

+ 1
- 1
lib/timeline/Range.js View File

@ -127,7 +127,7 @@ Range.prototype.setRange = function(start, end, animate) {
var initTime = new Date().valueOf();
var anyChanged = false;
function next() {
var next = function () {
if (!me.props.touch.dragging) {
var now = new Date().valueOf();
var time = now - initTime;

+ 1
- 1
lib/timeline/component/css/item.css View File

@ -47,7 +47,6 @@
border-style: solid;
border-radius: 2px;
box-sizing: border-box;
overflow: hidden;
}
.vis.timeline .item.background {
@ -62,6 +61,7 @@
.vis.timeline .item.range .content {
position: relative;
display: inline-block;
max-width: 100%;
overflow: hidden;
}

+ 13
- 5
lib/timeline/component/item/RangeItem.js View File

@ -103,8 +103,12 @@ RangeItem.prototype.redraw = function() {
this.overflow = window.getComputedStyle(dom.content).overflow !== 'hidden';
// recalculate size
// turn off max-width to be able to calculate the real width
// this causes an extra browser repaint/reflow, but so be it
this.dom.content.style.maxWidth = 'none';
this.props.content.width = this.dom.content.offsetWidth;
this.height = this.dom.box.offsetHeight;
this.dom.content.style.maxWidth = '';
this.dirty = false;
}
@ -175,7 +179,7 @@ RangeItem.prototype.repositionX = function() {
else {
this.left = start;
this.width = boxWidth;
contentWidth = Math.min(end - start, this.props.content.width);
contentWidth = Math.min(end - start - 2 * this.options.padding, this.props.content.width);
}
this.dom.box.style.left = this.left + 'px';
@ -195,15 +199,19 @@ RangeItem.prototype.repositionX = function() {
break;
default: // 'auto'
// when range exceeds left of the window, position the contents at the left of the visible area
if (this.overflow) {
// when range exceeds left of the window, position the contents at the left of the visible area
contentLeft = Math.max(-start, 0);
if (end > 0) {
contentLeft = Math.max(-start, 0);
}
else {
contentLeft = -contentWidth; // ensure it's not visible anymore
}
}
else {
// when range exceeds left of the window, position the contents at the left of the visible area
if (start < 0) {
contentLeft = Math.min(-start,
(end - start - this.props.content.width - 2 * this.options.padding));
(end - start - contentWidth - 2 * this.options.padding));
// TODO: remove the need for options.padding. it's terrible.
}
else {

+ 1
- 1
package.json View File

@ -1,6 +1,6 @@
{
"name": "vis",
"version": "3.7.1-SNAPSHOT",
"version": "3.7.2-SNAPSHOT",
"description": "A dynamic, browser-based visualization library.",
"homepage": "http://visjs.org/",
"repository": {

+ 1
- 1
test/timeline.html View File

@ -75,7 +75,7 @@
'<div onclick="alert(\'you clicked a div\'); ">Click here! (div)</div>', start: now.clone().add(-2, 'days').toDate() },
{_id: 3, content: 'item 3', start: now.clone().add(2, 'days').toDate(), style: 'color: red;'},
{
_id: 4, content: 'item 4 ',
_id: 4, content: 'item 4 foo bar foo bar foo bar foo bar foo bar',
start: now.clone().add(0, 'days').toDate(),
end: now.clone().add(7, 'days').toDate(),
title: 'hello title!'

Loading…
Cancel
Save