Browse Source

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

flowchartTest
Alex de Mulder 9 years ago
parent
commit
2d7a1b2a1f
55 changed files with 16 additions and 201 deletions
  1. +3
    -1
      lib/module/hammer.js
  2. +0
    -4
      lib/network/modules/CanvasRenderer.js
  3. +1
    -5
      lib/network/modules/Clustering.js
  4. +0
    -5
      lib/network/modules/ConfigurationSystem.js
  5. +0
    -5
      lib/network/modules/EdgesHandler.js
  6. +0
    -5
      lib/network/modules/InteractionHandler.js
  7. +0
    -4
      lib/network/modules/LayoutEngine.js
  8. +0
    -4
      lib/network/modules/NodesHandler.js
  9. +0
    -4
      lib/network/modules/PhysicsEngine.js
  10. +0
    -4
      lib/network/modules/SelectionHandler.js
  11. +0
    -4
      lib/network/modules/View.js
  12. +0
    -4
      lib/network/modules/components/ColorPicker.js
  13. +2
    -2
      lib/network/modules/components/Edge.js
  14. +5
    -5
      lib/network/modules/components/Popup.js
  15. +0
    -4
      lib/network/modules/components/edges/BezierEdgeDynamic.js
  16. +0
    -4
      lib/network/modules/components/edges/BezierEdgeStatic.js
  17. +0
    -4
      lib/network/modules/components/edges/StraightEdge.js
  18. +0
    -4
      lib/network/modules/components/edges/util/BezierEdgeBase.js
  19. +0
    -3
      lib/network/modules/components/edges/util/EdgeBase.js
  20. +0
    -0
      lib/network/modules/components/nodes/Cluster.js
  21. +0
    -3
      lib/network/modules/components/nodes/shapes/Box.js
  22. +0
    -3
      lib/network/modules/components/nodes/shapes/Circle.js
  23. +0
    -3
      lib/network/modules/components/nodes/shapes/CircularImage.js
  24. +0
    -3
      lib/network/modules/components/nodes/shapes/Database.js
  25. +0
    -3
      lib/network/modules/components/nodes/shapes/Diamond.js
  26. +0
    -3
      lib/network/modules/components/nodes/shapes/Dot.js
  27. +0
    -3
      lib/network/modules/components/nodes/shapes/Ellipse.js
  28. +0
    -3
      lib/network/modules/components/nodes/shapes/Empty.js
  29. +0
    -3
      lib/network/modules/components/nodes/shapes/Icon.js
  30. +0
    -3
      lib/network/modules/components/nodes/shapes/Image.js
  31. +0
    -3
      lib/network/modules/components/nodes/shapes/Square.js
  32. +0
    -3
      lib/network/modules/components/nodes/shapes/Star.js
  33. +0
    -3
      lib/network/modules/components/nodes/shapes/Text.js
  34. +0
    -3
      lib/network/modules/components/nodes/shapes/Triangle.js
  35. +0
    -3
      lib/network/modules/components/nodes/shapes/TriangleDown.js
  36. +0
    -3
      lib/network/modules/components/nodes/util/CircleImageBase.js
  37. +0
    -4
      lib/network/modules/components/nodes/util/NodeBase.js
  38. +0
    -3
      lib/network/modules/components/nodes/util/ShapeBase.js
  39. +0
    -4
      lib/network/modules/components/physics/BarnesHutSolver.js
  40. +0
    -4
      lib/network/modules/components/physics/CentralGravitySolver.js
  41. +0
    -4
      lib/network/modules/components/physics/HierarchicalRepulsionSolver.js
  42. +0
    -4
      lib/network/modules/components/physics/HierarchicalSpringSolver.js
  43. +0
    -4
      lib/network/modules/components/physics/RepulsionSolver.js
  44. +0
    -4
      lib/network/modules/components/physics/SpringSolver.js
  45. +0
    -4
      lib/network/modules/components/unified/Label.js
  46. +0
    -3
      lib/timeline/DateUtil.js
  47. +0
    -6
      lib/timeline/Range.js
  48. +4
    -6
      lib/timeline/component/CustomTime.js
  49. +0
    -3
      lib/timeline/component/ItemSet.js
  50. +0
    -3
      lib/timeline/component/graph2d_types/bar.js
  51. +0
    -3
      lib/timeline/component/graph2d_types/line.js
  52. +0
    -3
      lib/timeline/component/graph2d_types/points.js
  53. +0
    -1
      lib/timeline/component/item/Item.js
  54. +0
    -14
      lib/timeline/component/item/RangeItem.js
  55. +1
    -1
      package.json

+ 3
- 1
lib/module/hammer.js View File

@ -3,7 +3,9 @@
if (typeof window !== 'undefined') {
var propagating = require('propagating-hammerjs');
var Hammer = window['Hammer'] || require('hammerjs');
module.exports = propagating(Hammer);
module.exports = propagating(Hammer, {
preventDefault: true
});
}
else {
module.exports = function () {

+ 0
- 4
lib/network/modules/CanvasRenderer.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 26-Feb-15.
*/
if (typeof window !== 'undefined') {
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;

+ 1
- 5
lib/network/modules/Clustering.js View File

@ -1,9 +1,5 @@
/**
* Created by Alex on 24-Feb-15.
*/
var util = require("../../util");
import Cluster from './components/nodes/cluster'
import Cluster from './components/nodes/Cluster'
class ClusterEngine {
constructor(body) {

+ 0
- 5
lib/network/modules/ConfigurationSystem.js View File

@ -1,8 +1,3 @@
/**
* Created by Alex on 3/26/2015.
*/
var util = require('../../util');
import ColorPicker from './components/ColorPicker'

+ 0
- 5
lib/network/modules/EdgesHandler.js View File

@ -1,8 +1,3 @@
/**
* Created by Alex on 3/4/2015.
*/
var util = require("../../util");
var DataSet = require('../../DataSet');
var DataView = require('../../DataView');

+ 0
- 5
lib/network/modules/InteractionHandler.js View File

@ -1,8 +1,3 @@
/**
* Created by Alex on 2/27/2015.
*
*/
let util = require('../../util');
import NavigationHandler from "./components/NavigationHandler"

+ 0
- 4
lib/network/modules/LayoutEngine.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 3/3/2015.
*/
var util = require('../../util');
class LayoutEngine {

+ 0
- 4
lib/network/modules/NodesHandler.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 3/4/2015.
*/
var util = require("../../util");
var DataSet = require('../../DataSet');
var DataView = require('../../DataView');

+ 0
- 4
lib/network/modules/PhysicsEngine.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 2/23/2015.
*/
import BarnesHutSolver from './components/physics/BarnesHutSolver';
import Repulsion from './components/physics/RepulsionSolver';
import HierarchicalRepulsion from './components/physics/HierarchicalRepulsionSolver';

+ 0
- 4
lib/network/modules/SelectionHandler.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 2/27/2015.
*/
var Node = require("./components/Node");
var util = require('../../util');

+ 0
- 4
lib/network/modules/View.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 26-Feb-15.
*/
var util = require('../../util');
class View {

lib/network/modules/components/colorPicker.js → lib/network/modules/components/ColorPicker.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 3/27/2015.
*/
let Hammer = require('../../../module/hammer');
let hammerUtil = require('../../../hammerUtil');
let util = require('../../../util');

+ 2
- 2
lib/network/modules/components/Edge.js View File

@ -1,10 +1,10 @@
var util = require('../../../util');
import Label from './unified/Label.js'
import Label from './unified/Label'
import BezierEdgeDynamic from './edges/BezierEdgeDynamic'
import BezierEdgeStatic from './edges/BezierEdgeStatic'
import StraightEdge from './edges/StraightEdge'
/**
* @class Edge
*

+ 5
- 5
lib/network/modules/components/Popup.js View File

@ -86,14 +86,14 @@ class Popup {
/**
* Show the popup window
* @param {boolean} show Optional. Show or hide the window
* @param {boolean} [doShow] Show or hide the window
*/
show(show) {
if (show === undefined) {
show = true;
show(doShow) {
if (doShow === undefined) {
doShow = true;
}
if (show === true) {
if (doShow === true) {
var height = this.frame.clientHeight;
var width = this.frame.clientWidth;
var maxHeight = this.frame.parentNode.clientHeight;

lib/network/modules/components/edges/bezierEdgeDynamic.js → lib/network/modules/components/edges/BezierEdgeDynamic.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 3/20/2015.
*/
import BezierEdgeBase from './util/BezierEdgeBase'
class BezierEdgeDynamic extends BezierEdgeBase {

lib/network/modules/components/edges/bezierEdgeStatic.js → lib/network/modules/components/edges/BezierEdgeStatic.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 3/20/2015.
*/
import BezierEdgeBase from './util/BezierEdgeBase'
class BezierEdgeStatic extends BezierEdgeBase {

lib/network/modules/components/edges/straightEdge.js → lib/network/modules/components/edges/StraightEdge.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 3/20/2015.
*/
import EdgeBase from './util/EdgeBase'
class StraightEdge extends EdgeBase {

+ 0
- 4
lib/network/modules/components/edges/util/BezierEdgeBase.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 3/20/2015.
*/
import EdgeBase from './EdgeBase'
class BezierEdgeBase extends EdgeBase {

+ 0
- 3
lib/network/modules/components/edges/util/EdgeBase.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/20/2015.
*/
let util = require("../../../../../util")
class EdgeBase {

lib/network/modules/components/nodes/cluster.js → lib/network/modules/components/nodes/Cluster.js View File


lib/network/modules/components/nodes/shapes/box.js → lib/network/modules/components/nodes/shapes/Box.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import NodeBase from '../util/NodeBase'

lib/network/modules/components/nodes/shapes/circle.js → lib/network/modules/components/nodes/shapes/Circle.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import CircleImageBase from '../util/CircleImageBase'

lib/network/modules/components/nodes/shapes/circularImage.js → lib/network/modules/components/nodes/shapes/CircularImage.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';

lib/network/modules/components/nodes/shapes/database.js → lib/network/modules/components/nodes/shapes/Database.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import NodeBase from '../util/NodeBase'

+ 0
- 3
lib/network/modules/components/nodes/shapes/Diamond.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import ShapeBase from '../util/ShapeBase'

lib/network/modules/components/nodes/shapes/dot.js → lib/network/modules/components/nodes/shapes/Dot.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import ShapeBase from '../util/ShapeBase'

lib/network/modules/components/nodes/shapes/ellipse.js → lib/network/modules/components/nodes/shapes/Ellipse.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import NodeBase from '../util/NodeBase'

lib/network/modules/components/nodes/shapes/empty.js → lib/network/modules/components/nodes/shapes/Empty.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import NodeBase from '../util/NodeBase'

lib/network/modules/components/nodes/shapes/icon.js → lib/network/modules/components/nodes/shapes/Icon.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import NodeBase from '../util/NodeBase'

lib/network/modules/components/nodes/shapes/image.js → lib/network/modules/components/nodes/shapes/Image.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import CircleImageBase from '../util/CircleImageBase'

lib/network/modules/components/nodes/shapes/square.js → lib/network/modules/components/nodes/shapes/Square.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import ShapeBase from '../util/ShapeBase'

lib/network/modules/components/nodes/shapes/star.js → lib/network/modules/components/nodes/shapes/Star.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import ShapeBase from '../util/ShapeBase'

lib/network/modules/components/nodes/shapes/text.js → lib/network/modules/components/nodes/shapes/Text.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import NodeBase from '../util/NodeBase'

+ 0
- 3
lib/network/modules/components/nodes/shapes/Triangle.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import ShapeBase from '../util/ShapeBase'

lib/network/modules/components/nodes/shapes/triangleDown.js → lib/network/modules/components/nodes/shapes/TriangleDown.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/18/2015.
*/
'use strict';
import ShapeBase from '../util/ShapeBase'

+ 0
- 3
lib/network/modules/components/nodes/util/CircleImageBase.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/19/2015.
*/
import NodeBase from '../util/NodeBase'
class CircleImageBase extends NodeBase {

+ 0
- 4
lib/network/modules/components/nodes/util/NodeBase.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 3/19/2015.
*/
class NodeBase {
constructor(options, body, labelModule) {
this.body = body;

+ 0
- 3
lib/network/modules/components/nodes/util/ShapeBase.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 3/19/2015.
*/
import NodeBase from '../util/NodeBase'
class ShapeBase extends NodeBase {

+ 0
- 4
lib/network/modules/components/physics/BarnesHutSolver.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 2/23/2015.
*/
class BarnesHutSolver {
constructor(body, physicsBody, options) {
this.body = body;

+ 0
- 4
lib/network/modules/components/physics/CentralGravitySolver.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 2/23/2015.
*/
class CentralGravitySolver {
constructor(body, physicsBody, options) {
this.body = body;

+ 0
- 4
lib/network/modules/components/physics/HierarchicalRepulsionSolver.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 2/23/2015.
*/
class HierarchicalRepulsionSolver {
constructor(body, physicsBody, options) {
this.body = body;

+ 0
- 4
lib/network/modules/components/physics/HierarchicalSpringSolver.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 2/25/2015.
*/
class HierarchicalSpringSolver {
constructor(body, physicsBody, options) {
this.body = body;

+ 0
- 4
lib/network/modules/components/physics/RepulsionSolver.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 2/23/2015.
*/
class RepulsionSolver {
constructor(body, physicsBody, options) {
this.body = body;

+ 0
- 4
lib/network/modules/components/physics/SpringSolver.js View File

@ -1,7 +1,3 @@
/**
* Created by Alex on 2/23/2015.
*/
class SpringSolver {
constructor(body, physicsBody, options) {
this.body = body;

lib/network/modules/components/unified/label.js → lib/network/modules/components/unified/Label.js View File

@ -1,9 +1,5 @@
let util = require('../../../../util');
/**
* Created by Alex on 3/17/2015.
*/
class Label {
constructor(body,options) {
this.body = body;

+ 0
- 3
lib/timeline/DateUtil.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 10/3/2014.
*/
var moment = require('../module/moment');

+ 0
- 6
lib/timeline/Range.js View File

@ -368,8 +368,6 @@ Range.prototype._onDragStart = function(event) {
if (this.body.dom.root) {
this.body.dom.root.style.cursor = 'move';
}
event.preventDefault();
};
/**
@ -421,8 +419,6 @@ Range.prototype._onDrag = function (event) {
end: new Date(this.end),
byUser: true
});
event.preventDefault();
};
/**
@ -565,8 +561,6 @@ Range.prototype._onPinch = function (event) {
this.startToFront = false; // revert to default
this.endToFront = true; // revert to default
event.preventDefault();
};
/**

+ 4
- 6
lib/timeline/component/CustomTime.js View File

@ -83,9 +83,10 @@ CustomTime.prototype._create = function() {
this.hammer.on('panstart', this._onDragStart.bind(this));
this.hammer.on('panmove', this._onDrag.bind(this));
this.hammer.on('panend', this._onDragEnd.bind(this));
this.hammer.on('pan', function (event) {
event.preventDefault();
});
// TODO: cleanup
//this.hammer.on('pan', function (event) {
// event.preventDefault();
//});
};
/**
@ -162,7 +163,6 @@ CustomTime.prototype._onDragStart = function(event) {
this.eventParams.customTime = this.customTime;
event.stopPropagation();
event.preventDefault();
};
/**
@ -185,7 +185,6 @@ CustomTime.prototype._onDrag = function (event) {
});
event.stopPropagation();
event.preventDefault();
};
/**
@ -203,7 +202,6 @@ CustomTime.prototype._onDragEnd = function (event) {
});
event.stopPropagation();
event.preventDefault();
};
module.exports = CustomTime;

+ 0
- 3
lib/timeline/component/ItemSet.js View File

@ -1167,7 +1167,6 @@ ItemSet.prototype._onDragStart = function (event) {
}
event.stopPropagation();
event.preventDefault();
}
};
@ -1177,8 +1176,6 @@ ItemSet.prototype._onDragStart = function (event) {
* @private
*/
ItemSet.prototype._onDrag = function (event) {
event.preventDefault();
if (this.touchParams.itemProps) {
var me = this;
var snap = this.options.snap || null;

+ 0
- 3
lib/timeline/component/graph2d_types/bar.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 11/11/2014.
*/
var DOMutil = require('../../../DOMutil');
var Points = require('./points');

+ 0
- 3
lib/timeline/component/graph2d_types/line.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 11/11/2014.
*/
var DOMutil = require('../../../DOMutil');
var Points = require('./points');

+ 0
- 3
lib/timeline/component/graph2d_types/points.js View File

@ -1,6 +1,3 @@
/**
* Created by Alex on 11/11/2014.
*/
var DOMutil = require('../../../DOMutil');
function Points(groupId, options) {

+ 0
- 1
lib/timeline/component/item/Item.js View File

@ -141,7 +141,6 @@ Item.prototype._repaintDeleteButton = function (anchor) {
new Hammer(deleteButton).on('tap', function (event) {
me.parent.removeFromDataSet(me);
event.stopPropagation();
event.preventDefault();
});
anchor.appendChild(deleteButton);

+ 0
- 14
lib/timeline/component/item/RangeItem.js View File

@ -249,13 +249,6 @@ RangeItem.prototype._repaintDragLeft = function () {
dragLeft.className = 'drag-left';
dragLeft.dragLeftItem = this;
//// TODO: this should be redundant?
//Hammer(dragLeft, {
// preventDefault: true
//}).on('drag', function () {
// //console.log('drag left')
// });
this.dom.box.appendChild(dragLeft);
this.dom.dragLeft = dragLeft;
}
@ -279,13 +272,6 @@ RangeItem.prototype._repaintDragRight = function () {
dragRight.className = 'drag-right';
dragRight.dragRightItem = this;
//// TODO: this should be redundant?
//Hammer(dragRight, {
// preventDefault: true
//}).on('drag', function () {
// //console.log('drag right')
//});
this.dom.box.appendChild(dragRight);
this.dom.dragRight = dragRight;
}

+ 1
- 1
package.json View File

@ -32,7 +32,7 @@
"hammerjs": "^2.0.4",
"keycharm": "^0.2.0",
"moment": "^2.9.0",
"propagating-hammerjs": "^1.2.0"
"propagating-hammerjs": "^1.3.0"
},
"devDependencies": {
"6to5": "^3.5.3",

Loading…
Cancel
Save