-1

Found this solution so far (see comment #16): https://code.google.com/p/simile-widgets/issues/detail?id=278

but it does not seem to work for me.

Any ideas appreciated. Thanks!

Astrip
  • 159
  • 4
  • 15

1 Answers1

1

I was just playing with it myself, and what worked pour mua was the following (Much of it is from the issue you posted):

SimileAjax.DOM.registerEventWithObject(this._div,"touchmove",this,"_onTouchMove");
SimileAjax.DOM.registerEventWithObject(this._div,"touchend",this,"_onTouchEnd");

SimileAjax.DOM.registerEventWithObject(this._div,"touchstart",this,"_onTouchStart");

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;
        this._dragging=true;
    }
}


Timeline._Band.prototype._onTouchMove=function(D,A,E)
{
    if(A.touches.length == 1)
    {
        A.preventDefault();
        A.stopPropagation(); 
        A.stopImmediatePropagation();         
        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();
    } 
};

Timeline._Band.prototype._onTouchEnd=function(){
        this._dragging=false;
};

I put this after SimileAjax.DOM.registerEventWithObject(this._div,"dblclick",this,"_onDblClick"); in the timeline-bundle.js, but you can probably put it elsewhere. I also commented out this._keyboardInput.focus(); in the same file.

If you get a chance to test this in ios, let me know what was the result

Dan
  • 36
  • 2