[FIX] some formatting
bzr revid: xmo@openerp.com-20110906080847-514yysnz2kuwl4g0
This commit is contained in:
parent
86a1a3de4a
commit
5293c3b2e8
|
@ -67,20 +67,20 @@ openerp.base_diagram.DiagramView = openerp.base.View.extend({
|
||||||
get_diagram_info: function() {
|
get_diagram_info: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var params = {
|
var params = {
|
||||||
'id': this.id,
|
'id': this.id,
|
||||||
'model': this.model,
|
'model': this.model,
|
||||||
'node': this.node,
|
'node': this.node,
|
||||||
'connector': this.connector,
|
'connector': this.connector,
|
||||||
'bgcolor': this.nodes.attrs.bgcolor,
|
'bgcolor': this.nodes.attrs.bgcolor,
|
||||||
'shape': this.nodes.attrs.shape,
|
'shape': this.nodes.attrs.shape,
|
||||||
'src_node': this.connectors.attrs.source,
|
'src_node': this.connectors.attrs.source,
|
||||||
'des_node': this.connectors.attrs.destination,
|
'des_node': this.connectors.attrs.destination,
|
||||||
'visible_nodes': [],
|
'visible_nodes': [],
|
||||||
'invisible_nodes': [],
|
'invisible_nodes': [],
|
||||||
'node_fields': [],
|
'node_fields': [],
|
||||||
'connectors': [],
|
'connectors': [],
|
||||||
'connectors_fields': []
|
'connectors_fields': []
|
||||||
};
|
};
|
||||||
|
|
||||||
_.each(this.nodes.children, function(child) {
|
_.each(this.nodes.children, function(child) {
|
||||||
if(child.attrs.invisible == '1')
|
if(child.attrs.invisible == '1')
|
||||||
|
@ -129,10 +129,10 @@ openerp.base_diagram.DiagramView = openerp.base.View.extend({
|
||||||
if(shape == 'rectangle')
|
if(shape == 'rectangle')
|
||||||
shape = 'rect';
|
shape = 'rect';
|
||||||
node = r[shape](n.node.x, n.node.y).attr({
|
node = r[shape](n.node.x, n.node.y).attr({
|
||||||
"fill": n.node.color,
|
"fill": n.node.color
|
||||||
}).dblclick(function() {
|
}).dblclick(function() {
|
||||||
self.add_edit_node(n.node.id, self.node);
|
self.add_edit_node(n.node.id, self.node);
|
||||||
});
|
});
|
||||||
set = r.set()
|
set = r.set()
|
||||||
.push(node)
|
.push(node)
|
||||||
.push(
|
.push(
|
||||||
|
@ -169,7 +169,7 @@ openerp.base_diagram.DiagramView = openerp.base.View.extend({
|
||||||
if ($('div#dia-canvas').children().length > 0) {
|
if ($('div#dia-canvas').children().length > 0) {
|
||||||
$('div#dia-canvas').children().remove();
|
$('div#dia-canvas').children().remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
var layouter = new Graph.Layout.Ordered(diagram);
|
var layouter = new Graph.Layout.Ordered(diagram);
|
||||||
var render_diagram = new Graph.Renderer.Raphael('dia-canvas', diagram, $('div#dia-canvas').width(), $('div#dia-canvas').height());
|
var render_diagram = new Graph.Renderer.Raphael('dia-canvas', diagram, $('div#dia-canvas').width(), $('div#dia-canvas').height());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue