* Set the bounds for the comment manager * @param width - width value px * @param height - height value px
(width:number = this.stage.offsetWidth, height:number = this.stage.offsetHeight)
| 128 | * @param height - height value px |
| 129 | */ |
| 130 | public setBounds(width:number = this.stage.offsetWidth, height:number = this.stage.offsetHeight):void { |
| 131 | this._width = width; |
| 132 | this._height = height; |
| 133 | this.dispatchEvent("resize"); |
| 134 | for(var allocator in this._csa){ |
| 135 | if(this._csa.hasOwnProperty(allocator)){ |
| 136 | var csa:CommentSpaceAllocator = this._csa[allocator]; |
| 137 | csa.setBounds(this._width, this._height); |
| 138 | } |
| 139 | } |
| 140 | this.stage.style.perspective = this.width * Math.tan(40 * Math.PI/180) / 2 + "px"; |
| 141 | // TODO: Remove webkit prefix |
| 142 | this.stage.style["webkitPerspective"] = this.width * Math.tan(40 * Math.PI/180) / 2 + "px"; |
| 143 | } |
| 144 | |
| 145 | /** |
| 146 | * Dispatches an event |
nothing calls this directly
no test coverage detected