google code style

pull/2661/head
Isaac Connor 2019-07-04 09:04:43 -04:00
parent 2470c09b20
commit 256a0aa679
1 changed files with 14 additions and 14 deletions

View File

@ -51,51 +51,51 @@ function newWindow( url, name, width, height ) {
function getPopupSize( tag, width, height ) {
if ( typeof popupSizes == 'undefined' ) {
Error( "Can't find any window sizes" );
return ( {'width': 0, 'height': 0} );
Error("Can't find any window sizes");
return {'width': 0, 'height': 0};
}
var popupSize = Object.clone( popupSizes[tag] );
var popupSize = Object.clone(popupSizes[tag]);
if ( !popupSize ) {
Error( "Can't find window size for tag '"+tag+"'" );
return ( {'width': 0, 'height': 0} );
Error("Can't find window size for tag '"+tag+"'");
return {'width': 0, 'height': 0};
}
if ( popupSize.width && popupSize.height ) {
if ( width || height ) {
Warning( "Ignoring passed dimensions "+width+"x"+height+" when getting popup size for tag '"+tag+"'" );
Warning("Ignoring passed dimensions "+width+"x"+height+" when getting popup size for tag '"+tag+"'");
}
return ( popupSize );
return popupSize;
}
if ( popupSize.addWidth ) {
popupSize.width = popupSize.addWidth;
if ( !width ) {
Error( "Got addWidth but no passed width when getting popup size for tag '"+tag+"'" );
Error("Got addWidth but no passed width when getting popup size for tag '"+tag+"'");
} else {
popupSize.width += parseInt(width);
}
} else if ( width ) {
popupSize.width = width;
Error( "Got passed width but no addWidth when getting popup size for tag '"+tag+"'" );
Error("Got passed width but no addWidth when getting popup size for tag '"+tag+"'");
}
if ( popupSize.minWidth && popupSize.width < popupSize.minWidth ) {
Warning( "Adjusting to minimum width when getting popup size for tag '"+tag+"'" );
Warning("Adjusting to minimum width when getting popup size for tag '"+tag+"'");
popupSize.width = popupSize.minWidth;
}
if ( popupSize.addHeight ) {
popupSize.height = popupSize.addHeight;
if ( !height ) {
Error( "Got addHeight but no passed height when getting popup size for tag '"+tag+"'" );
Error("Got addHeight but no passed height when getting popup size for tag '"+tag+"'");
} else {
popupSize.height += parseInt(height);
}
} else if ( height ) {
popupSize.height = height;
Error( "Got passed height but no addHeight when getting popup size for tag '"+tag+"'" );
Error("Got passed height but no addHeight when getting popup size for tag '"+tag+"'");
}
if ( popupSize.minHeight && ( popupSize.height < popupSize.minHeight ) ) {
Warning( "Adjusting to minimum height ("+popupSize.minHeight+") when getting popup size for tag '"+tag+"' because calculated height is " + popupSize.height );
Warning("Adjusting to minimum height ("+popupSize.minHeight+") when getting popup size for tag '"+tag+"' because calculated height is " + popupSize.height);
popupSize.height = popupSize.minHeight;
}
return ( popupSize );
return popupSize;
}
function zmWindow() {