mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
fixed drag and drop issue and reverted default easing back to linear
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user