Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit139934b

Browse files
committed
【fix】UT
1 parent49ca985 commit139934b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

‎test/maplibregl/mapping/WebMapV2Spec.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,11 @@ describe('maplibregl_WebMapV2', () => {
203203
getZoom:()=>{
204204
return2;
205205
},
206+
getMaxZoom:()=>{
207+
return22;
208+
},
206209
setZoom:jasmine.createSpy('setZoom').and.callFake(()=>{}),
210+
setMaxZoom:jasmine.createSpy('setMaxZoom').and.callFake(()=>{}),
207211
setCRS:jasmine.createSpy('setCRS').and.callFake(()=>{}),
208212
getCenter:()=>{
209213
return{

‎test/tool/mock_maplibregl_map.js‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const Map = function (options) {
3535
this.zoom=this.options.zoom||0;
3636
this._container=this.options.container||'map';
3737
this._layers={};
38+
this.maxZoom=22;
3839
this._layersList=[];
3940
this.getContainer=function(){
4041
returnthis._container;
@@ -107,7 +108,7 @@ const Map = function (options) {
107108
// Settings
108109
'setMaxBounds',
109110
'setMinZoom',
110-
'setMaxZoom',
111+
//'setMaxZoom',
111112
// Layer properties
112113
'setLayoutProperty',
113114
'setPaintProperty'
@@ -292,7 +293,10 @@ const Map = function (options) {
292293
return0;
293294
};
294295
this.getMaxZoom=function(){
295-
return22;
296+
returnthis.maxZoom||22;
297+
};
298+
this.setMaxZoom=function(maxZoom){
299+
this.maxZoom=maxZoom;
296300
};
297301
this.doubleClickZoom={
298302
disable:function(){},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp