Skip to content

Commit

Permalink
feat: print spectra
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-musallam committed Dec 4, 2023
1 parent 840c3e5 commit 48eaf2d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/component/main/InnerNMRiumContents.tsx
Expand Up @@ -60,6 +60,22 @@ const containerStyles = css`
-o-user-drag: none;
user-select: none;
}
@media print {
@page {
size: a4 landscape;
margin: 0%;
}
* {
visibility: hidden;
}
#nmrium-viewer,
#nmrium-viewer * {
visibility: visible;
}
}
`;

interface InnerNMRiumContentsProps {
Expand Down
1 change: 1 addition & 0 deletions src/demo/Sidebar.tsx
Expand Up @@ -102,6 +102,7 @@ function Sidebar(props) {

return (
<div
className="demo-side-bar"
css={css(
sidebarCss,
props.menuIsClosed ? sidebarClosedCss : sidebarOpenCss,
Expand Down
14 changes: 14 additions & 0 deletions src/demo/index.css
@@ -1,3 +1,17 @@
@media print {
.demo-side-bar,
.demo-main-container > div > div:first-child {
display: none !important;
}

.demo-main-container,
.demo-main-container > div {
width: 100% !important;
margin: 0 !important;
padding: 0 !important;
}
}

.rc-menu {
border: none !important;
box-shadow: none !important;
Expand Down
1 change: 1 addition & 0 deletions src/demo/layouts/Admin.tsx
Expand Up @@ -71,6 +71,7 @@ export function Dashboard(props: DashboardProps) {
onMenuToggle={toggleMenu}
/>
<div
className="demo-main-container"
css={css(
mainPanelCss,
menuIsClosed ? mainPanelClosedCss : mainPanelOpenCss,
Expand Down

0 comments on commit 48eaf2d

Please sign in to comment.