B2G/gecko/browser/components/tabview/items.js
// Sets up/moves the trenches for snapping to this item.
Sets up/moves the trenches for snapping to this item.
Sets up / moves the trenches for snapping to this item .
function Item_setTrenches(rect) {
    if (this.parent !== null)
      return;
    if (!this.borderTrenches)
      this.borderTrenches = Trenches.registerWithItem(this,"border");
    var bT = this.borderTrenches;
    Trenches.getById(bT.left).setWithRect(rect);
    Trenches.getById(bT.right).setWithRect(rect);
    Trenches.getById(bT.top).setWithRect(rect);
    Trenches.getById(bT.bottom).setWithRect(rect);
    if (!this.guideTrenches)
      this.guideTrenches = Trenches.registerWithItem(this,"guide");
    var gT = this.guideTrenches;
    Trenches.getById(gT.left).setWithRect(rect);
    Trenches.getById(gT.right).setWithRect(rect);
    Trenches.getById(gT.top).setWithRect(rect);
    Trenches.getById(gT.bottom).setWithRect(rect);
  }
function Item_setTrenches ( rect ) { if ( this . parent !== null ) return ; if ( ! this . borderTrenches ) this . borderTrenches = Trenches . registerWithItem ( this , "border" ) ; var bT = this . borderTrenches ; Trenches . getById ( bT . left ) . setWithRect ( rect ) ; Trenches . getById ( bT . right ) . setWithRect ( rect ) ; Trenches . getById ( bT . top ) . setWithRect ( rect ) ; Trenches . getById ( bT . bottom ) . setWithRect ( rect ) ; if ( ! this . guideTrenches ) this . guideTrenches = Trenches . registerWithItem ( this , "guide" ) ; var gT = this . guideTrenches ; Trenches . getById ( gT . left ) . setWithRect ( rect ) ; Trenches . getById ( gT . right ) . setWithRect ( rect ) ; Trenches . getById ( gT . top ) . setWithRect ( rect ) ; Trenches . getById ( gT . bottom ) . setWithRect ( rect ) ; }
Sets up/moves the trenches for snapping to this item.
Sets up / moves the trenches for snapping to this item .