small refactor
This commit is contained in:
parent
c500a9c025
commit
f399acb8cc
@ -110,11 +110,19 @@ var Filters = require('./torque_filters');
|
||||
// generate sprite based on cartocss style
|
||||
//
|
||||
generateSprite: function(shader, value, shaderVars) {
|
||||
var self = this;
|
||||
var prof = Profiler.metric('torque.renderer.point.generateSprite').start();
|
||||
var st = shader.getStyle({
|
||||
value: value
|
||||
}, shaderVars);
|
||||
|
||||
var ret = this.generateSpriteForStyle(st);
|
||||
prof.end(true);
|
||||
return ret;
|
||||
},
|
||||
|
||||
generateSpriteForStyle: function(st) {
|
||||
var self = this;
|
||||
|
||||
if(this._style === null || this._style !== st){
|
||||
this._style = st;
|
||||
}
|
||||
@ -159,7 +167,6 @@ var Filters = require('./torque_filters');
|
||||
cartocss.renderPoint(ctx, st);
|
||||
}
|
||||
}
|
||||
prof.end(true);
|
||||
if (torque.flags.sprites_to_images) {
|
||||
var i = this._createImage();
|
||||
i.src = canvas.toDataURL();
|
||||
|
Loading…
Reference in New Issue
Block a user