Inline simple !goog.isDef() checks
This commit is contained in:
+3
-3
@@ -21,7 +21,7 @@ ol.Size;
|
||||
* @return {ol.Size}
|
||||
*/
|
||||
ol.size.buffer = function(size, buffer, opt_size) {
|
||||
if (!goog.isDef(opt_size)) {
|
||||
if (opt_size === undefined) {
|
||||
opt_size = [0, 0];
|
||||
}
|
||||
opt_size[0] = size[0] + 2 * buffer;
|
||||
@@ -59,7 +59,7 @@ ol.size.hasArea = function(size) {
|
||||
* @return {ol.Size}
|
||||
*/
|
||||
ol.size.scale = function(size, ratio, opt_size) {
|
||||
if (!goog.isDef(opt_size)) {
|
||||
if (opt_size === undefined) {
|
||||
opt_size = [0, 0];
|
||||
}
|
||||
opt_size[0] = (size[0] * ratio + 0.5) | 0;
|
||||
@@ -82,7 +82,7 @@ ol.size.toSize = function(size, opt_size) {
|
||||
return size;
|
||||
} else {
|
||||
goog.asserts.assert(goog.isNumber(size));
|
||||
if (!goog.isDef(opt_size)) {
|
||||
if (opt_size === undefined) {
|
||||
opt_size = [size, size];
|
||||
} else {
|
||||
opt_size[0] = size;
|
||||
|
||||
Reference in New Issue
Block a user