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;
|
cursor: pointer;
|
||||||
margin: 0 12px;
|
margin: 0 12px;
|
||||||
`;
|
`;
|
||||||
paragraph.addEventListener('click', () => {
|
paragraph.addEventListener('click', async () => {
|
||||||
this._pageRotationService.applyRotation();
|
await this._pageRotationService.applyRotation();
|
||||||
this._showRotationConfirmationButtons();
|
this._showRotationConfirmationButtons();
|
||||||
});
|
});
|
||||||
return paragraph;
|
return paragraph;
|
||||||
@ -417,6 +417,14 @@ export class PdfViewerComponent extends AutoUnsubscribe implements OnInit, OnCha
|
|||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
`;
|
`;
|
||||||
paragraph.addEventListener('click', () => {
|
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._pageRotationService.clearRotations();
|
||||||
this._showRotationConfirmationButtons();
|
this._showRotationConfirmationButtons();
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user