Fixes call to carto's getStyle

This commit is contained in:
Raul Ochoa 2014-12-09 18:10:09 +01:00
parent 6c45a805d2
commit 9f35092943
2 changed files with 5 additions and 5 deletions

View File

@ -64,7 +64,7 @@ var carto = global.carto || require('carto');
//
generateSprite: function(shader, value, shaderVars) {
var prof = Profiler.metric('torque.renderer.point.generateSprite').start();
var st = shader.getStyle('canvas-2d', {
var st = shader.getStyle({
value: value
}, shaderVars);

View File

@ -44,10 +44,10 @@ test('render conditional point layers', function() {
renderer.setCartoCSS(css)
var layer = renderer._shader.getLayers()[0];
var st = layer.getStyle('canvas-2d', {}, { zoom: 10, 'frame-offset': 0 });
equal(st['point-radius'], 10);
st = layer.getStyle('canvas-2d', {}, { zoom: 18, 'frame-offset': 0 });
equal(st['point-radius'], 20);
var st = layer.getStyle({}, { zoom: 10, 'frame-offset': 0 });
equal(st['marker-width'], 10);
st = layer.getStyle({}, { zoom: 18, 'frame-offset': 0 });
equal(st['marker-width'], 20);
});
test('should generate sprite when maker-fill > 0', function() {