Fix viewer position and shape in mobile mode #7677
2 changed files with 9 additions and 2 deletions
|
@ -21,7 +21,6 @@ import AutoplayCountdown from 'component/autoplayCountdown';
|
||||||
// scss/init/vars.scss
|
// scss/init/vars.scss
|
||||||
// --header-height
|
// --header-height
|
||||||
const HEADER_HEIGHT = 60;
|
const HEADER_HEIGHT = 60;
|
||||||
const HEADER_HEIGHT_MOBILE = 60;
|
|
||||||
|
|
||||||
const IS_DESKTOP_MAC = typeof process === 'object' ? process.platform === 'darwin' : false;
|
const IS_DESKTOP_MAC = typeof process === 'object' ? process.platform === 'darwin' : false;
|
||||||
const DEBOUNCE_WINDOW_RESIZE_HANDLER_MS = 100;
|
const DEBOUNCE_WINDOW_RESIZE_HANDLER_MS = 100;
|
||||||
|
@ -356,7 +355,7 @@ export default function FileRenderFloating(props: Props) {
|
||||||
top:
|
top:
|
||||||
fileViewerRect.windowOffset +
|
fileViewerRect.windowOffset +
|
||||||
fileViewerRect.top -
|
fileViewerRect.top -
|
||||||
(isMobile ? HEADER_HEIGHT_MOBILE : HEADER_HEIGHT) -
|
(isMobile ? 0 : HEADER_HEIGHT) -
|
||||||
(IS_DESKTOP_MAC ? 24 : 0),
|
(IS_DESKTOP_MAC ? 24 : 0),
|
||||||
}
|
}
|
||||||
: {}
|
: {}
|
||||||
|
|
|
@ -3,6 +3,10 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: var(--spacing-s);
|
top: var(--spacing-s);
|
||||||
border-radius: var(--border-radius);
|
border-radius: var(--border-radius);
|
||||||
|
|
||||||
|
@media (max-width: $breakpoint-small) {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content__viewer--disable-click {
|
.content__viewer--disable-click {
|
||||||
|
@ -175,6 +179,10 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: $breakpoint-small) {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content__cover--text {
|
.content__cover--text {
|
||||||
|
|
Loading…
Reference in a new issue