Actually, the way you reached it is the easiest way to do this: keep a link to this:
var myPanorama = this;
myPanorama.easeDragging();
jQuery.proxy(), ( @Nick):
$(document).mouseup($.proxy(function(){
this.easeDragging();
}, this));
- ECMAScript 5th edition.bind(), , :
if (!Function.prototype.bind) {
Function.prototype.bind = function(){
var fn = this, args = Array.prototype.slice.call(arguments),
object = args.shift();
return function(){
return fn.apply(object,
args.concat(Array.prototype.slice.call(arguments)));
};
};
}
:
$(document).mouseup((function(){
this.easeDragging();
}).bind(this));