public/javascripts/WireIt/plugins/grouping/examples/sawire/modules.js
function() {
      var width = WireIt.getIntStyle(this.el, "width");

      var inputsIntervall = Math.floor(width/(this.nParams+1));

      for(var i = 1 ; i < this.terminals.length ; i++) {
         var term = this.terminals[i];
         YAHOO.util.Dom.setStyle(term.el, "left", (inputsIntervall*(i))-15+"px" );
         for(var j = 0 ; j < term.wires.length ; j++) {
            term.wires[j].redraw();
         }
      }
      
      // Output terminal
      WireIt.sn(this.outputTerminal.el, null, {position: "absolute", bottom: "-15px", left: (Math.floor(width/2)-15)+"px"});
      for(var j = 0 ; j < this.outputTerminal.wires.length ; j++) {
         this.outputTerminal.wires[j].redraw();
      }
   }
function() {
      var width = WireIt.getIntStyle(this.el, "width");

      var inputsIntervall = Math.floor(width/(this.nParams+1));

      for(var i = 1 ; i < this.terminals.length ; i++) {
         var term = this.terminals[i];
         YAHOO.util.Dom.setStyle(term.el, "left", (inputsIntervall*(i))-15+"px" );
         for(var j = 0 ; j < term.wires.length ; j++) {
            term.wires[j].redraw();
         }
      }
      
      // Output terminal
      WireIt.sn(this.outputTerminal.el, null, {position: "absolute", bottom: "-15px", left: (Math.floor(width/2)-15)+"px"});
      for(var j = 0 ; j < this.outputTerminal.wires.length ; j++) {
         this.outputTerminal.wires[j].redraw();
      }
   }
function ( ) { var width = WireIt . getIntStyle ( this . el , "width" ) ; var inputsIntervall = Math . floor ( width / ( this . nParams + 1 ) ) ; for ( var i = 1 ; i < this . terminals . length ; i ++ ) { var term = this . terminals [ i ] ; YAHOO . util . Dom . setStyle ( term . el , "left" , ( inputsIntervall * ( i ) ) - 15 + "px" ) ; for ( var j = 0 ; j < term . wires . length ; j ++ ) { term . wires [ j ] . redraw ( ) ; } } // Output terminal WireIt . sn ( this . outputTerminal . el , null , { position : "absolute" , bottom : "-15px" , left : ( Math . floor ( width / 2 ) - 15 ) + "px" } ) ; for ( var j = 0 ; j < this . outputTerminal . wires . length ; j ++ ) { this . outputTerminal . wires [ j ] . redraw ( ) ; } }
Reposition the terminals
@method positionTerminals
Reposition the terminals