From 9a1d9a738840b4c9eaad82ad96259abb83da95b6 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Wed, 23 Apr 2014 11:34:51 -0700 Subject: [PATCH] No idea why this is broken. --- cameragrid.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cameragrid.js b/cameragrid.js index 13245a2..4ad095a 100644 --- a/cameragrid.js +++ b/cameragrid.js @@ -15,9 +15,20 @@ limitations under the License. */ var cameraGrid = {}; +/** + * @callback getUrl + * @param {String} sourceUrl Base URL of the camera + * @param {number} width Valid resolution width in pixels + * @param {number} height Valid resolution height in pixels + */ + /** * @constructor * @export + * @param {Node} container DOM container object to hold UI + * @param {String[]} sourceUrls Array of Axis camera URLs + * @param {number[][]=} resolutions Array of [width,height] resolution tuples + * @param {getUrl=} getUrl Callback to generate URL for a given camera */ cameraGrid.CameraGrid = function(container, sourceUrls, resolutions, getUrl) { this.container_ = container; @@ -87,7 +98,7 @@ cameraGrid.CameraGrid.prototype.setSelectedNoScan_ = function(index) { }; cameraGrid.CameraGrid.prototype.setSelected_ = function(index) { - var old_index; + var old_index = null; if (this.selected_ == index) { this.removeCSSClass_(this.cells_[this.selected_], 'cameraGridFullScreen');