dojox.widget.FisheyeList._setItemSize
dojo.require("dojox.widget.FisheyeList");
defined in dojox/widget/FisheyeList.js
Usage
function (p, scale) (view source)
scale *= this.timerScale; var w = Math.round(this.itemWidth + ((this.itemMaxWidth - this.itemWidth ) * scale)); var h = Math.round(this.itemHeight + ((this.itemMaxHeight - this.itemHeight) * scale)); if(this.isHorizontal){ this.children[p].sizeW = w; this.children[p].sizeH = h; this.children[p].sizeMain = w; this.children[p].sizeOff = h; var y = 0; if(this.anchorEdge == this.EDGE.TOP){ y = (this.children[p].cenY - (this.itemHeight / 2)); }else if(this.anchorEdge == this.EDGE.BOTTOM){ y = (this.children[p].cenY - (h - (this.itemHeight / 2))); }else{ y = (this.children[p].cenY - (h / 2)); } this.children[p].usualX = Math.round(this.children[p].cenX - (w / 2)); this.children[p].domNode.style.top = y + 'px'; this.children[p].domNode.style.left = this.children[p].usualX + 'px'; }else{ this.children[p].sizeW = w; this.children[p].sizeH = h; this.children[p].sizeOff = w; this.children[p].sizeMain = h; var x = 0; if(this.anchorEdge == this.EDGE.LEFT){ x = this.children[p].cenX - (this.itemWidth / 2); }else if (this.anchorEdge == this.EDGE.RIGHT){ x = this.children[p].cenX - (w - (this.itemWidth / 2)); }else{ x = this.children[p].cenX - (w / 2); } this.children[p].domNode.style.left = x + 'px'; this.children[p].usualY = Math.round(this.children[p].cenY - (h / 2)); this.children[p].domNode.style.top = this.children[p].usualY + 'px'; } this.children[p].domNode.style.width = w + 'px'; this.children[p].domNode.style.height = h + 'px'; if(this.children[p].svgNode){ this.children[p].svgNode.setSize(w, h); }
parameter | type | description |
---|---|---|
p | ||
scale |