(gap: number)
| 17 | } |
| 18 | |
| 19 | public setContentGap(gap: number): void{ |
| 20 | var ex: number, outerWidth: number, addGap: number = 0; |
| 21 | |
| 22 | // Get our outer width |
| 23 | outerWidth = $(this.locationString).outerWidth(); |
| 24 | |
| 25 | // Get the real ex value |
| 26 | ex = this.getRealExValueFromTheStatusBar(); |
| 27 | |
| 28 | // If our outerWidth is bigger than the window, calc an additional gap |
| 29 | if(outerWidth > $(window).width()) |
| 30 | addGap = -(outerWidth-$(window).width())/2; |
| 31 | |
| 32 | // Finally change the "left" value of our div |
| 33 | $(this.locationString).css({"left" : ((gap/2)*ex+addGap).toString() + "px"}); |
| 34 | } |
| 35 | |
| 36 | // Public setters |
| 37 | public setLocationString(locationString: string): void{ |
no test coverage detected