workarounds for Chrome v25 bugs related to matrix transform
diff --git a/web/ons-demo/js/app.js b/web/ons-demo/js/app.js
index 25f0a9e..9c58b45 100644
--- a/web/ons-demo/js/app.js
+++ b/web/ons-demo/js/app.js
@@ -297,9 +297,18 @@
// do it again in 1s
setTimeout(function () {
- sync(svg)
+// sync(svg)
}, 1000);
});
}
-sync(createTopologyView());
\ No newline at end of file
+svg = createTopologyView();
+// workaround for Chrome v25 bug
+// if executed immediately, the view box transform logic doesn't work properly
+// fixed in Chrome v27
+setTimeout(function () {
+ // workaround for another Chrome v25 bug
+ // viewbox transform stuff doesn't work in combination with browser zoom
+ d3.select('#svg-container').style('zoom', window.document.body.clientWidth/window.document.width);
+ sync(svg);
+}, 100);