add Bounds getSize method

This commit is contained in:
Vladimir Agafonkin 2012-12-11 20:14:17 +02:00
parent edeea11919
commit 3051b22a88

View File

@ -44,6 +44,10 @@ L.Bounds = L.Class.extend({
return new L.Point(this.max.x, this.min.y);
},
getSize: function () {
return this.max.subtract(this.min);
},
contains: function (obj) { // (Bounds) or (Point) -> Boolean
var min, max;