@@ -252,8 +252,6 @@ ZoomBehavior.create = function (options) {
applyZoomAndPan();
}
functiondoZoom(){
if(deltaY!=0){
varmaxDelta=10;
...
...
@@ -284,4 +282,99 @@ ZoomBehavior.create = function (options) {
returnzoom;
}
if(typeof(Q)=="undefined"){
varQ=function(){
};
Q.copy=function(src,target,options,depth){
///<summary>Copies an object into a target object, recursively cloning any object or array in the way, overwrite=true will overwrite a primitive field value even if exists</summary>
console.warn("Q.copy is in depth of 100 - possible circular reference")
}
///<summary>Copies an object into a target object, recursively cloning any object or array in the way, overwrite=true will overwrite a primitive field value even if exists</summary>
///<summary>Iterates over the array, performing an async function for each item, going to the next one only when the previous one has finished (called his callback)</summary>
/// Iterates over the array, performing an async function for each item, going to the next one only when the previous one has finished (called his callback)
/* Binds all function on an object to the object, so the 'this' context will be reserved even if referencing the function alone */
Q.bindFunctions=function(obj){
for(varpinobj){
varfunc=obj[p];
if(typeof(func)!="function")
continue;
if(func.boundTo==obj)
continue;
func=func.bind(obj);
func.boundTo=obj;
if(func.name==null)
func.name=p;
obj[p]=func;
}
}
// Similar to func.apply(thisContext, args), but creates a new object instead of just calling the function - new func(args[0], args[1], args[2]...)
Function.prototype.applyNew=function(args){
varargs2=args.toArray();
args2.insert(0,null);
varctor2=this.bind.apply(this,args2);
varobj=newctor2();
returnobj;
}
// Similar to func.call(thisContext, args), but creates a new object instead of just calling the function - new func(arguments[0], arguments[1], arguments[2]...)