This is an automated email from the ASF dual-hosted git repository.

tbouron pushed a commit to branch tbouron-patch-1
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git


The following commit(s) were added to refs/heads/tbouron-patch-1 by this push:
     new bbbe872  Address comments
bbbe872 is described below

commit bbbe8720f3ac9c863f648ed89c1d1f17abe5dec7
Author: Thomas Bouron <tbou...@gmail.com>
AuthorDate: Tue Mar 12 18:38:53 2019 +0000

    Address comments
---
 ui-modules/blueprint-composer/app/components/util/d3-blueprint.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ui-modules/blueprint-composer/app/components/util/d3-blueprint.js 
b/ui-modules/blueprint-composer/app/components/util/d3-blueprint.js
index 6e1e0e6..a0a11ad 100755
--- a/ui-modules/blueprint-composer/app/components/util/d3-blueprint.js
+++ b/ui-modules/blueprint-composer/app/components/util/d3-blueprint.js
@@ -173,7 +173,8 @@ export function D3Blueprint(container) {
         relationships: [],
     };
 
-    let zoom = d3.zoom().scaleExtent([0.1, 1.3]).on('zoom', onSvgZoom);
+    let viewportWidth = window.innerWidth || 
document.documentElement.clientWidth || document.body.clientWidth;
+    let zoom = d3.zoom().scaleExtent([0.1, Math.max(1, 1 + 
log(viewportWidth/1024))]).on('zoom', onSvgZoom);
     _svg
         .attr('preserveAspectRatio', 'xMinYMin meet')
         .attr('viewBox', () => {

Reply via email to