From 06b55cd94f9ff5c4246ec1f8bc41bee03d0670fd Mon Sep 17 00:00:00 2001 From: Robin de Mourat Date: Wed, 2 Nov 2016 11:54:07 +0100 Subject: [PATCH 1/4] fix unexpected zoom behaviors on macbook pro trackpads fix #790 --- src/captors/sigma.captors.mouse.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/captors/sigma.captors.mouse.js b/src/captors/sigma.captors.mouse.js index 5bb620c50..23b03454e 100644 --- a/src/captors/sigma.captors.mouse.js +++ b/src/captors/sigma.captors.mouse.js @@ -316,9 +316,10 @@ function _wheelHandler(e) { var pos, ratio, - animation; + animation, + wheelDelta = sigma.utils.getDelta(e); - if (_settings('mouseEnabled') && _settings('mouseWheelEnabled')) { + if (_settings('mouseEnabled') && _settings('mouseWheelEnabled') && wheelDelta !== 0) { ratio = sigma.utils.getDelta(e) > 0 ? 1 / _settings('zoomingRatio') : _settings('zoomingRatio'); From ea4903efcbf0b3b553a6c8a810ed00cd392a043d Mon Sep 17 00:00:00 2001 From: Robin de Mourat Date: Thu, 3 Nov 2016 14:13:11 +0100 Subject: [PATCH 2/4] use wheelDelta variable along _wheelHandler method --- src/captors/sigma.captors.mouse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/captors/sigma.captors.mouse.js b/src/captors/sigma.captors.mouse.js index 23b03454e..e3a40c5dc 100644 --- a/src/captors/sigma.captors.mouse.js +++ b/src/captors/sigma.captors.mouse.js @@ -320,7 +320,7 @@ wheelDelta = sigma.utils.getDelta(e); if (_settings('mouseEnabled') && _settings('mouseWheelEnabled') && wheelDelta !== 0) { - ratio = sigma.utils.getDelta(e) > 0 ? + ratio = wheelDelta > 0 ? 1 / _settings('zoomingRatio') : _settings('zoomingRatio'); From c45e7790b988307124a12177115d12f2f77c915b Mon Sep 17 00:00:00 2001 From: Yomguithereal Date: Thu, 3 Nov 2016 16:25:00 +0100 Subject: [PATCH 3/4] Bump 1.2.0 --- CHANGELOG.md | 4 +++- README.md | 2 +- package.json | 2 +- src/sigma.core.js | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f76784698..9c2ca0179 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ ## sigma.js - changelog: -#### 1.2.0 - (provisional) +#### 1.2.0 - release (Nov 3, 2016) - Added the [layout.noverlap](https://github.com/jacomyal/sigma.js/tree/master/plugins/sigma.layout.noverlap) plugin (thanks to [@apitts](https://github.com/apitts)). - Added the [renderers.edgeDot](https://github.com/jacomyal/sigma.js/tree/master/plugins/sigma.renderers.edgeDots) plugin (thanks to [@jotunacorn](https://github.com/jotunacorn)). +- Fixed `sigma.require.js` so that Webpack & node.js can require the library. +- Fixed camera zoom weird behavior on retina displays (thanks to [@robindemourat](https://github.com/robindemourat)). #### 1.1.0 - release (Feb 17, 2016) diff --git a/README.md b/README.md index c1167826e..85376f241 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Build Status](https://travis-ci.org/jacomyal/sigma.js.svg)](https://travis-ci.org/jacomyal/sigma.js) -sigma.js - v1.1.0 +sigma.js - v1.2.0 ================= Sigma is a JavaScript library dedicated to graph drawing, mainly developed by [@jacomyal](https://github.com/jacomyal) and [@Yomguithereal](https://github.com/Yomguithereal). diff --git a/package.json b/package.json index b8f7c0683..b74c6604e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sigma", - "version": "1.1.0", + "version": "1.2.0", "description": "A JavaScript library dedicated to graph drawing.", "homepage": "http://sigmajs.org", "bugs": "http://github.com/jacomyal/sigma.js/issues", diff --git a/src/sigma.core.js b/src/sigma.core.js index e7f33199f..716a2bba8 100644 --- a/src/sigma.core.js +++ b/src/sigma.core.js @@ -722,7 +722,7 @@ /** * The current version of sigma: */ - sigma.version = '1.1.0'; + sigma.version = '1.2.0'; From 015f6d3e32ac4c8d009009c3757c9904c39e7874 Mon Sep 17 00:00:00 2001 From: Rohit J V Date: Tue, 28 Feb 2017 01:19:48 +0530 Subject: [PATCH 4/4] bugfixes-astar (#836) Fixed typo in astar --- plugins/sigma.pathfinding.astar/sigma.pathfinding.astar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sigma.pathfinding.astar/sigma.pathfinding.astar.js b/plugins/sigma.pathfinding.astar/sigma.pathfinding.astar.js index 0c7bd3fee..47d3d09d7 100644 --- a/plugins/sigma.pathfinding.astar/sigma.pathfinding.astar.js +++ b/plugins/sigma.pathfinding.astar/sigma.pathfinding.astar.js @@ -59,7 +59,7 @@ previousNode: previousNode }; - if(closedList[nodeId] == undefined || closedList[nodeId].pathLenth > pathLength) { + if(closedList[nodeId] == undefined || closedList[nodeId].pathLength > pathLength) { closedList[nodeId] = newItem; var item;