Просмотр исходного кода

forcegraph: use setTransform instead of resetTransform

Nils Schneider 8 лет назад
Родитель
Сommit
8e1e698849
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      lib/forcegraph.js

+ 1 - 1
lib/forcegraph.js

@@ -403,7 +403,7 @@ define(["d3"], function (d3) {
       canvas.height = el.offsetHeight * r
       canvas.style.width = el.offsetWidth + "px"
       canvas.style.height = el.offsetHeight + "px"
-      ctx.resetTransform()
+      ctx.setTransform(1, 0, 0, 1, 0, 0)
       ctx.scale(r, r)
       requestAnimationFrame(redraw)
     }