diff --git a/src/map.js b/src/map.js
index 5b95aeeb..0febe63a 100644
--- a/src/map.js
+++ b/src/map.js
@@ -6,6 +6,7 @@
* @param {String} params.backgroundColor Background color of the map in CSS format.
* @param {Boolean} params.zoomOnScroll When set to true map could be zoomed using mouse scroll. Default value is true
.
* @param {Boolean} params.panOnDrag When set to true, the map pans when being dragged. Default value is true
.
+ * @param {Boolean} params.easyPan When set to true, the map can pan freely out of container. Default value is false
.
* @param {Number} params.zoomMax Indicates the maximum zoom ratio which could be reached zooming the map. Default value is 8
.
* @param {Number} params.zoomMin Indicates the minimum zoom ratio which could be reached zooming the map. Default value is 1
.
* @param {Number} params.zoomStep Indicates the multiplier used to zoom map with +/- buttons. Default value is 1.6
.
@@ -271,14 +272,14 @@ jvm.Map.prototype = {
}
if (this.transY > maxTransY) {
- this.transY = maxTransY;
+ if (!this.params.easyPan) this.transY = maxTransY;
} else if (this.transY < minTransY) {
- this.transY = minTransY;
+ if (!this.params.easyPan) this.transY = minTransY;
}
if (this.transX > maxTransX) {
- this.transX = maxTransX;
+ if (!this.params.easyPan) this.transX = maxTransX;
} else if (this.transX < minTransX) {
- this.transX = minTransX;
+ if (!this.params.easyPan) this.transX = minTransX;
}
this.canvas.applyTransformParams(this.scale, this.transX, this.transY);