Commit 49e722df authored by Oleg Korshul's avatar Oleg Korshul

cells mobile (first version)

parent 77d87331
......@@ -1328,6 +1328,22 @@ var editor;
this.wb = new AscCommonExcel.WorkbookView(this.wbModel, this.controller, this.handlers, this.HtmlElement, this.topLineEditorElement, this, this.collaborativeEditing, this.fontRenderingMode);
if (this.isMobileVersion) {
var _container = document.getElementById(this.HtmlElementName);
if (_container)
_container.style.overflow = "hidden";
this.wb.MobileTouchManager = new AscCommonExcel.CMobileTouchManager({ eventsElement : "cell_mobile_element" });
this.wb.MobileTouchManager.Init(this);
// input context must be created!!!
var _areaId = AscCommon.g_inputContext.HtmlArea.id;
var _element = document.getElementById(_areaId);
_element.parentNode.parentNode.style.zIndex = 10;
this.wb.MobileTouchManager.initEvents(AscCommon.g_inputContext.HtmlArea.id);
}
this.DocumentLoadComplete = true;
this.asc_CheckGuiControlColors();
......
......@@ -146,16 +146,6 @@
this.handlers = new AscCommonExcel.asc_CHandlersList(handlers);
this._createScrollBars();
if( this.view.Api.isMobileVersion ){
var __hasTouch = 'ontouchstart' in window;
if (__hasTouch) {
this.widget.addEventListener("touchstart" , function (e) {self._onTouchStart(e); return false;} , false);
this.widget.addEventListener("touchmove" , function (e) {self._onTouchMove(e); return false;} , false);
this.widget.addEventListener("touchend" , function (e) {self._onTouchEnd(e); return false;} , false);
} else {
this.widget.addEventListener("touchstart" , function (e) {self._onMouseDown(e.touches[0]); return false;} , false);
this.widget.addEventListener("touchmove" , function (e) {self._onMouseMove(e.touches[0]); return false;} , false);
this.widget.addEventListener("touchend" , function (e) {self._onMouseUp(e.changedTouches[0]); return false;} , false);
}
/*раньше события на ресайз вызывался из меню через контроллер. теперь контроллер в меню не доступен, для ресайза подписываемся на глобальный ресайз от window.*/
window.addEventListener("resize", function () {self._onWindowResize.apply(self, arguments);}, false);
return this;
......
......@@ -836,10 +836,6 @@
self._replaceCellTextCallback.apply(self, arguments);
};
if (this.Api.isMobileVersion) {
this.MobileTouchManager = new AscCommonExcel.CMobileTouchManager();
this.MobileTouchManager.Init(this);
}
return this;
};
......
This diff is collapsed.
......@@ -36,6 +36,7 @@
{
// define after window['AscCommon']
var AscCommon = window['AscCommon'];
var global_mouseEvent = AscCommon.global_mouseEvent;
AscCommon.MobileTouchMode =
{
......@@ -853,6 +854,7 @@
// изменился размер документа/экрана => нужно перескитать вспомогательный элемент для скролла
CMobileTouchManagerBase.prototype.Resize = function()
{
this.CheckZoomCriticalValues();
if (this.iScroll != null)
{
var _size = this.delegate.GetScrollerSize();
......
......@@ -2478,11 +2478,6 @@ function CEditorPage(api)
this.m_oBoundsController.ClearNoAttack();
if (0 == this.m_nZoomType && this.MobileTouchManager)
{
this.MobileTouchManager.CheckZoomCriticalValues();
}
this.OnScroll();
this.onTimerScroll_sync(true);
......
......@@ -2694,11 +2694,6 @@ function CEditorPage(api)
this.m_oBoundsController.ClearNoAttack();
if (0 == this.m_nZoomType && this.MobileTouchManager)
{
this.MobileTouchManager.CheckZoomCriticalValues();
}
this.OnScroll();
this.onTimerScroll2_sync();
};
......
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