source: [view]
var _row = 0,
_w = this.cellSize;
dojo.style(this.domNode, {
width: _w * this.cols + "px",
height: _w * this.rows + "px"
});
this._nl = dojo.query(this.children, this.containerNode)
.forEach(function(n, _idx){
var _col = _idx % this.cols,
t = _row * _w,
l = _col * _w,
m = this.cellMargin * 2;
dojo.style(n, {
top: t + "px",
left: l + "px",
width: _w - m + "px",
height: _w - m + "px"
});
if(_col == this.cols - 1){ _row++; }
dojo.addClass(n, this.baseClass + "Image");
}, this)
;
var l = this._nl.length;
while(this.threads--){
var s = Math.floor(Math.random() * l);
setTimeout(dojo.hitch(this, "_enbiggen", {
target: this._nl[s]
}), this.delay * this.threads);
}