geojs 1.10.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/geo.js +19 -9
- package/geo.lean.js +19 -9
- package/geo.lean.min.js +1 -1
- package/geo.min.js +1 -1
- package/package.json +1 -1
- package/src/map.js +15 -7
package/geo.js
CHANGED
|
@@ -16879,13 +16879,15 @@ var map = function map(arg) {
|
|
|
16879
16879
|
* center.
|
|
16880
16880
|
* @param {boolean} [ignoreDiscreteZoom] If `true`, ignore the discreteZoom
|
|
16881
16881
|
* option when determining the new view.
|
|
16882
|
+
* @param {boolean} [ignoreClampBounds] If `true`, ignore the clampBounds
|
|
16883
|
+
* option when determining the new view.
|
|
16882
16884
|
* @returns {number|this}
|
|
16883
16885
|
* @fires geo.event.zoom
|
|
16884
16886
|
* @fires geo.event.pan
|
|
16885
16887
|
*/
|
|
16886
16888
|
|
|
16887
16889
|
|
|
16888
|
-
this.zoom = function (val, origin, ignoreDiscreteZoom) {
|
|
16890
|
+
this.zoom = function (val, origin, ignoreDiscreteZoom, ignoreClampBounds) {
|
|
16889
16891
|
if (val === undefined) {
|
|
16890
16892
|
return m_zoom;
|
|
16891
16893
|
}
|
|
@@ -16894,10 +16896,14 @@ var map = function map(arg) {
|
|
|
16894
16896
|
/* If we are zooming around a point, ignore the clamp bounds */
|
|
16895
16897
|
|
|
16896
16898
|
var aroundPoint = origin && (origin.mapgcs || origin.geo) && origin.map;
|
|
16897
|
-
|
|
16899
|
+
|
|
16900
|
+
if (aroundPoint) {
|
|
16901
|
+
ignoreClampBounds = true;
|
|
16902
|
+
}
|
|
16898
16903
|
/* The ignoreDiscreteZoom flag is intended to allow non-integer zoom values
|
|
16899
16904
|
* during animation. */
|
|
16900
16905
|
|
|
16906
|
+
|
|
16901
16907
|
val = m_this._fix_zoom(val, ignoreDiscreteZoom);
|
|
16902
16908
|
|
|
16903
16909
|
if (val === m_zoom) {
|
|
@@ -16924,7 +16930,7 @@ var map = function map(arg) {
|
|
|
16924
16930
|
m_this.pan({
|
|
16925
16931
|
x: 0,
|
|
16926
16932
|
y: 0
|
|
16927
|
-
}, ignoreDiscreteZoom);
|
|
16933
|
+
}, ignoreDiscreteZoom, ignoreClampBounds);
|
|
16928
16934
|
}
|
|
16929
16935
|
|
|
16930
16936
|
return m_this;
|
|
@@ -17670,6 +17676,8 @@ var map = function map(arg) {
|
|
|
17670
17676
|
* a value based on what canceled a transition, `transition`: the current
|
|
17671
17677
|
* transition that just completed, `next`: a boolean if another transition
|
|
17672
17678
|
* follows immediately.
|
|
17679
|
+
* @param {boolean} [opts.endClamp=true] If `false`, the last center change
|
|
17680
|
+
* will not clamp to the bounds and zoom values.
|
|
17673
17681
|
* @param {string|geo.transform|null} [gcs] Input gcs. `undefined` to use
|
|
17674
17682
|
* the interface gcs, `null` to use the map gcs, or any other transform.
|
|
17675
17683
|
* Applies only to `opts.center` and to converting zoom values to height,
|
|
@@ -17779,7 +17787,8 @@ var map = function map(arg) {
|
|
|
17779
17787
|
zCoord: opts.zCoord,
|
|
17780
17788
|
done: opts.done,
|
|
17781
17789
|
duration: opts.duration,
|
|
17782
|
-
zoomOrigin: opts.zoomOrigin
|
|
17790
|
+
zoomOrigin: opts.zoomOrigin,
|
|
17791
|
+
endClamp: opts.endClamp
|
|
17783
17792
|
};
|
|
17784
17793
|
m_transition.interp = opts.interp([m_transition.start.center.x, m_transition.start.center.y, opts.zCoord ? zoom2z(m_transition.start.zoom) : m_transition.start.zoom, m_transition.start.rotation], [m_transition.end.center ? m_transition.end.center.x : m_transition.start.center.x, m_transition.end.center ? m_transition.end.center.y : m_transition.start.center.y, opts.zCoord ? zoom2z(m_transition.end.zoom) : m_transition.end.zoom, m_transition.end.rotation]);
|
|
17785
17794
|
/**
|
|
@@ -17831,10 +17840,11 @@ var map = function map(arg) {
|
|
|
17831
17840
|
if (m_transition.end.center) {
|
|
17832
17841
|
var needZoom = m_zoom !== m_this._fix_zoom(m_transition.end.zoom);
|
|
17833
17842
|
|
|
17834
|
-
|
|
17843
|
+
var noEndClamp = needZoom || opts.endClamp === false;
|
|
17844
|
+
m_this.center(m_transition.end.center, null, noEndClamp, noEndClamp);
|
|
17835
17845
|
}
|
|
17836
17846
|
|
|
17837
|
-
m_this.zoom(m_transition.end.zoom, m_transition.zoomOrigin);
|
|
17847
|
+
m_this.zoom(m_transition.end.zoom, m_transition.zoomOrigin, opts.endClamp === false, opts.endClamp === false);
|
|
17838
17848
|
m_this.rotation(fix_rotation(m_transition.end.rotation));
|
|
17839
17849
|
}
|
|
17840
17850
|
|
|
@@ -17874,7 +17884,7 @@ var map = function map(arg) {
|
|
|
17874
17884
|
x: p[0],
|
|
17875
17885
|
y: p[1]
|
|
17876
17886
|
}, null);
|
|
17877
|
-
m_this.zoom(p[2], m_transition.zoomOrigin, true);
|
|
17887
|
+
m_this.zoom(p[2], m_transition.zoomOrigin, true, true);
|
|
17878
17888
|
}
|
|
17879
17889
|
|
|
17880
17890
|
m_this.rotation(p[3], undefined, true);
|
|
@@ -27813,7 +27823,7 @@ module.exports = sceneObject;
|
|
|
27813
27823
|
* @constant
|
|
27814
27824
|
* @type {string}
|
|
27815
27825
|
*/
|
|
27816
|
-
module.exports = "
|
|
27826
|
+
module.exports = "b37bd8311e8146b64ad199fccd0b4a5404d78157";
|
|
27817
27827
|
|
|
27818
27828
|
/***/ }),
|
|
27819
27829
|
|
|
@@ -40938,7 +40948,7 @@ module.exports = vectorFeature;
|
|
|
40938
40948
|
* @constant
|
|
40939
40949
|
* @type {string}
|
|
40940
40950
|
*/
|
|
40941
|
-
module.exports = "1.10.
|
|
40951
|
+
module.exports = "1.10.1";
|
|
40942
40952
|
|
|
40943
40953
|
/***/ }),
|
|
40944
40954
|
|
package/geo.lean.js
CHANGED
|
@@ -16879,13 +16879,15 @@ var map = function map(arg) {
|
|
|
16879
16879
|
* center.
|
|
16880
16880
|
* @param {boolean} [ignoreDiscreteZoom] If `true`, ignore the discreteZoom
|
|
16881
16881
|
* option when determining the new view.
|
|
16882
|
+
* @param {boolean} [ignoreClampBounds] If `true`, ignore the clampBounds
|
|
16883
|
+
* option when determining the new view.
|
|
16882
16884
|
* @returns {number|this}
|
|
16883
16885
|
* @fires geo.event.zoom
|
|
16884
16886
|
* @fires geo.event.pan
|
|
16885
16887
|
*/
|
|
16886
16888
|
|
|
16887
16889
|
|
|
16888
|
-
this.zoom = function (val, origin, ignoreDiscreteZoom) {
|
|
16890
|
+
this.zoom = function (val, origin, ignoreDiscreteZoom, ignoreClampBounds) {
|
|
16889
16891
|
if (val === undefined) {
|
|
16890
16892
|
return m_zoom;
|
|
16891
16893
|
}
|
|
@@ -16894,10 +16896,14 @@ var map = function map(arg) {
|
|
|
16894
16896
|
/* If we are zooming around a point, ignore the clamp bounds */
|
|
16895
16897
|
|
|
16896
16898
|
var aroundPoint = origin && (origin.mapgcs || origin.geo) && origin.map;
|
|
16897
|
-
|
|
16899
|
+
|
|
16900
|
+
if (aroundPoint) {
|
|
16901
|
+
ignoreClampBounds = true;
|
|
16902
|
+
}
|
|
16898
16903
|
/* The ignoreDiscreteZoom flag is intended to allow non-integer zoom values
|
|
16899
16904
|
* during animation. */
|
|
16900
16905
|
|
|
16906
|
+
|
|
16901
16907
|
val = m_this._fix_zoom(val, ignoreDiscreteZoom);
|
|
16902
16908
|
|
|
16903
16909
|
if (val === m_zoom) {
|
|
@@ -16924,7 +16930,7 @@ var map = function map(arg) {
|
|
|
16924
16930
|
m_this.pan({
|
|
16925
16931
|
x: 0,
|
|
16926
16932
|
y: 0
|
|
16927
|
-
}, ignoreDiscreteZoom);
|
|
16933
|
+
}, ignoreDiscreteZoom, ignoreClampBounds);
|
|
16928
16934
|
}
|
|
16929
16935
|
|
|
16930
16936
|
return m_this;
|
|
@@ -17670,6 +17676,8 @@ var map = function map(arg) {
|
|
|
17670
17676
|
* a value based on what canceled a transition, `transition`: the current
|
|
17671
17677
|
* transition that just completed, `next`: a boolean if another transition
|
|
17672
17678
|
* follows immediately.
|
|
17679
|
+
* @param {boolean} [opts.endClamp=true] If `false`, the last center change
|
|
17680
|
+
* will not clamp to the bounds and zoom values.
|
|
17673
17681
|
* @param {string|geo.transform|null} [gcs] Input gcs. `undefined` to use
|
|
17674
17682
|
* the interface gcs, `null` to use the map gcs, or any other transform.
|
|
17675
17683
|
* Applies only to `opts.center` and to converting zoom values to height,
|
|
@@ -17779,7 +17787,8 @@ var map = function map(arg) {
|
|
|
17779
17787
|
zCoord: opts.zCoord,
|
|
17780
17788
|
done: opts.done,
|
|
17781
17789
|
duration: opts.duration,
|
|
17782
|
-
zoomOrigin: opts.zoomOrigin
|
|
17790
|
+
zoomOrigin: opts.zoomOrigin,
|
|
17791
|
+
endClamp: opts.endClamp
|
|
17783
17792
|
};
|
|
17784
17793
|
m_transition.interp = opts.interp([m_transition.start.center.x, m_transition.start.center.y, opts.zCoord ? zoom2z(m_transition.start.zoom) : m_transition.start.zoom, m_transition.start.rotation], [m_transition.end.center ? m_transition.end.center.x : m_transition.start.center.x, m_transition.end.center ? m_transition.end.center.y : m_transition.start.center.y, opts.zCoord ? zoom2z(m_transition.end.zoom) : m_transition.end.zoom, m_transition.end.rotation]);
|
|
17785
17794
|
/**
|
|
@@ -17831,10 +17840,11 @@ var map = function map(arg) {
|
|
|
17831
17840
|
if (m_transition.end.center) {
|
|
17832
17841
|
var needZoom = m_zoom !== m_this._fix_zoom(m_transition.end.zoom);
|
|
17833
17842
|
|
|
17834
|
-
|
|
17843
|
+
var noEndClamp = needZoom || opts.endClamp === false;
|
|
17844
|
+
m_this.center(m_transition.end.center, null, noEndClamp, noEndClamp);
|
|
17835
17845
|
}
|
|
17836
17846
|
|
|
17837
|
-
m_this.zoom(m_transition.end.zoom, m_transition.zoomOrigin);
|
|
17847
|
+
m_this.zoom(m_transition.end.zoom, m_transition.zoomOrigin, opts.endClamp === false, opts.endClamp === false);
|
|
17838
17848
|
m_this.rotation(fix_rotation(m_transition.end.rotation));
|
|
17839
17849
|
}
|
|
17840
17850
|
|
|
@@ -17874,7 +17884,7 @@ var map = function map(arg) {
|
|
|
17874
17884
|
x: p[0],
|
|
17875
17885
|
y: p[1]
|
|
17876
17886
|
}, null);
|
|
17877
|
-
m_this.zoom(p[2], m_transition.zoomOrigin, true);
|
|
17887
|
+
m_this.zoom(p[2], m_transition.zoomOrigin, true, true);
|
|
17878
17888
|
}
|
|
17879
17889
|
|
|
17880
17890
|
m_this.rotation(p[3], undefined, true);
|
|
@@ -27813,7 +27823,7 @@ module.exports = sceneObject;
|
|
|
27813
27823
|
* @constant
|
|
27814
27824
|
* @type {string}
|
|
27815
27825
|
*/
|
|
27816
|
-
module.exports = "
|
|
27826
|
+
module.exports = "b37bd8311e8146b64ad199fccd0b4a5404d78157";
|
|
27817
27827
|
|
|
27818
27828
|
/***/ }),
|
|
27819
27829
|
|
|
@@ -40938,7 +40948,7 @@ module.exports = vectorFeature;
|
|
|
40938
40948
|
* @constant
|
|
40939
40949
|
* @type {string}
|
|
40940
40950
|
*/
|
|
40941
|
-
module.exports = "1.10.
|
|
40951
|
+
module.exports = "1.10.1";
|
|
40942
40952
|
|
|
40943
40953
|
/***/ }),
|
|
40944
40954
|
|