fix page rotation discard
This commit is contained in:
parent
dcf317a5aa
commit
18c7df52ca
@ -396,8 +396,8 @@ export class PdfViewerComponent extends AutoUnsubscribe implements OnInit, OnCha
|
||||
cursor: pointer;
|
||||
margin: 0 12px;
|
||||
`;
|
||||
paragraph.addEventListener('click', () => {
|
||||
this._pageRotationService.applyRotation();
|
||||
paragraph.addEventListener('click', async () => {
|
||||
await this._pageRotationService.applyRotation();
|
||||
this._showRotationConfirmationButtons();
|
||||
});
|
||||
return paragraph;
|
||||
@ -417,6 +417,14 @@ export class PdfViewerComponent extends AutoUnsubscribe implements OnInit, OnCha
|
||||
opacity: 0.7;
|
||||
`;
|
||||
paragraph.addEventListener('click', () => {
|
||||
const rotations = this._pageRotationService.rotations$.value;
|
||||
const oneRotationDegree = 90;
|
||||
for (const page of Object.keys(rotations)) {
|
||||
const times = rotations[page] / oneRotationDegree;
|
||||
for (let i = 1; i <= times; i++) {
|
||||
this.documentViewer.rotateCounterClockwise(Number(page));
|
||||
}
|
||||
}
|
||||
this._pageRotationService.clearRotations();
|
||||
this._showRotationConfirmationButtons();
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user