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/6] 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/6] 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/6] 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/6] 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; From 5ad637d1ed17051d4b241314eed7fb4759542142 Mon Sep 17 00:00:00 2001 From: CarloLucibello Date: Wed, 17 May 2017 09:01:45 +0200 Subject: [PATCH 5/6] fix rendering of exported svg on some viewers --- plugins/sigma.exporters.svg/sigma.exporters.svg.js | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/sigma.exporters.svg/sigma.exporters.svg.js b/plugins/sigma.exporters.svg/sigma.exporters.svg.js index 9963843aa..58c83e499 100644 --- a/plugins/sigma.exporters.svg/sigma.exporters.svg.js +++ b/plugins/sigma.exporters.svg/sigma.exporters.svg.js @@ -90,6 +90,7 @@ // Creating style tag if needed if (params.classes) { style = document.createElementNS(XMLNS, 'style'); + style.setAttribute('type', 'text/css') svg.insertBefore(style, svg.firstChild); } From 51d0222931ba54e73bcb3b75adb0f68d48aa9af8 Mon Sep 17 00:00:00 2001 From: Olivier Coilland Date: Mon, 29 May 2017 10:55:25 +0200 Subject: [PATCH 6/6] Added some configuration documentation --- plugins/sigma.layout.forceAtlas2/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/sigma.layout.forceAtlas2/README.md b/plugins/sigma.layout.forceAtlas2/README.md index b865270a5..942e3e3b5 100644 --- a/plugins/sigma.layout.forceAtlas2/README.md +++ b/plugins/sigma.layout.forceAtlas2/README.md @@ -57,13 +57,13 @@ sigmaInstance.isForceAtlas2Running(); *Algorithm configuration* -* **linLogMode**: *boolean* `false` +* **linLogMode** *boolean* `false`: switch ForceAtlas' model from lin-lin to lin-log (tribute to Andreas Noack). Makes clusters more tight. * **outboundAttractionDistribution** *boolean* `false` * **adjustSizes** *boolean* `false` -* **edgeWeightInfluence** *number* `0` -* **scalingRatio** *number* `1` +* **edgeWeightInfluence** *number* `0`: how much influence you give to the edges weight. 0 is "no influence" and 1 is "normal". +* **scalingRatio** *number* `1`: how much repulsion you want. More makes a more sparse graph. * **strongGravityMode** *boolean* `false` -* **gravity** *number* `1` +* **gravity** *number* `1`: attracts nodes to the center. Prevents islands from drifting away. * **barnesHutOptimize** *boolean* `true`: should we use the algorithm's Barnes-Hut to improve repulsion's scalability (`O(n²)` to `O(nlog(n))`)? This is useful for large graph but harmful to small ones. * **barnesHutTheta** *number* `0.5` * **slowDown** *number* `1`