Skip to content

Commit

Permalink
Layer fix for loading wireConfig. jsBox fix for positionning terminals
Browse files Browse the repository at this point in the history
  • Loading branch information
ericabouaf committed Mar 2, 2009
1 parent ea36234 commit 366b697
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 49 deletions.
50 changes: 5 additions & 45 deletions examples/jsBox/jsBox.js
Expand Up @@ -92,48 +92,7 @@ var jsBox = {
}
]
}
}//,


/*****************************
* FAKE MODULES, JUST POC
*****************************
{
"name": "asyncRequestCallback9",
"container": {
"xtype": "jsBox.ComposedContainer",
"title": "asyncRequestCallback9"
}
},
{
"name": "inputValue",
"container": {
"xtype": "jsBox.ComposedContainer",
"title": "inputValue"
}
},
{
"name": "Multiplication2",
"container": {
"xtype": "jsBox.ComposedContainer",
"title": "Multiplication2"
}
},
{
"name": "ComposedModule3",
"container": {
"xtype": "jsBox.ComposedContainer",
"title": "ComposedModule3"
}
}
,
{
"name": "machinTruc",
"container": {
"xtype": "jsBox.ComposedContainer",
"title": "machinTruc"
}
}*/
]
},

Expand Down Expand Up @@ -179,7 +138,8 @@ YAHOO.lang.extend(jsBox.WiringEditor, WireIt.WiringEditor, {
/**
* Overwrite updateLoadPanelList to add Composed modules to the module list
*/
updateLoadPanelList: function() { try {
updateLoadPanelList: function() {
try {
var left = YAHOO.util.Dom.get('left');
var list = WireIt.cn("ul");
if(YAHOO.lang.isArray(this.pipes)) {
Expand Down Expand Up @@ -218,8 +178,8 @@ YAHOO.lang.extend(jsBox.WiringEditor, WireIt.WiringEditor, {
panelBody.innerHTML = "";
panelBody.appendChild(list);

}catch(ex){console.log(ex);}
},
}catch(ex){console.log(ex);}
}

});

Expand Down Expand Up @@ -289,7 +249,7 @@ YAHOO.extend(jsBox.Container, WireIt.Container, {
}
else if (curTerminalN > nParams) {
// remove terminals
for(var i = nParams ; i < curTerminalN ; i++) {
for(var i = this.terminals.length-(curTerminalN-nParams) ; i < this.terminals.length ; i++) {
this.terminals[i].remove();
this.terminals[i] = null;
}
Expand Down
5 changes: 1 addition & 4 deletions js/Layer.js
Expand Up @@ -158,12 +158,9 @@ WireIt.Layer.prototype = {
var src = wireConfig.src;
var tgt = wireConfig.tgt;

/*var terminal1 = this.containers[src.moduleId].terminals[src.terminalId];
var terminal2 = this.containers[tgt.moduleId].terminals[tgt.terminalId];*/
var terminal1 = this.containers[src.moduleId].getTerminal(src.terminal);
var terminal2 = this.containers[tgt.moduleId].getTerminal(tgt.terminal);

var wire = new type( terminal1, terminal2, this.el);
var wire = new type( terminal1, terminal2, this.el, wireConfig);
wire.redraw();

return wire;
Expand Down

0 comments on commit 366b697

Please sign in to comment.