adds dists for 2.10.1

This commit is contained in:
Francisco Dans 2015-03-02 17:35:13 +01:00
parent 6c094e3ba9
commit 043e7b0090
4 changed files with 29 additions and 21 deletions

14
dist/torque.full.js vendored

File diff suppressed because one or more lines are too long

View File

@ -48,6 +48,9 @@ var cancelAnimationFrame = global.cancelAnimationFrame
this.running = true; this.running = true;
requestAnimationFrame(this._tick); requestAnimationFrame(this._tick);
this.options.onStart && this.options.onStart(); this.options.onStart && this.options.onStart();
if(this.options.steps === 1){
this.running = false;
}
}, },
isRunning: function() { isRunning: function() {
@ -82,6 +85,7 @@ var cancelAnimationFrame = global.cancelAnimationFrame
this.range = torque.math.linear(0, this.options.steps); this.range = torque.math.linear(0, this.options.steps);
this.rangeInv = this.range.invert(); this.rangeInv = this.range.invert();
this.time(this._time); this.time(this._time);
this.start();
return this; return this;
}, },
@ -4582,6 +4586,7 @@ var filters = require('./torque_filters');
} }
var tileMax = this.options.resolution * (this.TILE_SIZE/this.options.resolution - 1) var tileMax = this.options.resolution * (this.TILE_SIZE/this.options.resolution - 1)
var activePixels = tile.timeCount[key]; var activePixels = tile.timeCount[key];
var anchor = this.options.resolution/2;
if (activePixels) { if (activePixels) {
var pixelIndex = tile.timeIndex[key]; var pixelIndex = tile.timeIndex[key];
for(var p = 0; p < activePixels; ++p) { for(var p = 0; p < activePixels; ++p) {
@ -4593,8 +4598,8 @@ var filters = require('./torque_filters');
sp = sprites[c] = this.generateSprite(shader, c, torque.extend({ zoom: tile.z, 'frame-offset': frame_offset }, shaderVars)); sp = sprites[c] = this.generateSprite(shader, c, torque.extend({ zoom: tile.z, 'frame-offset': frame_offset }, shaderVars));
} }
if (sp) { if (sp) {
var x = tile.x[posIdx]- (sp.width >> 1); var x = tile.x[posIdx]- (sp.width >> 1) + anchor;
var y = tileMax - tile.y[posIdx]; // flip mercator var y = tileMax - tile.y[posIdx] + anchor; // flip mercator
ctx.drawImage(sp, x, y - (sp.height >> 1)); ctx.drawImage(sp, x, y - (sp.height >> 1));
} }
} }
@ -13725,7 +13730,7 @@ refs.map(function(version) {
},{}],72:[function(require,module,exports){ },{}],72:[function(require,module,exports){
module.exports={ module.exports={
"name": "carto", "name": "carto",
"version": "0.15.1-cdb1", "version": "0.15.1",
"description": "CartoCSS Stylesheet Compiler", "description": "CartoCSS Stylesheet Compiler",
"url": "https://github.com/cartodb/carto", "url": "https://github.com/cartodb/carto",
"repository": { "repository": {
@ -13802,12 +13807,10 @@ module.exports={
"url": "https://github.com/cartodb/carto/issues" "url": "https://github.com/cartodb/carto/issues"
}, },
"homepage": "https://github.com/cartodb/carto", "homepage": "https://github.com/cartodb/carto",
"_id": "carto@0.15.1-cdb1", "_id": "carto@0.15.1",
"dist": { "_shasum": "2e8a46e5656d86e824ae7745b91a72198b25ded5",
"shasum": "ab2cd136b72f8f05ac960987eea099cbedd6948e" "_resolved": "https://github.com/CartoDB/carto/archive/master.tar.gz",
}, "_from": "https://github.com/CartoDB/carto/archive/master.tar.gz"
"_from": "https://github.com/CartoDB/carto/archive/master.tar.gz",
"_resolved": "https://github.com/CartoDB/carto/archive/master.tar.gz"
} }
},{}]},{},[10])(10) },{}]},{},[10])(10)

6
dist/torque.js vendored

File diff suppressed because one or more lines are too long

View File

@ -48,6 +48,9 @@ var cancelAnimationFrame = global.cancelAnimationFrame
this.running = true; this.running = true;
requestAnimationFrame(this._tick); requestAnimationFrame(this._tick);
this.options.onStart && this.options.onStart(); this.options.onStart && this.options.onStart();
if(this.options.steps === 1){
this.running = false;
}
}, },
isRunning: function() { isRunning: function() {
@ -82,6 +85,7 @@ var cancelAnimationFrame = global.cancelAnimationFrame
this.range = torque.math.linear(0, this.options.steps); this.range = torque.math.linear(0, this.options.steps);
this.rangeInv = this.range.invert(); this.rangeInv = this.range.invert();
this.time(this._time); this.time(this._time);
this.start();
return this; return this;
}, },
@ -4582,6 +4586,7 @@ var filters = require('./torque_filters');
} }
var tileMax = this.options.resolution * (this.TILE_SIZE/this.options.resolution - 1) var tileMax = this.options.resolution * (this.TILE_SIZE/this.options.resolution - 1)
var activePixels = tile.timeCount[key]; var activePixels = tile.timeCount[key];
var anchor = this.options.resolution/2;
if (activePixels) { if (activePixels) {
var pixelIndex = tile.timeIndex[key]; var pixelIndex = tile.timeIndex[key];
for(var p = 0; p < activePixels; ++p) { for(var p = 0; p < activePixels; ++p) {
@ -4593,8 +4598,8 @@ var filters = require('./torque_filters');
sp = sprites[c] = this.generateSprite(shader, c, torque.extend({ zoom: tile.z, 'frame-offset': frame_offset }, shaderVars)); sp = sprites[c] = this.generateSprite(shader, c, torque.extend({ zoom: tile.z, 'frame-offset': frame_offset }, shaderVars));
} }
if (sp) { if (sp) {
var x = tile.x[posIdx]- (sp.width >> 1); var x = tile.x[posIdx]- (sp.width >> 1) + anchor;
var y = tileMax - tile.y[posIdx]; // flip mercator var y = tileMax - tile.y[posIdx] + anchor; // flip mercator
ctx.drawImage(sp, x, y - (sp.height >> 1)); ctx.drawImage(sp, x, y - (sp.height >> 1));
} }
} }