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/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); } 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` 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; diff --git a/src/captors/sigma.captors.mouse.js b/src/captors/sigma.captors.mouse.js index 5bb620c50..e3a40c5dc 100644 --- a/src/captors/sigma.captors.mouse.js +++ b/src/captors/sigma.captors.mouse.js @@ -316,10 +316,11 @@ function _wheelHandler(e) { var pos, ratio, - animation; + animation, + wheelDelta = sigma.utils.getDelta(e); - if (_settings('mouseEnabled') && _settings('mouseWheelEnabled')) { - ratio = sigma.utils.getDelta(e) > 0 ? + if (_settings('mouseEnabled') && _settings('mouseWheelEnabled') && wheelDelta !== 0) { + ratio = wheelDelta > 0 ? 1 / _settings('zoomingRatio') : _settings('zoomingRatio'); 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';