updates dist for 2.11.4
This commit is contained in:
parent
d5948c8009
commit
e4a913cbad
8
dist/torque.full.js
vendored
8
dist/torque.full.js
vendored
File diff suppressed because one or more lines are too long
20
dist/torque.full.uncompressed.js
vendored
20
dist/torque.full.uncompressed.js
vendored
@ -1660,6 +1660,9 @@ GMapsTorqueLayer.prototype = torque.extend({},
|
||||
if(!this.hidden) return this;
|
||||
this.hidden = false;
|
||||
this.play();
|
||||
if (this.options.steps === 1){
|
||||
this.redraw();
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
@ -2470,6 +2473,9 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
this.options.renderer = this.options.renderer || 'point';
|
||||
this.options.provider = this.options.provider || 'windshaft';
|
||||
|
||||
this.provider = new this.providers[this.options.provider](options);
|
||||
this.renderer = new this.renderers[this.options.renderer](this.getCanvas(), options);
|
||||
|
||||
options.ready = function() {
|
||||
self.fire("change:bounds", {
|
||||
bounds: self.provider.getBounds()
|
||||
@ -2482,9 +2488,6 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
self.setKey(self.key);
|
||||
};
|
||||
|
||||
this.provider = new this.providers[this.options.provider](options);
|
||||
this.renderer = new this.renderers[this.options.renderer](this.getCanvas(), options);
|
||||
|
||||
this.renderer.on("allIconsLoaded", this.render.bind(this));
|
||||
|
||||
|
||||
@ -2568,6 +2571,9 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
if(!this.hidden) return this;
|
||||
this.hidden = false;
|
||||
this.play();
|
||||
if (this.options.steps === 1){
|
||||
this.redraw();
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
@ -2680,7 +2686,7 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function, does the same than ``setKey`` but only
|
||||
* helper function, does the same than ``setKey`` but only
|
||||
* accepts scalars.
|
||||
*/
|
||||
setStep: function(time) {
|
||||
@ -2691,17 +2697,17 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
},
|
||||
|
||||
/**
|
||||
* transform from animation step to Date object
|
||||
* transform from animation step to Date object
|
||||
* that contains the animation time
|
||||
*
|
||||
* ``step`` should be between 0 and ``steps - 1``
|
||||
* ``step`` should be between 0 and ``steps - 1``
|
||||
*/
|
||||
stepToTime: function(step) {
|
||||
var times = this.provider.getKeySpan();
|
||||
var time = times.start + (times.end - times.start)*(step/this.provider.getSteps());
|
||||
return new Date(time);
|
||||
},
|
||||
|
||||
|
||||
timeToStep: function(timestamp) {
|
||||
if (typeof timestamp === "Date") timestamp = timestamp.getTime();
|
||||
if (!this.provider) return 0;
|
||||
|
6
dist/torque.js
vendored
6
dist/torque.js
vendored
File diff suppressed because one or more lines are too long
27
dist/torque.uncompressed.js
vendored
27
dist/torque.uncompressed.js
vendored
@ -1,3 +1,10 @@
|
||||
/**
|
||||
Torque 2.11.3
|
||||
Temporal mapping for CartoDB
|
||||
https://github.com/cartodb/torque
|
||||
**/
|
||||
|
||||
|
||||
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.torque=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||
(function (global){
|
||||
var torque = require('./');
|
||||
@ -1660,6 +1667,9 @@ GMapsTorqueLayer.prototype = torque.extend({},
|
||||
if(!this.hidden) return this;
|
||||
this.hidden = false;
|
||||
this.play();
|
||||
if (this.options.steps === 1){
|
||||
this.redraw();
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
@ -2470,6 +2480,9 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
this.options.renderer = this.options.renderer || 'point';
|
||||
this.options.provider = this.options.provider || 'windshaft';
|
||||
|
||||
this.provider = new this.providers[this.options.provider](options);
|
||||
this.renderer = new this.renderers[this.options.renderer](this.getCanvas(), options);
|
||||
|
||||
options.ready = function() {
|
||||
self.fire("change:bounds", {
|
||||
bounds: self.provider.getBounds()
|
||||
@ -2482,9 +2495,6 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
self.setKey(self.key);
|
||||
};
|
||||
|
||||
this.provider = new this.providers[this.options.provider](options);
|
||||
this.renderer = new this.renderers[this.options.renderer](this.getCanvas(), options);
|
||||
|
||||
this.renderer.on("allIconsLoaded", this.render.bind(this));
|
||||
|
||||
|
||||
@ -2568,6 +2578,9 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
if(!this.hidden) return this;
|
||||
this.hidden = false;
|
||||
this.play();
|
||||
if (this.options.steps === 1){
|
||||
this.redraw();
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
@ -2680,7 +2693,7 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function, does the same than ``setKey`` but only
|
||||
* helper function, does the same than ``setKey`` but only
|
||||
* accepts scalars.
|
||||
*/
|
||||
setStep: function(time) {
|
||||
@ -2691,17 +2704,17 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
},
|
||||
|
||||
/**
|
||||
* transform from animation step to Date object
|
||||
* transform from animation step to Date object
|
||||
* that contains the animation time
|
||||
*
|
||||
* ``step`` should be between 0 and ``steps - 1``
|
||||
* ``step`` should be between 0 and ``steps - 1``
|
||||
*/
|
||||
stepToTime: function(step) {
|
||||
var times = this.provider.getKeySpan();
|
||||
var time = times.start + (times.end - times.start)*(step/this.provider.getSteps());
|
||||
return new Date(time);
|
||||
},
|
||||
|
||||
|
||||
timeToStep: function(timestamp) {
|
||||
if (typeof timestamp === "Date") timestamp = timestamp.getTime();
|
||||
if (!this.provider) return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user