fixed drag and drop issue and reverted default easing back to linear

This commit is contained in:
Eric Rowell
2012-04-01 10:06:00 -07:00
parent 3a8afc747c
commit 71b0449071
6 changed files with 13 additions and 23 deletions

View File

@@ -381,7 +381,7 @@ Kinetic.Node.prototype = {
*/
draggable: function(isDraggable) {
if(this.draggable !== isDraggable) {
if(isDraggable && this.isDragging()) {
if(isDraggable) {
this._initDrag();
}
else {
@@ -474,8 +474,8 @@ Kinetic.Node.prototype = {
* radius, scale.x, scale.y, centerOffset.x, centerOffset.y, etc.
* @param {Object} config
* @config {Number} [duration] duration that the transition runs in seconds
* @config {String} [easing] easing function. can be none, ease-in, ease-out, or ease-in-out.
* none is the default
* @config {String} [easing] easing function. can be linear, ease-in, ease-out, or ease-in-out.
* linear is the default
* @config {Function} [callback] callback function to be executed when
* transition completes
*/
@@ -601,6 +601,7 @@ Kinetic.Node.prototype = {
* initialize drag and drop
*/
_initDrag: function() {
this._dragCleanup();
var go = Kinetic.GlobalObject;
var that = this;
this.on('mousedown.initdrag touchstart.initdrag', function(evt) {