mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-25 22:42:41 +00:00
remove "makeZoom" function
The makeZoom function is redundant if we just insert the style a little further down when the `.pages` div is initialized, as a `style` attribute on the tag.
This commit is contained in:
@@ -231,19 +231,6 @@ const BrewRenderer = (props)=>{
|
||||
}));
|
||||
};
|
||||
|
||||
const makeZoom = () => {
|
||||
|
||||
return(
|
||||
<style id='zoomStyle'>
|
||||
{`
|
||||
.pages {
|
||||
zoom: ${state.zoom}%;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
);
|
||||
}
|
||||
|
||||
const handlePageChange = (pageNumber) => {
|
||||
// Scroll to the desired page
|
||||
scrollToPage(pageNumber);
|
||||
@@ -284,14 +271,13 @@ const BrewRenderer = (props)=>{
|
||||
<RenderWarnings />
|
||||
<NotificationPopup />
|
||||
</div>
|
||||
{makeZoom()}
|
||||
|
||||
{/* Apply CSS from Style tab and render pages from Markdown tab */}
|
||||
{state.isMounted
|
||||
&&
|
||||
<>
|
||||
{renderStyle()}
|
||||
<div className='pages' lang={`${props.lang || 'en'}`}>
|
||||
<div className='pages' lang={`${props.lang || 'en'}`} style={{ zoom: `${state.zoom}%` }}>
|
||||
{renderPages()}
|
||||
</div>
|
||||
</>
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
"baseSnippets": false,
|
||||
"path": "Blank"
|
||||
},
|
||||
"journal": {
|
||||
"Journal": {
|
||||
"name": "Journal",
|
||||
"renderer": "V3",
|
||||
"baseTheme": "Blank",
|
||||
"baseSnippets": "5ePHB",
|
||||
"path": "journal"
|
||||
"path": "Journal"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user