Commit 819210f2 authored by Oleg Korshul's avatar Oleg Korshul

.

parent d6c00a4d
......@@ -86,7 +86,7 @@ var utils = (function () {
hasTransform: _transform !== false,
hasPerspective: _prefixStyle('perspective') in _elementStyle,
hasTouch: 'ontouchstart' in window,
hasPointer: !!(window.PointerEvent || window.MSPointerEvent), // IE10 is prefixed
hasPointer: (!('ontouchstart' in window)) && (!!(window.PointerEvent || window.MSPointerEvent)), // IE10 is prefixed
hasTransition: _prefixStyle('transition') in _elementStyle
});
......
......@@ -2477,6 +2477,12 @@ function CEditorPage(api)
this.m_bIsRePaintOnScroll = true;
this.m_oBoundsController.ClearNoAttack();
if (0 == this.m_nZoomType && this.MobileTouchManager)
{
this.MobileTouchManager.CheckZoomCriticalValues();
}
this.OnScroll();
this.onTimerScroll_sync(true);
......
......@@ -61,6 +61,32 @@
{
return this.DrawingDocument.ConvertCoordsFromCursor2(x, y);
};
CMobileDelegateEditorPresentation.prototype.GetZoomFit = function()
{
var HtmlPage = this.HtmlPage;
var w = HtmlPage.m_oEditor.HtmlElement.width;
if (HtmlPage.bIsRetinaSupport)
w >>= 1;
var h = (((HtmlPage.m_oBody.AbsolutePosition.B - HtmlPage.m_oBody.AbsolutePosition.T) -
(HtmlPage.m_oTopRuler.AbsolutePosition.B - HtmlPage.m_oTopRuler.AbsolutePosition.T)) * g_dKoef_mm_to_pix) >> 0;
var _pageWidth = this.LogicDocument.Width * g_dKoef_mm_to_pix;
var _pageHeight = this.LogicDocument.Height * g_dKoef_mm_to_pix;
var _hor_Zoom = 100;
if (0 != _pageWidth)
_hor_Zoom = (100 * (w - 2 * HtmlPage.SlideDrawer.CONST_BORDER)) / _pageWidth;
var _ver_Zoom = 100;
if (0 != _pageHeight)
_ver_Zoom = (100 * (h - 2 * HtmlPage.SlideDrawer.CONST_BORDER)) / _pageHeight;
var _new_value = (Math.min(_hor_Zoom, _ver_Zoom) - 0.5) >> 0;
if (_new_value < 5)
_new_value = 5;
return _new_value;
};
CMobileDelegateEditorPresentation.prototype.GetScrollerSize = function()
{
var _controlH = parseInt(this.HtmlPage.m_oMainView.HtmlElement.style.height);
......
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