mirror of
https://gitee.com/antv/g6.git
synced 2024-11-30 02:38:20 +08:00
fix zoom-canvas bug
This commit is contained in:
parent
902d52b17b
commit
00ff07d74f
@ -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
|
||||
|
@ -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",
|
||||
|
@ -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;
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
version: '3.0.6',
|
||||
version: '3.0.7',
|
||||
rootContainerClassName: 'root-container',
|
||||
nodeContainerClassName: 'node-container',
|
||||
edgeContainerClassName: 'edge-container',
|
||||
|
Loading…
Reference in New Issue
Block a user