Skip to content
Snippets Groups Projects
Commit 8ad74773 authored by Eugen Ciur's avatar Eugen Ciur
Browse files

rotate page with better labels

parent c2617e74
Branches
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@
<li class="dropdown-item">
<button
class="btn"
{{on "click" @onRotateClockwise}}>
{{on "click" (fn @onRotateClockwise 270)}}>
<i class="bi bi-arrow-clockwise"></i>
Rotate 90 CW
</button>
......@@ -64,7 +64,16 @@
<li class="dropdown-item">
<button
class="btn"
{{on "click" @onRotateCounterclockwise}}>
{{on "click" (fn @onRotateClockwise 180)}}>
<i class="bi bi-arrow-clockwise"></i>
Rotate 180 CW
</button>
</li>
<li class="dropdown-item">
<button
class="btn"
{{on "click" (fn @onRotateClockwise 90)}}>
<i class="bi bi-arrow-counterclockwise"></i>
Rotate 90 CCW
</button>
......
......@@ -115,14 +115,11 @@ export default class ViewerComponent extends Component {
}
@action
async onRotateClockwise() {
async onRotateClockwise(angle) {
let page_ids = [];
page_ids = this.selected_pages.map(page => page.id);
await this.requests.rotatePages({
page_ids: page_ids,
angle: 90
});
await this.requests.rotatePages({page_ids, angle});
this.selected_pages = A([]);
this.router.refresh();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment