application editor zoom effect added for group preview
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/1f7224f0 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/1f7224f0 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/1f7224f0 Branch: refs/heads/master Commit: 1f7224f09e38968f2a7fc0ebfbb362a8718eef67 Parents: ae4419d Author: Dakshika Jayathilaka <[email protected]> Authored: Thu Dec 18 16:54:14 2014 +0530 Committer: Imesh Gunaratne <[email protected]> Committed: Thu Dec 18 17:43:21 2014 +0530 ---------------------------------------------------------------------- .../console/themes/theme0/js/custom/applications-editor.js | 7 +++++++ 1 file changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/1f7224f0/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-editor.js ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-editor.js b/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-editor.js index 5581b58..33daac6 100644 --- a/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-editor.js +++ b/components/org.apache.stratos.manager.console/console/themes/theme0/js/custom/applications-editor.js @@ -287,9 +287,16 @@ function generateGroupPreview(data) { var diagonal = d3.svg.diagonal() .projection(function(d) { return [d.x, d.y]; }); + function redraw() { + svg.attr("transform", + "translate(" + d3.event.translate + ")" + + " scale(" + d3.event.scale + ")"); + } + var svg = d3.select(".description-section").append("svg") .attr("width", width) .attr("height", height) + .call(d3.behavior.zoom().on("zoom", redraw)) .append("g") .attr("transform", "translate(" + -90+ "," + margin.top + ")");
