mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-04-07 14:09:12 +08:00
Merge pull request 'fix/pdf-bugs' (#1562) from fix/pdf-bugs into release/v9.1.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/sdkjs/pulls/1562
This commit is contained in:
@ -854,6 +854,8 @@ void main() {\n\
|
||||
return;
|
||||
}
|
||||
|
||||
let oDoc = this.viewer.getPDFDoc();
|
||||
|
||||
stream.pos = ret.LinePos;
|
||||
|
||||
let _lineText = "";
|
||||
@ -914,10 +916,13 @@ void main() {\n\
|
||||
}
|
||||
}
|
||||
|
||||
oDoc.TextSelectTrackHandler.Update(true);
|
||||
this.onUpdateSelection();
|
||||
this.onUpdateOverlay();
|
||||
};
|
||||
CFile.prototype.selectWholeRow = function(pageIndex, x, y) {
|
||||
let ret = this.getNearestPos(pageIndex, x, y);
|
||||
let oDoc = this.viewer.getPDFDoc();
|
||||
|
||||
let sel = this.Selection;
|
||||
sel.Glyph1 = -2;
|
||||
@ -929,6 +934,8 @@ void main() {\n\
|
||||
sel.Page2 = pageIndex;
|
||||
sel.quads = [];
|
||||
|
||||
oDoc.TextSelectTrackHandler.Update(true);
|
||||
this.onUpdateSelection();
|
||||
this.onUpdateOverlay();
|
||||
};
|
||||
CFile.prototype.selectWholePage = function(pageIndex) {
|
||||
@ -937,6 +944,9 @@ void main() {\n\
|
||||
if (!stream) {
|
||||
return;
|
||||
}
|
||||
|
||||
let oDoc = this.viewer.getPDFDoc();
|
||||
|
||||
while (stream.pos < stream.size)
|
||||
{
|
||||
_numLine++;
|
||||
@ -957,6 +967,8 @@ void main() {\n\
|
||||
sel.Page2 = pageIndex;
|
||||
sel.quads = [];
|
||||
|
||||
oDoc.TextSelectTrackHandler.Update(true);
|
||||
this.onUpdateSelection();
|
||||
this.onUpdateOverlay();
|
||||
};
|
||||
CFile.prototype.selectAll = function() {
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
};
|
||||
CTextSelectTrackHandler.prototype.OnChangePosition = function(bCheckMouseUpPos) {
|
||||
let oFile = Asc.editor.getDocumentRenderer().file;
|
||||
if (oFile.Selection.IsSelection || false === Asc.editor.NeedShowTextSelectPanel()) {
|
||||
if (false == oFile.isSelectionUse() || false === Asc.editor.NeedShowTextSelectPanel()) {
|
||||
this.OnHide();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2048,12 +2048,19 @@
|
||||
if (!pageObjectLogic) {
|
||||
return false;
|
||||
}
|
||||
if (global_mouseEvent.ClickCount == 2)
|
||||
|
||||
if (global_mouseEvent.ClickCount == 2) {
|
||||
oThis.file.selectWholeWord(pageObjectLogic.index, pageObjectLogic.x, pageObjectLogic.y);
|
||||
else if (global_mouseEvent.ClickCount == 3)
|
||||
return;
|
||||
}
|
||||
else if (global_mouseEvent.ClickCount == 3) {
|
||||
oThis.file.selectWholeRow(pageObjectLogic.index, pageObjectLogic.x, pageObjectLogic.y);
|
||||
else if (global_mouseEvent.ClickCount == 4)
|
||||
return;
|
||||
}
|
||||
else if (global_mouseEvent.ClickCount == 4) {
|
||||
oThis.file.selectWholePage(pageObjectLogic.index);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// если было нажатие - то отжимаем
|
||||
|
||||
Reference in New Issue
Block a user