diff --git a/lib/module/hammer.js b/lib/module/hammer.js index 05ef2956..120e6ef9 100644 --- a/lib/module/hammer.js +++ b/lib/module/hammer.js @@ -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 () { diff --git a/lib/network/modules/CanvasRenderer.js b/lib/network/modules/CanvasRenderer.js index 42c3ae2b..260a58f7 100644 --- a/lib/network/modules/CanvasRenderer.js +++ b/lib/network/modules/CanvasRenderer.js @@ -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; diff --git a/lib/network/modules/Clustering.js b/lib/network/modules/Clustering.js index 3d3275ae..e59904e2 100644 --- a/lib/network/modules/Clustering.js +++ b/lib/network/modules/Clustering.js @@ -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) { diff --git a/lib/network/modules/ConfigurationSystem.js b/lib/network/modules/ConfigurationSystem.js index df37d242..0197f8d8 100644 --- a/lib/network/modules/ConfigurationSystem.js +++ b/lib/network/modules/ConfigurationSystem.js @@ -1,8 +1,3 @@ -/** - * Created by Alex on 3/26/2015. - */ - - var util = require('../../util'); import ColorPicker from './components/ColorPicker' diff --git a/lib/network/modules/EdgesHandler.js b/lib/network/modules/EdgesHandler.js index 4819c416..0ea4583f 100644 --- a/lib/network/modules/EdgesHandler.js +++ b/lib/network/modules/EdgesHandler.js @@ -1,8 +1,3 @@ -/** - * Created by Alex on 3/4/2015. - */ - - var util = require("../../util"); var DataSet = require('../../DataSet'); var DataView = require('../../DataView'); diff --git a/lib/network/modules/InteractionHandler.js b/lib/network/modules/InteractionHandler.js index b0c0c136..119c454a 100644 --- a/lib/network/modules/InteractionHandler.js +++ b/lib/network/modules/InteractionHandler.js @@ -1,8 +1,3 @@ -/** - * Created by Alex on 2/27/2015. - * - */ - let util = require('../../util'); import NavigationHandler from "./components/NavigationHandler" diff --git a/lib/network/modules/LayoutEngine.js b/lib/network/modules/LayoutEngine.js index 615e11d7..d372e97f 100644 --- a/lib/network/modules/LayoutEngine.js +++ b/lib/network/modules/LayoutEngine.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 3/3/2015. - */ - var util = require('../../util'); class LayoutEngine { diff --git a/lib/network/modules/NodesHandler.js b/lib/network/modules/NodesHandler.js index 0109b580..bdf1d0d8 100644 --- a/lib/network/modules/NodesHandler.js +++ b/lib/network/modules/NodesHandler.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 3/4/2015. - */ - var util = require("../../util"); var DataSet = require('../../DataSet'); var DataView = require('../../DataView'); diff --git a/lib/network/modules/PhysicsEngine.js b/lib/network/modules/PhysicsEngine.js index b8734285..1a0e7cf3 100644 --- a/lib/network/modules/PhysicsEngine.js +++ b/lib/network/modules/PhysicsEngine.js @@ -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'; diff --git a/lib/network/modules/SelectionHandler.js b/lib/network/modules/SelectionHandler.js index fc57a55c..ba762a78 100644 --- a/lib/network/modules/SelectionHandler.js +++ b/lib/network/modules/SelectionHandler.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 2/27/2015. - */ - var Node = require("./components/Node"); var util = require('../../util'); diff --git a/lib/network/modules/View.js b/lib/network/modules/View.js index 2c1aeb2c..87f7eabf 100644 --- a/lib/network/modules/View.js +++ b/lib/network/modules/View.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 26-Feb-15. - */ - var util = require('../../util'); class View { diff --git a/lib/network/modules/components/colorPicker.js b/lib/network/modules/components/ColorPicker.js similarity index 99% rename from lib/network/modules/components/colorPicker.js rename to lib/network/modules/components/ColorPicker.js index ee200b3a..191cf0e1 100644 --- a/lib/network/modules/components/colorPicker.js +++ b/lib/network/modules/components/ColorPicker.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 3/27/2015. - */ - let Hammer = require('../../../module/hammer'); let hammerUtil = require('../../../hammerUtil'); let util = require('../../../util'); diff --git a/lib/network/modules/components/Edge.js b/lib/network/modules/components/Edge.js index 40db5dba..19574c97 100644 --- a/lib/network/modules/components/Edge.js +++ b/lib/network/modules/components/Edge.js @@ -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 * diff --git a/lib/network/modules/components/Popup.js b/lib/network/modules/components/Popup.js index 3e66adbe..3c3f8cfa 100644 --- a/lib/network/modules/components/Popup.js +++ b/lib/network/modules/components/Popup.js @@ -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; diff --git a/lib/network/modules/components/edges/bezierEdgeDynamic.js b/lib/network/modules/components/edges/BezierEdgeDynamic.js similarity index 97% rename from lib/network/modules/components/edges/bezierEdgeDynamic.js rename to lib/network/modules/components/edges/BezierEdgeDynamic.js index 58169361..79473566 100644 --- a/lib/network/modules/components/edges/bezierEdgeDynamic.js +++ b/lib/network/modules/components/edges/BezierEdgeDynamic.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 3/20/2015. - */ - import BezierEdgeBase from './util/BezierEdgeBase' class BezierEdgeDynamic extends BezierEdgeBase { diff --git a/lib/network/modules/components/edges/bezierEdgeStatic.js b/lib/network/modules/components/edges/BezierEdgeStatic.js similarity index 99% rename from lib/network/modules/components/edges/bezierEdgeStatic.js rename to lib/network/modules/components/edges/BezierEdgeStatic.js index 37002f46..8f417814 100644 --- a/lib/network/modules/components/edges/bezierEdgeStatic.js +++ b/lib/network/modules/components/edges/BezierEdgeStatic.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 3/20/2015. - */ - import BezierEdgeBase from './util/BezierEdgeBase' class BezierEdgeStatic extends BezierEdgeBase { diff --git a/lib/network/modules/components/edges/straightEdge.js b/lib/network/modules/components/edges/StraightEdge.js similarity index 96% rename from lib/network/modules/components/edges/straightEdge.js rename to lib/network/modules/components/edges/StraightEdge.js index 320224bf..cb9c4786 100644 --- a/lib/network/modules/components/edges/straightEdge.js +++ b/lib/network/modules/components/edges/StraightEdge.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 3/20/2015. - */ - import EdgeBase from './util/EdgeBase' class StraightEdge extends EdgeBase { diff --git a/lib/network/modules/components/edges/util/BezierEdgeBase.js b/lib/network/modules/components/edges/util/BezierEdgeBase.js index fb520dab..ea55651d 100644 --- a/lib/network/modules/components/edges/util/BezierEdgeBase.js +++ b/lib/network/modules/components/edges/util/BezierEdgeBase.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 3/20/2015. - */ - import EdgeBase from './EdgeBase' class BezierEdgeBase extends EdgeBase { diff --git a/lib/network/modules/components/edges/util/EdgeBase.js b/lib/network/modules/components/edges/util/EdgeBase.js index b4d42315..80f9e54a 100644 --- a/lib/network/modules/components/edges/util/EdgeBase.js +++ b/lib/network/modules/components/edges/util/EdgeBase.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/20/2015. - */ let util = require("../../../../../util") class EdgeBase { diff --git a/lib/network/modules/components/nodes/cluster.js b/lib/network/modules/components/nodes/Cluster.js similarity index 100% rename from lib/network/modules/components/nodes/cluster.js rename to lib/network/modules/components/nodes/Cluster.js diff --git a/lib/network/modules/components/nodes/shapes/box.js b/lib/network/modules/components/nodes/shapes/Box.js similarity index 96% rename from lib/network/modules/components/nodes/shapes/box.js rename to lib/network/modules/components/nodes/shapes/Box.js index b4a3ddab..34d81114 100644 --- a/lib/network/modules/components/nodes/shapes/box.js +++ b/lib/network/modules/components/nodes/shapes/Box.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import NodeBase from '../util/NodeBase' diff --git a/lib/network/modules/components/nodes/shapes/circle.js b/lib/network/modules/components/nodes/shapes/Circle.js similarity index 95% rename from lib/network/modules/components/nodes/shapes/circle.js rename to lib/network/modules/components/nodes/shapes/Circle.js index 6c585f3a..c96860a6 100644 --- a/lib/network/modules/components/nodes/shapes/circle.js +++ b/lib/network/modules/components/nodes/shapes/Circle.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import CircleImageBase from '../util/CircleImageBase' diff --git a/lib/network/modules/components/nodes/shapes/circularImage.js b/lib/network/modules/components/nodes/shapes/CircularImage.js similarity index 96% rename from lib/network/modules/components/nodes/shapes/circularImage.js rename to lib/network/modules/components/nodes/shapes/CircularImage.js index c044649d..c6403430 100644 --- a/lib/network/modules/components/nodes/shapes/circularImage.js +++ b/lib/network/modules/components/nodes/shapes/CircularImage.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; diff --git a/lib/network/modules/components/nodes/shapes/database.js b/lib/network/modules/components/nodes/shapes/Database.js similarity index 96% rename from lib/network/modules/components/nodes/shapes/database.js rename to lib/network/modules/components/nodes/shapes/Database.js index 349227d4..00ebb3a7 100644 --- a/lib/network/modules/components/nodes/shapes/database.js +++ b/lib/network/modules/components/nodes/shapes/Database.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import NodeBase from '../util/NodeBase' diff --git a/lib/network/modules/components/nodes/shapes/Diamond.js b/lib/network/modules/components/nodes/shapes/Diamond.js index 51876b33..15d348bf 100644 --- a/lib/network/modules/components/nodes/shapes/Diamond.js +++ b/lib/network/modules/components/nodes/shapes/Diamond.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import ShapeBase from '../util/ShapeBase' diff --git a/lib/network/modules/components/nodes/shapes/dot.js b/lib/network/modules/components/nodes/shapes/Dot.js similarity index 87% rename from lib/network/modules/components/nodes/shapes/dot.js rename to lib/network/modules/components/nodes/shapes/Dot.js index cc8551a4..28fb920c 100644 --- a/lib/network/modules/components/nodes/shapes/dot.js +++ b/lib/network/modules/components/nodes/shapes/Dot.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import ShapeBase from '../util/ShapeBase' diff --git a/lib/network/modules/components/nodes/shapes/ellipse.js b/lib/network/modules/components/nodes/shapes/Ellipse.js similarity index 96% rename from lib/network/modules/components/nodes/shapes/ellipse.js rename to lib/network/modules/components/nodes/shapes/Ellipse.js index 936c9575..f4d2b985 100644 --- a/lib/network/modules/components/nodes/shapes/ellipse.js +++ b/lib/network/modules/components/nodes/shapes/Ellipse.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import NodeBase from '../util/NodeBase' diff --git a/lib/network/modules/components/nodes/shapes/empty.js b/lib/network/modules/components/nodes/shapes/Empty.js similarity index 80% rename from lib/network/modules/components/nodes/shapes/empty.js rename to lib/network/modules/components/nodes/shapes/Empty.js index 2865724b..85e975ac 100644 --- a/lib/network/modules/components/nodes/shapes/empty.js +++ b/lib/network/modules/components/nodes/shapes/Empty.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import NodeBase from '../util/NodeBase' diff --git a/lib/network/modules/components/nodes/shapes/icon.js b/lib/network/modules/components/nodes/shapes/Icon.js similarity index 97% rename from lib/network/modules/components/nodes/shapes/icon.js rename to lib/network/modules/components/nodes/shapes/Icon.js index 15840812..69d4eff1 100644 --- a/lib/network/modules/components/nodes/shapes/icon.js +++ b/lib/network/modules/components/nodes/shapes/Icon.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import NodeBase from '../util/NodeBase' diff --git a/lib/network/modules/components/nodes/shapes/image.js b/lib/network/modules/components/nodes/shapes/Image.js similarity index 95% rename from lib/network/modules/components/nodes/shapes/image.js rename to lib/network/modules/components/nodes/shapes/Image.js index e114ef89..85bd1c24 100644 --- a/lib/network/modules/components/nodes/shapes/image.js +++ b/lib/network/modules/components/nodes/shapes/Image.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import CircleImageBase from '../util/CircleImageBase' diff --git a/lib/network/modules/components/nodes/shapes/square.js b/lib/network/modules/components/nodes/shapes/Square.js similarity index 87% rename from lib/network/modules/components/nodes/shapes/square.js rename to lib/network/modules/components/nodes/shapes/Square.js index 92dab053..926c82c7 100644 --- a/lib/network/modules/components/nodes/shapes/square.js +++ b/lib/network/modules/components/nodes/shapes/Square.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import ShapeBase from '../util/ShapeBase' diff --git a/lib/network/modules/components/nodes/shapes/star.js b/lib/network/modules/components/nodes/shapes/Star.js similarity index 86% rename from lib/network/modules/components/nodes/shapes/star.js rename to lib/network/modules/components/nodes/shapes/Star.js index 51532d29..df23b458 100644 --- a/lib/network/modules/components/nodes/shapes/star.js +++ b/lib/network/modules/components/nodes/shapes/Star.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import ShapeBase from '../util/ShapeBase' diff --git a/lib/network/modules/components/nodes/shapes/text.js b/lib/network/modules/components/nodes/shapes/Text.js similarity index 93% rename from lib/network/modules/components/nodes/shapes/text.js rename to lib/network/modules/components/nodes/shapes/Text.js index 7e0d9511..ff545095 100644 --- a/lib/network/modules/components/nodes/shapes/text.js +++ b/lib/network/modules/components/nodes/shapes/Text.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import NodeBase from '../util/NodeBase' diff --git a/lib/network/modules/components/nodes/shapes/Triangle.js b/lib/network/modules/components/nodes/shapes/Triangle.js index 4fc01ed5..c8aac1d7 100644 --- a/lib/network/modules/components/nodes/shapes/Triangle.js +++ b/lib/network/modules/components/nodes/shapes/Triangle.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import ShapeBase from '../util/ShapeBase' diff --git a/lib/network/modules/components/nodes/shapes/triangleDown.js b/lib/network/modules/components/nodes/shapes/TriangleDown.js similarity index 85% rename from lib/network/modules/components/nodes/shapes/triangleDown.js rename to lib/network/modules/components/nodes/shapes/TriangleDown.js index 092a52cd..6b64f595 100644 --- a/lib/network/modules/components/nodes/shapes/triangleDown.js +++ b/lib/network/modules/components/nodes/shapes/TriangleDown.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/18/2015. - */ 'use strict'; import ShapeBase from '../util/ShapeBase' diff --git a/lib/network/modules/components/nodes/util/CircleImageBase.js b/lib/network/modules/components/nodes/util/CircleImageBase.js index fafd5548..c45a6187 100644 --- a/lib/network/modules/components/nodes/util/CircleImageBase.js +++ b/lib/network/modules/components/nodes/util/CircleImageBase.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/19/2015. - */ import NodeBase from '../util/NodeBase' class CircleImageBase extends NodeBase { diff --git a/lib/network/modules/components/nodes/util/NodeBase.js b/lib/network/modules/components/nodes/util/NodeBase.js index 1349667a..9f57e2b1 100644 --- a/lib/network/modules/components/nodes/util/NodeBase.js +++ b/lib/network/modules/components/nodes/util/NodeBase.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 3/19/2015. - */ - class NodeBase { constructor(options, body, labelModule) { this.body = body; diff --git a/lib/network/modules/components/nodes/util/ShapeBase.js b/lib/network/modules/components/nodes/util/ShapeBase.js index 244f1e2c..caa9daa3 100644 --- a/lib/network/modules/components/nodes/util/ShapeBase.js +++ b/lib/network/modules/components/nodes/util/ShapeBase.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 3/19/2015. - */ import NodeBase from '../util/NodeBase' class ShapeBase extends NodeBase { diff --git a/lib/network/modules/components/physics/BarnesHutSolver.js b/lib/network/modules/components/physics/BarnesHutSolver.js index a77ce758..d6a0a6bb 100644 --- a/lib/network/modules/components/physics/BarnesHutSolver.js +++ b/lib/network/modules/components/physics/BarnesHutSolver.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 2/23/2015. - */ - class BarnesHutSolver { constructor(body, physicsBody, options) { this.body = body; diff --git a/lib/network/modules/components/physics/CentralGravitySolver.js b/lib/network/modules/components/physics/CentralGravitySolver.js index 05aca54e..420697d1 100644 --- a/lib/network/modules/components/physics/CentralGravitySolver.js +++ b/lib/network/modules/components/physics/CentralGravitySolver.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 2/23/2015. - */ - class CentralGravitySolver { constructor(body, physicsBody, options) { this.body = body; diff --git a/lib/network/modules/components/physics/HierarchicalRepulsionSolver.js b/lib/network/modules/components/physics/HierarchicalRepulsionSolver.js index c2e0ef41..b2c4e5ee 100644 --- a/lib/network/modules/components/physics/HierarchicalRepulsionSolver.js +++ b/lib/network/modules/components/physics/HierarchicalRepulsionSolver.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 2/23/2015. - */ - class HierarchicalRepulsionSolver { constructor(body, physicsBody, options) { this.body = body; diff --git a/lib/network/modules/components/physics/HierarchicalSpringSolver.js b/lib/network/modules/components/physics/HierarchicalSpringSolver.js index ff3dd6e4..18b3b059 100644 --- a/lib/network/modules/components/physics/HierarchicalSpringSolver.js +++ b/lib/network/modules/components/physics/HierarchicalSpringSolver.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 2/25/2015. - */ - class HierarchicalSpringSolver { constructor(body, physicsBody, options) { this.body = body; diff --git a/lib/network/modules/components/physics/RepulsionSolver.js b/lib/network/modules/components/physics/RepulsionSolver.js index 6737c7a5..0f338ba9 100644 --- a/lib/network/modules/components/physics/RepulsionSolver.js +++ b/lib/network/modules/components/physics/RepulsionSolver.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 2/23/2015. - */ - class RepulsionSolver { constructor(body, physicsBody, options) { this.body = body; diff --git a/lib/network/modules/components/physics/SpringSolver.js b/lib/network/modules/components/physics/SpringSolver.js index 4687eedc..80855c5f 100644 --- a/lib/network/modules/components/physics/SpringSolver.js +++ b/lib/network/modules/components/physics/SpringSolver.js @@ -1,7 +1,3 @@ -/** - * Created by Alex on 2/23/2015. - */ - class SpringSolver { constructor(body, physicsBody, options) { this.body = body; diff --git a/lib/network/modules/components/unified/label.js b/lib/network/modules/components/unified/Label.js similarity index 99% rename from lib/network/modules/components/unified/label.js rename to lib/network/modules/components/unified/Label.js index ae59be94..e064febb 100644 --- a/lib/network/modules/components/unified/label.js +++ b/lib/network/modules/components/unified/Label.js @@ -1,9 +1,5 @@ let util = require('../../../../util'); -/** - * Created by Alex on 3/17/2015. - */ - class Label { constructor(body,options) { this.body = body; diff --git a/lib/timeline/DateUtil.js b/lib/timeline/DateUtil.js index a5eccdc6..76740817 100644 --- a/lib/timeline/DateUtil.js +++ b/lib/timeline/DateUtil.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 10/3/2014. - */ var moment = require('../module/moment'); diff --git a/lib/timeline/Range.js b/lib/timeline/Range.js index 758a6849..38982d72 100644 --- a/lib/timeline/Range.js +++ b/lib/timeline/Range.js @@ -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(); }; /** diff --git a/lib/timeline/component/CustomTime.js b/lib/timeline/component/CustomTime.js index f6292165..aec7777b 100644 --- a/lib/timeline/component/CustomTime.js +++ b/lib/timeline/component/CustomTime.js @@ -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; diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index 7c643c98..afdcf090 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -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; diff --git a/lib/timeline/component/graph2d_types/bar.js b/lib/timeline/component/graph2d_types/bar.js index 1ba41365..b98eefc1 100644 --- a/lib/timeline/component/graph2d_types/bar.js +++ b/lib/timeline/component/graph2d_types/bar.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 11/11/2014. - */ var DOMutil = require('../../../DOMutil'); var Points = require('./points'); diff --git a/lib/timeline/component/graph2d_types/line.js b/lib/timeline/component/graph2d_types/line.js index f9977504..b9e1add5 100644 --- a/lib/timeline/component/graph2d_types/line.js +++ b/lib/timeline/component/graph2d_types/line.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 11/11/2014. - */ var DOMutil = require('../../../DOMutil'); var Points = require('./points'); diff --git a/lib/timeline/component/graph2d_types/points.js b/lib/timeline/component/graph2d_types/points.js index 586614b1..582bad6f 100644 --- a/lib/timeline/component/graph2d_types/points.js +++ b/lib/timeline/component/graph2d_types/points.js @@ -1,6 +1,3 @@ -/** - * Created by Alex on 11/11/2014. - */ var DOMutil = require('../../../DOMutil'); function Points(groupId, options) { diff --git a/lib/timeline/component/item/Item.js b/lib/timeline/component/item/Item.js index d1819498..9b1e327e 100644 --- a/lib/timeline/component/item/Item.js +++ b/lib/timeline/component/item/Item.js @@ -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); diff --git a/lib/timeline/component/item/RangeItem.js b/lib/timeline/component/item/RangeItem.js index 61696124..c04c3765 100644 --- a/lib/timeline/component/item/RangeItem.js +++ b/lib/timeline/component/item/RangeItem.js @@ -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; } diff --git a/package.json b/package.json index 39dbf275..f84210b1 100644 --- a/package.json +++ b/package.json @@ -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",