Skip to content

Commit

Permalink
Merge pull request #130 from cornerstonejs/fix/right-orientation-mark…
Browse files Browse the repository at this point in the history
…er-offscreen

Consider scrollbar and marker width when positioning right marker
  • Loading branch information
igoroctaviano authored Dec 7, 2021
2 parents 9d91186 + dc7c081 commit 4068ba2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/ViewportOrientationMarkers/ViewportOrientationMarkers.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.ViewportOrientationMarkers {
--marker-width: 100px;
--scrollbar-width: 20px;
pointer-events: none;
font-size: 15px;
color: #ccc;
Expand All @@ -15,13 +17,16 @@
top: 47%;
left: 5px;
}

.ViewportOrientationMarkers .right-mid {
top: 47%;
left: 97%;
left: calc(100% - var(--marker-width) - var(--scrollbar-width));
}

.ViewportOrientationMarkers .bottom-mid {
top: 97%;
left: 47%;
}
.ViewportOrientationMarkers .right-mid .orientation-marker-value {
display: flex;
justify-content: flex-end;
min-width: var(--marker-width);
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class ViewportOrientationMarkers extends PureComponent {
className={`${m}-mid orientation-marker`}
key={`${m}-mid orientation-marker`}
>
{markers[m]}
<div className="orientation-marker-value">{markers[m]}</div>
</div>
));

Expand Down

0 comments on commit 4068ba2

Please sign in to comment.