Merge pull request #201 from fredj/kinetic-begin

Remove x,y params from ol.Kinetic.begin
This commit is contained in:
Frédéric Junod
2013-02-18 08:01:27 -08:00
2 changed files with 4 additions and 5 deletions

View File

@@ -106,7 +106,8 @@ ol.interaction.DragPan.prototype.handleDragStart = function(mapBrowserEvent) {
var browserEvent = mapBrowserEvent.browserEvent;
if (this.condition_(browserEvent)) {
if (this.kinetic_) {
this.kinetic_.begin(browserEvent.clientX, browserEvent.clientY);
this.kinetic_.begin();
this.kinetic_.update(browserEvent.clientX, browserEvent.clientY);
}
var map = mapBrowserEvent.map;
map.requestRenderFrame();

View File

@@ -63,14 +63,12 @@ ol.Kinetic = function(decay, minVelocity, delay) {
/**
* @param {number} x X.
* @param {number} y Y.
* FIXME empty description for jsdoc
*/
ol.Kinetic.prototype.begin = function(x, y) {
ol.Kinetic.prototype.begin = function() {
this.points_.length = 0;
this.angle_ = 0;
this.initialVelocity_ = 0;
this.update(x, y);
};