mirror of
https://gitee.com/antv/g6.git
synced 2024-12-05 05:09:07 +08:00
fix(graph): fix matrix when zoom ratio is too large or too small
This commit is contained in:
parent
260142ef86
commit
7dc90098a9
@ -434,12 +434,10 @@ class Graph extends EventEmitter {
|
||||
const minZoom = this.get('minZoom');
|
||||
const maxZoom = this.get('maxZoom');
|
||||
if (minZoom && matrix[0] < minZoom) {
|
||||
matrix[0] = minZoom;
|
||||
matrix[4] = minZoom;
|
||||
return;
|
||||
}
|
||||
if (maxZoom && matrix[0] > maxZoom) {
|
||||
matrix[0] = maxZoom;
|
||||
matrix[4] = maxZoom;
|
||||
return;
|
||||
}
|
||||
rootGroup.setMatrix(matrix);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user