Commit 2ae01c88 authored by Oleg Korshul's avatar Oleg Korshul Committed by GitHub

Merge pull request #88 from ONLYOFFICE/feature/mobile_web

Feature/mobile web
parents 5a49111b 472fa089
......@@ -1873,9 +1873,6 @@ Indicator.prototype = {
e.preventDefault();
e.stopPropagation();
// !!!
this._execEvent('scroll');
},
_end: function (e) {
......
This diff is collapsed.
......@@ -3081,6 +3081,8 @@ function CThumbnailsManager()
this.MouseThumbnailsAnimateScrollTopTimer = -1;
this.MouseThumbnailsAnimateScrollBottomTimer = -1;
this.ScrollerHeight = 0;
this.m_oWordControl = null;
var oThis = this;
......@@ -3943,6 +3945,12 @@ function CThumbnailsManager()
word_control.m_oScrollThumbApi.scrollToY(lPosition);
}
this.ScrollerHeight = nHeightPix;
if (word_control.MobileTouchManagerThumbnails)
{
word_control.MobileTouchManagerThumbnails.Resize();
}
this.CalculatePlaces();
this.m_bIsUpdate = true;
}
......
This diff is collapsed.
......@@ -1428,6 +1428,9 @@ background-repeat: no-repeat;\
{
this.WordControl.m_oLogicDocument = new AscCommonSlide.CPresentation(this.WordControl.m_oDrawingDocument);
this.WordControl.m_oDrawingDocument.m_oLogicDocument = this.WordControl.m_oLogicDocument;
if (this.WordControl.MobileTouchManager)
this.WordControl.MobileTouchManager.delegate.LogicDocument = this.WordControl.m_oLogicDocument;
};
asc_docs_api.prototype.SetInterfaceDrawImagePlaceSlide = function(div_id)
......
......@@ -2972,7 +2972,7 @@ function CDrawingDocument()
return {X: x_pix, Y: y_pix, Error: false};
}
this.ConvertCoordsToCursor3 = function (x, y, pageIndex)
this.ConvertCoordsToCursor3 = function (x, y, pageIndex, isGlobal)
{
// теперь крутить всякие циклы нет смысла
if (pageIndex < 0 || pageIndex >= this.m_lPagesCount)
......@@ -2982,8 +2982,19 @@ function CDrawingDocument()
var dKoef = (this.m_oWordControl.m_nZoomValue * g_dKoef_mm_to_pix / 100);
var _x = this.m_oWordControl.X;
var _y = this.m_oWordControl.Y;
var _x = 0;
var _y = 0;
if (isGlobal)
{
_x = this.m_oWordControl.X;
_y = this.m_oWordControl.Y;
if (true == this.m_oWordControl.m_bIsRuler)
{
_x += 5 * g_dKoef_mm_to_pix;
_y += 7 * g_dKoef_mm_to_pix;
}
}
var x_pix = (this.m_arrPages[pageIndex].drawingPage.left + x * dKoef + _x + 0.5) >> 0;
var y_pix = (this.m_arrPages[pageIndex].drawingPage.top + y * dKoef + _y + 0.5) >> 0;
......
......@@ -444,8 +444,8 @@ function CEditorPage(api)
if (this.m_oApi.isMobileVersion)
{
this.MobileTouchManager = new AscCommon.CMobileTouchManager({});
this.MobileTouchManager.Init(this);
this.MobileTouchManager = new AscCommon.CMobileTouchManager();
this.MobileTouchManager.Init(this.m_oApi);
}
this.checkNeedRules();
......@@ -2278,7 +2278,7 @@ function CEditorPage(api)
}
this.ReaderTouchManager = new AscCommon.CReaderTouchManager();
this.ReaderTouchManager.Init(this);
this.ReaderTouchManager.Init(this.m_oApi);
this.TransformDivUseAnimation(this.ReaderModeDivWrapper, 0);
......@@ -2353,8 +2353,9 @@ function CEditorPage(api)
if (oThis.m_oApi.isMobileVersion)
{
oThis.MobileTouchManager = new AscCommon.CMobileTouchManager({});
oThis.MobileTouchManager.Init(oThis);
oThis.MobileTouchManager = new AscCommon.CMobileTouchManager();
oThis.MobileTouchManager.Init(oThis.m_oApi);
oThis.MobileTouchManager.Resize();
}
return;
......
This diff is collapsed.
......@@ -822,7 +822,7 @@ background-repeat: no-repeat;\
this.WordControl.m_oLogicDocument.TurnOff_CheckSpelling();
if (this.WordControl.MobileTouchManager)
this.WordControl.MobileTouchManager.LogicDocument = this.WordControl.m_oLogicDocument;
this.WordControl.MobileTouchManager.delegate.LogicDocument = this.WordControl.m_oLogicDocument;
};
asc_docs_api.prototype.InitViewer = function()
......
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