Browse Source

Fixes for ES5 strict mode

v3_develop
jos 10 years ago
parent
commit
090383d462
11 changed files with 50 additions and 46 deletions
  1. +18
    -16
      dist/vis.js
  2. +1
    -1
      dist/vis.map
  3. +14
    -14
      dist/vis.min.js
  4. +2
    -2
      lib/graph3d/Camera.js
  5. +6
    -6
      lib/graph3d/Graph3d.js
  6. +2
    -2
      lib/graph3d/Point2d.js
  7. +2
    -0
      lib/header.js
  8. +1
    -1
      lib/network/Network.js
  9. +1
    -1
      lib/network/dotparser.js
  10. +2
    -2
      lib/network/mixins/NavigationMixin.js
  11. +1
    -1
      lib/timeline/Range.js

+ 18
- 16
dist/vis.js View File

@ -5,7 +5,7 @@
* A dynamic, browser-based visualization library.
*
* @version 3.7.2-SNAPSHOT
* @date 2014-11-28
* @date 2014-12-02
*
* @license
* Copyright (C) 2011-2014 Almende B.V, http://almende.com
@ -23,6 +23,8 @@
* Vis.js may be distributed under either license.
*/
"use strict";
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
@ -3687,9 +3689,9 @@ return /******/ (function(modules) { // webpackBootstrap
}
}
function sortNumber(a, b) {
var sortNumber = function (a, b) {
return a - b;
}
};
dataX.sort(sortNumber);
dataY.sort(sortNumber);
@ -5422,20 +5424,20 @@ return /******/ (function(modules) { // webpackBootstrap
* @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;
@ -5456,7 +5458,7 @@ return /******/ (function(modules) { // webpackBootstrap
* Documentation:
* http://en.wikipedia.org/wiki/3D_projection
*/
Camera = function () {
function Camera() {
this.armLocation = new Point3d();
this.armRotation = {};
this.armRotation.horizontal = 0;
@ -5467,7 +5469,7 @@ return /******/ (function(modules) { // webpackBootstrap
this.cameraRotation = new Point3d(0.5*Math.PI, 0, 0);
this.calculateCameraOrientation();
};
}
/**
* Set the location (origin) of the arm
@ -5813,10 +5815,10 @@ return /******/ (function(modules) { // webpackBootstrap
* @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;
@ -7861,7 +7863,7 @@ return /******/ (function(modules) { // webpackBootstrap
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;
@ -15537,7 +15539,7 @@ return /******/ (function(modules) { // webpackBootstrap
this.hoverObj = {nodes:{},edges:{}};
this.controlNodesActive = false;
this.navigationHammers = {existing:[], new: []};
this.navigationHammers = {existing:[], _new: []};
// animation properties
this.animationSpeed = 1/this.renderRefreshRate;
@ -21180,7 +21182,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @param {Object} dotEdge
* @returns {Object} graphEdge
*/
function convertEdge(dotEdge) {
var convertEdge = function (dotEdge) {
var graphEdge = {
from: dotEdge.from,
to: dotEdge.to
@ -32025,12 +32027,12 @@ return /******/ (function(modules) { // webpackBootstrap
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
dist/vis.map
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;

Loading…
Cancel
Save