0
draggalbe 함수를 사용했는데 잘 작동하지만, raphael.pan-zoom.js 라이브러리로 확대/축소 할 때 draggable 함수는 객체를 비동기 적으로 이동시킵니다. 다음은 제 드래그 기능입니다 :raphael.pan-zoom.js 라이브러리를 사용하면 어떻게 draggalbe 함수를 재설정 할 수 있습니까?
(function(R) {
R.el.draggable = function(move, start, up) {
this._ui = this._ui || {};
var that = this;
this._ui.onMove = R.is(move, 'function') ?
move : function(distanceX, distanceY, x, y, deltaX, deltaY) {
that.translate(deltaX, deltaY);
event.stopPropagation();
};
this._ui.onStart = R.is(start, 'function') ? start : function(x, y) {
event.stopPropagation();
};
function onMove(distanceX, distanceY, x, y) {
var deltaX = x - that._ui.lastX;
var deltaY = y - that._ui.lastY;
that._ui.lastX = x;
that._ui.lastY = y;
that._ui.onMove(distanceX, distanceY, x, y, deltaX, deltaY);
//that.paper.safari();
event.stopPropagation();
};
function onStart(x, y) {
that._ui.lastX = x;
that._ui.lastY = y;
that._ui.onStart(x, y);
event.stopPropagation();
};
return this.drag(onMove, onStart, up);
};
}) (라파엘);
어떻게 해결할 수 있습니까?