Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Fix #2043, put Save and Cancel inside the selection box when the sele…
Browse files Browse the repository at this point in the history
…ction is at the bottom of the page
  • Loading branch information
ianb committed Jan 31, 2017
1 parent e54d6a3 commit 38becf4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addon/data/selector-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,11 @@ const ui = (function () { // eslint-disable-line no-unused-vars
} else {
this.el.classList.remove("pageshot-small-selection");
}
if (docHeight - pos.bottom < 50) {
this.el.classList.add("pageshot-bottom-selection");
} else {
this.el.classList.remove("pageshot-bottom-selection");
}
this.el.style.top = (pos.top - bodyRect.top) + "px";
this.el.style.left = (pos.left - bodyRect.left) + "px";
this.el.style.height = (pos.bottom - pos.top - bodyRect.top) + "px";
Expand Down
4 changes: 4 additions & 0 deletions static/css/inline-selection.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ $overlay-z-index: 9999999999;
bottom: -55px;
right: 0;
z-index: 6;

.pageshot-bottom-selection & {
bottom: 5px;
}
}

.pageshot-highlight-button-cancel {
Expand Down

0 comments on commit 38becf4

Please sign in to comment.