Add ol.size.hasArea
This commit is contained in:
@@ -41,6 +41,16 @@ ol.size.equals = function(a, b) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Determines if a size has a positive area.
|
||||
* @param {ol.Size} size The size to test.
|
||||
* @return {boolean} The size has a positive area.
|
||||
*/
|
||||
ol.size.hasArea = function(size) {
|
||||
return size[0] > 0 && size[1] > 0;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns a size scaled by a ratio. The result will be an array of integers.
|
||||
* @param {ol.Size} size Size.
|
||||
|
||||
Reference in New Issue
Block a user