diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f608133e2..e749e9d8bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # ChangeLog +#### 3.0.7 +`2019-09-11` +* fix: zoom-canvas support IE and Firefox + #### 3.0.6 `2019-09-11` * fix: group data util function use module.exports diff --git a/package.json b/package.json index 06ee11dcd9..b4ec9b092c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@antv/g6", - "version": "3.0.6", + "version": "3.0.7", "description": "graph visualization frame work", "main": "build/g6.js", "homepage": "https://github.com/antvis/g6", diff --git a/src/behavior/zoom-canvas.js b/src/behavior/zoom-canvas.js index 80c34f95c3..b3ba4bc1fc 100644 --- a/src/behavior/zoom-canvas.js +++ b/src/behavior/zoom-canvas.js @@ -3,7 +3,7 @@ const DELTA = 0.05; module.exports = { getDefaultCfg() { return { - sensitivity: 5, + sensitivity: 2, minZoom: 0.1, maxZoom: 10 }; @@ -24,7 +24,8 @@ module.exports = { const pixelRatio = canvas.get('pixelRatio'); const sensitivity = this.get('sensitivity'); let ratio = graph.getZoom(); - if (e.deltaY < 0) { + // 兼容IE、Firefox及Chrome + if (e.wheelDelta < 0) { ratio = 1 - DELTA * sensitivity; } else { ratio = 1 + DELTA * sensitivity; diff --git a/src/global.js b/src/global.js index 8cc7f64aae..b770cd2c14 100755 --- a/src/global.js +++ b/src/global.js @@ -3,7 +3,7 @@ */ module.exports = { - version: '3.0.6', + version: '3.0.7', rootContainerClassName: 'root-container', nodeContainerClassName: 'node-container', edgeContainerClassName: 'edge-container',