public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js
function() {
      var ctxt=this.getContext();
      
      // Canvas Region
      var canvasRegion = Dom.getRegion(this.element);
      var canvasWidth = canvasRegion.right-canvasRegion.left-4;
      var canvasHeight = canvasRegion.bottom-canvasRegion.top-4;
      
      // Clear Rect
      ctxt.clearRect(0,0, canvasWidth, canvasHeight);
      
      // Calculate ratio
      var layerWidth = this.layer.el.scrollWidth;
      var layerHeight = this.layer.el.scrollHeight;
      var hRatio = Math.floor(100*canvasWidth/layerWidth)/100;
      var vRatio = Math.floor(100*canvasHeight/layerHeight)/100;

      // Draw the viewport
      var region = Dom.getRegion(this.layer.el);
      var viewportWidth = region.right-region.left;
      var viewportHeight = region.bottom-region.top;
      var viewportX = this.layer.el.scrollLeft;
      var viewportY = this.layer.el.scrollTop;
      ctxt.strokeStyle= "rgb(200, 50, 50)";
      ctxt.lineWidth=1;
      ctxt.strokeRect(viewportX*hRatio, viewportY*vRatio, viewportWidth*hRatio, viewportHeight*vRatio);
   
      // Draw containers and wires
      ctxt.fillStyle = this.style;
      ctxt.strokeStyle= this.style;
      ctxt.lineWidth=this.lineWidth;
      this.drawContainers(ctxt, hRatio, vRatio);
      this.drawWires(ctxt, hRatio, vRatio);
   }
function() {
      var ctxt=this.getContext();
      
      // Canvas Region
      var canvasRegion = Dom.getRegion(this.element);
      var canvasWidth = canvasRegion.right-canvasRegion.left-4;
      var canvasHeight = canvasRegion.bottom-canvasRegion.top-4;
      
      // Clear Rect
      ctxt.clearRect(0,0, canvasWidth, canvasHeight);
      
      // Calculate ratio
      var layerWidth = this.layer.el.scrollWidth;
      var layerHeight = this.layer.el.scrollHeight;
      var hRatio = Math.floor(100*canvasWidth/layerWidth)/100;
      var vRatio = Math.floor(100*canvasHeight/layerHeight)/100;

      // Draw the viewport
      var region = Dom.getRegion(this.layer.el);
      var viewportWidth = region.right-region.left;
      var viewportHeight = region.bottom-region.top;
      var viewportX = this.layer.el.scrollLeft;
      var viewportY = this.layer.el.scrollTop;
      ctxt.strokeStyle= "rgb(200, 50, 50)";
      ctxt.lineWidth=1;
      ctxt.strokeRect(viewportX*hRatio, viewportY*vRatio, viewportWidth*hRatio, viewportHeight*vRatio);
   
      // Draw containers and wires
      ctxt.fillStyle = this.style;
      ctxt.strokeStyle= this.style;
      ctxt.lineWidth=this.lineWidth;
      this.drawContainers(ctxt, hRatio, vRatio);
      this.drawWires(ctxt, hRatio, vRatio);
   }
function ( ) { var ctxt = this . getContext ( ) ; // Canvas Region var canvasRegion = Dom . getRegion ( this . element ) ; var canvasWidth = canvasRegion . right - canvasRegion . left - 4 ; var canvasHeight = canvasRegion . bottom - canvasRegion . top - 4 ; // Clear Rect ctxt . clearRect ( 0 , 0 , canvasWidth , canvasHeight ) ; // Calculate ratio var layerWidth = this . layer . el . scrollWidth ; var layerHeight = this . layer . el . scrollHeight ; var hRatio = Math . floor ( 100 * canvasWidth / layerWidth ) / 100 ; var vRatio = Math . floor ( 100 * canvasHeight / layerHeight ) / 100 ; // Draw the viewport var region = Dom . getRegion ( this . layer . el ) ; var viewportWidth = region . right - region . left ; var viewportHeight = region . bottom - region . top ; var viewportX = this . layer . el . scrollLeft ; var viewportY = this . layer . el . scrollTop ; ctxt . strokeStyle = "rgb(200, 50, 50)" ; ctxt . lineWidth = 1 ; ctxt . strokeRect ( viewportX * hRatio , viewportY * vRatio , viewportWidth * hRatio , viewportHeight * vRatio ) ; // Draw containers and wires ctxt . fillStyle = this . style ; ctxt . strokeStyle = this . style ; ctxt . lineWidth = this . lineWidth ; this . drawContainers ( ctxt , hRatio , vRatio ) ; this . drawWires ( ctxt , hRatio , vRatio ) ; }
Redraw the layer map
@method draw
Redraw the layer map