[IMP]Improved code for setting width and height of document to rendering process...
authorKunal Chavda (OpenERP) <kch@tinyerp.com>
Tue, 22 Nov 2011 11:42:09 +0000 (17:12 +0530)
committerKunal Chavda (OpenERP) <kch@tinyerp.com>
Tue, 22 Nov 2011 11:42:09 +0000 (17:12 +0530)
bzr revid: kch@tinyerp.com-20111122114209-olyhazad8dff3s1z

addons/web_process/static/src/js/process.js

index e9ea312..d33ed6b 100644 (file)
@@ -246,9 +246,10 @@ openerp.web_process = function (openerp) {
                 transitions['active'] = src.active && !dst.gray;
                 process_graph.addEdge(src['name'], dst['name'], {directed : true});
             });
-
+            var width = $(document).width();
+            var height = $(document).height();
             var layouter = new Graph.Layout.Ordered(process_graph);
-            var render_process_graph = new Graph.Renderer.Raphael('process_canvas', process_graph, $('#process_canvas').width(), $('#process_canvas').height());
+            var render_process_graph = new Graph.Renderer.Raphael('process_canvas', process_graph, width, height);
         },
         jump_to_view: function(model, id) {
             var self = this;