fix(graph): fix matrix when zoom ratio is too large or too small

This commit is contained in:
yilin.qyl 2019-02-28 16:29:46 +08:00
parent 260142ef86
commit 7dc90098a9

View File

@ -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);
}