Jsdoc fixes
This commit is contained in:
@@ -47,18 +47,18 @@ cameraGrid.CameraGrid = function(container, sourceUrls, resolutions, getUrl) {
|
|||||||
this.gridHeightCells_ = 0;
|
this.gridHeightCells_ = 0;
|
||||||
|
|
||||||
/** @type {number} */
|
/** @type {number} */
|
||||||
this.imgWidthPx_ = 0;
|
this.imgWidthPx_;
|
||||||
/** @type {number} */
|
/** @type {number} */
|
||||||
this.imgHeightPx_ = 0;
|
this.imgHeightPx_;
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.constraint_ = null;
|
this.constraint_ = null;
|
||||||
|
|
||||||
/** @type {number} */
|
/** @type {number} */
|
||||||
this.containerImgWidthPx_ = 0;
|
this.containerImgWidthPx_;
|
||||||
/** @type {number} */
|
/** @type {number} */
|
||||||
this.ctonainerImgHeightPx_ = 0;
|
this.ctonainerImgHeightPx_;
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.containerConstraint_ = null;
|
this.containerConstraint_;
|
||||||
|
|
||||||
/** @type {number?} */
|
/** @type {number?} */
|
||||||
this.selected_ = null;
|
this.selected_ = null;
|
||||||
@@ -232,7 +232,7 @@ cameraGrid.CameraGrid.prototype.buildStylesheet_ = function() {
|
|||||||
* Calculate optimal grid sizing.
|
* Calculate optimal grid sizing.
|
||||||
* This pile of magic math calculates the optimal grid width and height to
|
* This pile of magic math calculates the optimal grid width and height to
|
||||||
* maximize the size of all video feeds while preserving their aspect ratios.
|
* maximize the size of all video feeds while preserving their aspect ratios.
|
||||||
* @returns {Object.<number, number, string, string, number, number>
|
* @returns {Object.<number, number, string, string, number, number>}
|
||||||
*/
|
*/
|
||||||
cameraGrid.CameraGrid.prototype.calculateGrid_ = function() {
|
cameraGrid.CameraGrid.prototype.calculateGrid_ = function() {
|
||||||
var containerWidth = this.container_.offsetWidth;
|
var containerWidth = this.container_.offsetWidth;
|
||||||
@@ -310,8 +310,7 @@ cameraGrid.CameraGrid.prototype.calculateGrid_ = function() {
|
|||||||
cameraGrid.CameraGrid.prototype.findMinimumResolution_ = function(tileWidth, tileHeight) {
|
cameraGrid.CameraGrid.prototype.findMinimumResolution_ = function(tileWidth, tileHeight) {
|
||||||
for (var i = 0; i < this.resolutions_.length; i++) {
|
for (var i = 0; i < this.resolutions_.length; i++) {
|
||||||
var resolution = this.resolutions_[i];
|
var resolution = this.resolutions_[i];
|
||||||
if (i + 1 < this.resolutions_.length &&
|
if (resolution[0] < tileWidth && resolution[1] < tileHeight) {
|
||||||
(resolution[0] < tileWidth && resolution[1] < tileHeight)) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
@@ -319,6 +318,12 @@ cameraGrid.CameraGrid.prototype.findMinimumResolution_ = function(tileWidth, til
|
|||||||
imgHeightPx: resolution[1],
|
imgHeightPx: resolution[1],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
console.log('Your screen is larger than the largest feed resolution. Images will be scaled up');
|
||||||
|
var lastResolution = this.resolutions_[this.resolutions_.length - 1];
|
||||||
|
return {
|
||||||
|
imgWidthPx: lastResolution[0],
|
||||||
|
imgHeightPx: lastResolution[1],
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
cameraGrid.CameraGrid.prototype.deletePreviousSiblings_ = function(element) {
|
cameraGrid.CameraGrid.prototype.deletePreviousSiblings_ = function(element) {
|
||||||
|
|||||||
Reference in New Issue
Block a user