fixed tiles refresh on cartocss update
This commit is contained in:
parent
282be92161
commit
7dc56f7414
@ -184,9 +184,38 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
setOptions: function(opt) {
|
setOptions: function(opt) {
|
||||||
for(var k in opt) {
|
var refresh = false;
|
||||||
this.options[k] = opt[k];
|
|
||||||
|
if(opt.resolution !== undefined && opt.resolution !== this.options.resolution) {
|
||||||
|
this.options.resolution = opt.resolution;
|
||||||
|
refresh = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(opt.steps !== undefined && opt.steps !== this.options.steps) {
|
||||||
|
this.setSteps(opt.steps, { silent: true });
|
||||||
|
refresh = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(opt.column !== undefined && opt.column !== this.options.column) {
|
||||||
|
this.options.column = opt.column;
|
||||||
|
refresh = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(opt.countby !== undefined && opt.countby !== this.options.countby) {
|
||||||
|
this.options.countby = opt.countby;
|
||||||
|
refresh = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(opt.data_aggregation !== undefined) {
|
||||||
|
var c = opt.data_aggregation === 'cumulative';
|
||||||
|
if (this.options.cumulative !== c) {
|
||||||
|
this.options.cumulative = c;
|
||||||
|
refresh = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (refresh) this.reload();
|
||||||
|
return refresh;
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user