fix #456
This commit is contained in:
parent
b9d4f9377e
commit
3cec9dc5bf
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
/* band.js */
|
/* band.js */
|
||||||
Timeline._Band=function(B,G,C){if(B.autoWidth&&typeof G.width=="string"){G.width=G.width.indexOf("%")>-1?0:parseInt(G.width);
|
Timeline._Band=function(B,G,C){if(B.autoWidth&&typeof G.width=="string"){G.width=G.width.indexOf("%")>-1?0:parseInt(G.width);
|
||||||
|
@ -39,6 +38,38 @@ SimileAjax.DOM.registerEventWithObject(this._div,"mousemove",this,"_onMouseMove"
|
||||||
SimileAjax.DOM.registerEventWithObject(this._div,"mouseup",this,"_onMouseUp");
|
SimileAjax.DOM.registerEventWithObject(this._div,"mouseup",this,"_onMouseUp");
|
||||||
SimileAjax.DOM.registerEventWithObject(this._div,"mouseout",this,"_onMouseOut");
|
SimileAjax.DOM.registerEventWithObject(this._div,"mouseout",this,"_onMouseOut");
|
||||||
SimileAjax.DOM.registerEventWithObject(this._div,"dblclick",this,"_onDblClick");
|
SimileAjax.DOM.registerEventWithObject(this._div,"dblclick",this,"_onDblClick");
|
||||||
|
//added by Kartik starts
|
||||||
|
SimileAjax.DOM.registerEventWithObject(this._div,"touchstart",this,"_onTouchStart");
|
||||||
|
SimileAjax.DOM.registerEventWithObject(this._div,"touchmove",this,"_onTouchMove");
|
||||||
|
|
||||||
|
Timeline._Band.prototype._onTouchStart=function(D,A,E)
|
||||||
|
{
|
||||||
|
if(A.touches.length == 1)
|
||||||
|
{
|
||||||
|
var touch = A.changedTouches[0];
|
||||||
|
this._dragX=touch.clientX;
|
||||||
|
this._dragY=touch.clientY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Timeline._Band.prototype._onTouchMove=function(D,A,E)
|
||||||
|
{
|
||||||
|
if(A.touches.length == 1)
|
||||||
|
{
|
||||||
|
A.preventDefault();
|
||||||
|
var touch = A.changedTouches[0];
|
||||||
|
var C=touch.clientX-this._dragX;
|
||||||
|
var B=touch.clientY-this._dragY;
|
||||||
|
this._dragX=touch.clientX;
|
||||||
|
this._dragY=touch.clientY;
|
||||||
|
this._moveEther(this._timeline.isHorizontal()?C:B);
|
||||||
|
this._positionHighlight();
|
||||||
|
this._fireOnScroll();
|
||||||
|
this._setSyncWithBandDate();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//added by Kartik ends
|
||||||
var F=this._theme!=null?this._theme.mouseWheel:"scroll";
|
var F=this._theme!=null?this._theme.mouseWheel:"scroll";
|
||||||
if(F==="zoom"||F==="scroll"||this._zoomSteps){if(SimileAjax.Platform.browser.isFirefox){SimileAjax.DOM.registerEventWithObject(this._div,"DOMMouseScroll",this,"_onMouseScroll");
|
if(F==="zoom"||F==="scroll"||this._zoomSteps){if(SimileAjax.Platform.browser.isFirefox){SimileAjax.DOM.registerEventWithObject(this._div,"DOMMouseScroll",this,"_onMouseScroll");
|
||||||
}else{SimileAjax.DOM.registerEventWithObject(this._div,"mousewheel",this,"_onMouseScroll");
|
}else{SimileAjax.DOM.registerEventWithObject(this._div,"mousewheel",this,"_onMouseScroll");
|
||||||
|
@ -216,6 +247,7 @@ this._moveEther(Math.round(-this._ether.dateToPixelOffset(D)));
|
||||||
this._moveEther(A);
|
this._moveEther(A);
|
||||||
};
|
};
|
||||||
Timeline._Band.prototype._onMouseDown=function(B,A,C){this.closeBubble();
|
Timeline._Band.prototype._onMouseDown=function(B,A,C){this.closeBubble();
|
||||||
|
|
||||||
this._dragging=true;
|
this._dragging=true;
|
||||||
this._dragX=A.clientX;
|
this._dragX=A.clientX;
|
||||||
this._dragY=A.clientY;
|
this._dragY=A.clientY;
|
||||||
|
@ -227,13 +259,16 @@ this._dragY=A.clientY;
|
||||||
this._moveEther(this._timeline.isHorizontal()?C:B);
|
this._moveEther(this._timeline.isHorizontal()?C:B);
|
||||||
this._positionHighlight();
|
this._positionHighlight();
|
||||||
}};
|
}};
|
||||||
Timeline._Band.prototype._onMouseUp=function(B,A,C){this._dragging=false;
|
Timeline._Band.prototype._onMouseUp=function(B,A,C){
|
||||||
this._keyboardInput.focus();
|
this._dragging=false;
|
||||||
|
//console.log("mouse up");
|
||||||
|
//this._keyboardInput.focus();
|
||||||
};
|
};
|
||||||
Timeline._Band.prototype._onMouseOut=function(C,B,D){var A=SimileAjax.DOM.getEventRelativeCoordinates(B,C);
|
Timeline._Band.prototype._onMouseOut=function(C,B,D){var A=SimileAjax.DOM.getEventRelativeCoordinates(B,C);
|
||||||
A.x+=this._viewOffset;
|
A.x+=this._viewOffset;
|
||||||
if(A.x<0||A.x>C.offsetWidth||A.y<0||A.y>C.offsetHeight){this._dragging=false;
|
if(A.x<0||A.x>C.offsetWidth||A.y<0||A.y>C.offsetHeight){this._dragging=false;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
Timeline._Band.prototype._onMouseScroll=function(G,H,B){var A=new Date();
|
Timeline._Band.prototype._onMouseScroll=function(G,H,B){var A=new Date();
|
||||||
A=A.getTime();
|
A=A.getTime();
|
||||||
if(!this._lastScrollTime||((A-this._lastScrollTime)>50)){this._lastScrollTime=A;
|
if(!this._lastScrollTime||((A-this._lastScrollTime)>50)){this._lastScrollTime=A;
|
||||||
|
@ -348,6 +383,9 @@ A++){this._decorators[A].softPaint();
|
||||||
}};
|
}};
|
||||||
Timeline._Band.prototype.closeBubble=function(){SimileAjax.WindowManager.cancelPopups();
|
Timeline._Band.prototype.closeBubble=function(){SimileAjax.WindowManager.cancelPopups();
|
||||||
};
|
};
|
||||||
|
//added by kartik
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* compact-painter.js */
|
/* compact-painter.js */
|
||||||
|
|
Loading…
Reference in New Issue