Commit 67b2b204 authored by Oleg Korshul's avatar Oleg Korshul

scroll to target (mobile excel)

parent dcbb5345
...@@ -574,7 +574,14 @@ DrawingObjectsController.prototype.canIncreaseParagraphLevel = function(bIncreas ...@@ -574,7 +574,14 @@ DrawingObjectsController.prototype.canIncreaseParagraphLevel = function(bIncreas
var oVisibleRange = oWorksheet.getVisibleRange(); var oVisibleRange = oWorksheet.getVisibleRange();
if(!oRange.isIntersect(oVisibleRange)){ if(!oRange.isIntersect(oVisibleRange)){
var oOffset = oWorksheet._calcActiveCellOffset(oRange); var oOffset = oWorksheet._calcActiveCellOffset(oRange);
//window["Asc"]["editor"].wb.controller.scroll(oOffset); var _api = window["Asc"]["editor"];
if (_api.wb.MobileTouchManager)
{
var offX = this.drawingObjects.convertMetric(oOffset.deltaX, 1, 0);
var offY = this.drawingObjects.convertMetric(oOffset.deltaY, 1, 0);
_api.wb.MobileTouchManager.scrollBy(offX, offY);
}
} }
} }
} }
......
...@@ -2172,6 +2172,23 @@ ...@@ -2172,6 +2172,23 @@
} }
}; };
CMobileTouchManagerBase.prototype.scrollTo = function(x, y)
{
if (this.iScroll)
{
this.iScroll.scrollTo(-x, -y);
this.iScroll._execEvent('scroll');
}
};
CMobileTouchManagerBase.prototype.scrollBy = function(x, y)
{
if (this.iScroll)
{
this.iScroll.scrollBy(-x, -y);
this.iScroll._execEvent('scroll');
}
};
//--------------------------------------------------------export---------------------------------------------------- //--------------------------------------------------------export----------------------------------------------------
AscCommon.CMobileDelegateSimple = CMobileDelegateSimple; AscCommon.CMobileDelegateSimple = CMobileDelegateSimple;
AscCommon.CMobileTouchManagerBase = CMobileTouchManagerBase; AscCommon.CMobileTouchManagerBase = CMobileTouchManagerBase;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment