zoom in native viewer (#2537)

* Zoom has been changed (now it works like in documents)

* Fix zoom for native viewer in mobile web

* Release/v7.1.0 (#2560)

* [se] Fix bug 54999

* [se] Fix bug 54956

* [bug] fix applying changes in AnimMotion

* [bug] fix bug 55068: recalculate bounds after changing group position

* [bug] fix incorrect collaborative change type

* [se] Fix bug 55091

* [se] For bug 55091

* [se] Fix bug 55218

* [se] By bug 55121

* Fix bug #55179

Fix setting up the numbering of paragraphs

* Fix bug #55149

Fix messed up setting "case sensitive"

* [de][pe] Refactor spell check

* Fix bug 55216

* Fix bug 55219

* Fix bug 55243

* FIx bug 55206
Search started from begin of current page

* Fix bug 55129

* For bug 55205

* Fix bugs 55213, 55205

* For bug 55240

* Fix bug 55225

* Implement the ability to force render/hide of forms highlight and placeholders

* Added returns value to "pluginMethod_ReplaceTextSmart" method (#2527)

* [se] Fix bug 55282

* Fix the problem with document redrawing due to spell checking

* Add option isPrint for native print

* Make work with context menu

* Fix bug 55306

* Fix bug 55307

* Fix bug 55312

* [bug] fix bug 55305

* Fix bug #55288

Fix the problem with calculating position of flow table in case of several columns in the current section

* Fix bug 55318

* Fix bug with links with browser scaling

* [bug] fix bug 55293, 55263

* Fix bug 55327

* Fix bug 55313

* Fix bug 55224

* Fix bug #55288

Fix the problem with table width calculation in case of section with multiple columns of different widths

* Fix bug#55278

* [bug] fix bug 55279

* fix: name for refPtType field

* Migrate unit test from `node-qunit-phantomjs` to `node-qunit-puppeteer` (#2540)

* [se] ->Migrate unit test from `node-qunit-phantomjs` to `node-qunit-puppeteer`
   Migrate formula tests to qunit-2.16.0, fix formula tests

* [se] Fix calculate y position log base

* Refactoring TextAssociation types

* Rebuild module with new version native code

* Fix bug #55280

* Fix bug #51933

Fix the problem with calculating the position of flow objects lying in a table cell

* Fix for passing tests

* [de] For bug 55284

* [se] Fix bug 53561

* Fix bug #55380

Fix the problem with search function in the equation object

* ole-objects fixes:
add ability to set natural sizes of ole-objects;
use image size as default size for ole-object;
do not account zoom on calculating pix to mm coefficient;

* [de] Fix c_oAscTextAssociation export

* add methods for working with ole-objects in plugins

* [se] By bug 55218
There is nothing to print because the table is empty

* Fix issue with isLayoutInCell setting depending on compatibility mode

* Fix bug #55383

Do autocorrect a double space with a dot only when preceded by a text element

* [se] Fix bug 54845

* [se] By bug 55411

* Added missing method to export.

* [de] Implement ability to generate previews for table styles in small portions

* Implement ability to get preview for selected style

* Fix previous commit

* Add ability to receive previews for specified table styles

* [UserInfoParser] Add userInfo permissions: hide users not in userInfo groups

* Fix/stroke cone charts (#2555)

* [se] Fix bug 55421

Co-authored-by: Kvaigone <sergey.chirkov@onlyoffice.com>

* Fix/bug 51902 (#2556)

* [se] Fix bug 51902

* Fix bug #55398

Fix the problem with calculating the position of a drawing object in the header

* Fix bug #55403

Fix the problem with calculating header/footer. Forbid to change the page number of a header when calculation in progress

* Fix bug #55406

Fix the problem with calculating the position of a drawing lying in a table cell with vertical alignment to the bottom or center

* Fix calculation of the position of drawings in a table cell depending one the compatibility mode

* Fix bug #55410

Add check for incorrect values of the maxCharacters parameter for text forms

* Fix for passing builder tests

* Fix presentation editor crash

* Fix bug #55458

Fix the problem with calculating page count stage

Co-authored-by: GoshaZotov <Igor.Zotov@onlyoffice.com>
Co-authored-by: Sergey Luzyanin <Sergey.Luzyanin@onlyoffice.com>
Co-authored-by: Sergey Konovalov <Sergey.Konovalov@onlyoffice.com>
Co-authored-by: KirillovIlya <ilya.kirillov@onlyoffice.com>
Co-authored-by: Nikita Khromov <Nikita.Khromov@onlyoffice.com>
Co-authored-by: Vladimir Privezenov <privezenoff@yandex.ru>
Co-authored-by: Pavel Lobashov <ShockwaveNN@gmail.com>
Co-authored-by: Kvaigone <sergey.chirkov@onlyoffice.com>
Co-authored-by: Julia Radzhabova <julia.radzhabova@onlyoffice.com>

Co-authored-by: Oleg Korshul <Oleg.Korshul@onlyoffice.com>
Co-authored-by: GoshaZotov <Igor.Zotov@onlyoffice.com>
Co-authored-by: Sergey Luzyanin <Sergey.Luzyanin@onlyoffice.com>
Co-authored-by: Sergey Konovalov <Sergey.Konovalov@onlyoffice.com>
Co-authored-by: KirillovIlya <ilya.kirillov@onlyoffice.com>
Co-authored-by: Nikita Khromov <Nikita.Khromov@onlyoffice.com>
Co-authored-by: Vladimir Privezenov <privezenoff@yandex.ru>
Co-authored-by: Pavel Lobashov <ShockwaveNN@gmail.com>
Co-authored-by: Kvaigone <sergey.chirkov@onlyoffice.com>
Co-authored-by: Julia Radzhabova <julia.radzhabova@onlyoffice.com>
This commit is contained in:
Alexey Matveev
2022-02-11 10:30:26 +03:00
committed by GitHub
parent 27fab7481e
commit bb2341e9f7
2 changed files with 93 additions and 8 deletions

View File

@ -2012,7 +2012,7 @@
{
this.delegate.HtmlPage.NoneRepaintPages = true;
this.ZoomDistance = this.getPointerDistance(e);
this.ZoomDistance = this.getPointerDistance(e, true);
this.ZoomValue = this.delegate.GetZoom();
break;
@ -2102,7 +2102,12 @@
this.delegate.HtmlPage.NoneRepaintPages = false;
if (this.delegate.IsNativeViewer && this.delegate.IsNativeViewer())
{
this.delegate.DrawingDocument.m_oDocumentRenderer.paint();
// очищаем координаты зума для мобильного веба
this.delegate.DrawingDocument.m_oDocumentRenderer.skipClearZoomCoord = false;
this.delegate.DrawingDocument.m_oDocumentRenderer.clearZoomCoord();
}
this.delegate.HtmlPage.m_bIsFullRepaint = true;
this.delegate.HtmlPage.OnScroll();
@ -2204,7 +2209,7 @@
return true;
};
CMobileTouchManagerBase.prototype.getPointerDistance = function(e)
CMobileTouchManagerBase.prototype.getPointerDistance = function(e, bFixZoomCoord)
{
var isPointers = this.checkPointerEvent(e);
if (e.touches && (e.touches.length > 1) && !isPointers)
@ -2215,6 +2220,12 @@
var _x2 = (e.touches[1].pageX !== undefined) ? e.touches[1].pageX : e.touches[1].clientX;
var _y2 = (e.touches[1].pageY !== undefined) ? e.touches[1].pageY : e.touches[1].clientY;
// запоминаем координаты между тачами только на старте
if (bFixZoomCoord && this.delegate.IsNativeViewer && this.delegate.IsNativeViewer()) {
this.delegate.DrawingDocument.m_oDocumentRenderer.fixZoomCoord( ( ( _x1 + _x2 ) / 2 ), ( ( _y1 + _y2 ) / 2 ) );
this.delegate.DrawingDocument.m_oDocumentRenderer.skipClearZoomCoord = true;
}
return Math.sqrt((_x1 - _x2) * (_x1 - _x2) + (_y1 - _y2) * (_y1 - _y2));
}
else if (isPointers)
@ -2233,6 +2244,11 @@
if (_counter > 1)
break;
}
// запоминаем координаты между тачами только на старте
if (bFixZoomCoord && this.delegate.IsNativeViewer && this.delegate.IsNativeViewer()) {
this.delegate.DrawingDocument.m_oDocumentRenderer.fixZoomCoord( ( ( _touch1.X + _touch2.X ) / 2 ), ( ( _touch1.Y + _touch2.Y ) / 2 ) );
this.delegate.DrawingDocument.m_oDocumentRenderer.skipClearZoomCoord = true;
}
return Math.sqrt((_touch1.X - _touch2.X) * (_touch1.X - _touch2.X) + (_touch1.Y - _touch2.Y) * (_touch1.Y - _touch2.Y));
}