rem: const cardbox = card.boxObject; this.top = this._top = cardbox.y - gGameStackTop; this.left = this._left = cardbox.x - gGameStackLeft; this.width = cardbox.width; const lastbox = card.parentNode.lastChild.boxObject; if(card.isCard) this.height = lastbox.y + lastbox.height - cardbox.y; else this.height = cardbox.height;  
add: const box = card.boxObject; this.top = this._top = box.y - gGameStackTop; this.left = this._left = box.x - gGameStackLeft; if(card.isCard) { const box2 = card.parentNode.lastChild.boxObject; this.height = box2.y + box2.height - box.y; this.width = box.width; } else { this.height = gCardHeight; this.width = gCardWidth; } 
context: function createHighlighter() {  var box = document.createElement("box");  box.className = "card-highlight";  box.isHighlighter = true;  gGameStack.appendChild(box);  box.unhighlight = function() {    this.top = this.left = this._top = this._left = -1000;    this.width = this.height = 0;  };  box.highlight = function(card) {    // card might be a pile really    const cardbox = card.boxObject;    this.top = this._top = cardbox.y - gGameStackTop;    this.left = this._left = cardbox.x - gGameStackLeft;    this.width = cardbox.width;    const lastbox = card.parentNode.lastChild.boxObject;    if(card.isCard) this.height = lastbox.y + lastbox.height - cardbox.y;    else this.height = cardbox.height;    // xxx should use a highlight box the size of a card for an empty pile  };  box.unhighlight();  return box;}
meta: 3385	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3385/fb58f1ed0e84d2307545949935f23a943903f015/cardslib.js/buggy/cardslib.js