mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 22:52:40 +00:00
Bodge Render side mirroring back into place.
This commit is contained in:
@@ -108,6 +108,8 @@ const BrewRenderer = (props)=>{
|
||||
const totalScrollableHeight = scrollHeight - clientHeight;
|
||||
const currentPageNumber = Math.ceil((scrollTop / totalScrollableHeight) * rawPages.length);
|
||||
|
||||
handleScroll(e);
|
||||
|
||||
setState((prevState)=>({
|
||||
...prevState,
|
||||
currentPageNumber : currentPageNumber || 1
|
||||
|
||||
@@ -119,9 +119,6 @@ const Editor = createClass({
|
||||
const HOME_KEY = 36;
|
||||
const LEFTARROW_KEY = 37;
|
||||
const RIGHTARROW_KEY = 39;
|
||||
if(!(e.ctrlKey && e.metaKey)) return;
|
||||
|
||||
if(!e.ctrlKey) return;
|
||||
|
||||
if(this.props.liveScroll) {
|
||||
const movementKeys = [13, 33, 34, LEFTARROW_KEY, 38, RIGHTARROW_KEY, 40];
|
||||
@@ -134,6 +131,10 @@ const Editor = createClass({
|
||||
}
|
||||
}
|
||||
|
||||
if(!(e.ctrlKey && e.metaKey)) return;
|
||||
|
||||
if(!e.ctrlKey) return;
|
||||
|
||||
// Handle CTRL-HOME and CTRL-END
|
||||
if(((e.keyCode == END_KEY) || (e.keyCode == HOME_KEY)) && this.props.liveScroll) this.brewJump();
|
||||
if(!e.metaKey) return;
|
||||
|
||||
Reference in New Issue
Block a user