mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-28 11:22:39 +00:00
Merge branch 'master' into Issue_241_Part_II
Clean up a small bit of linting in the pr related functions.
This commit is contained in:
@@ -110,7 +110,7 @@ const Editor = createClass({
|
||||
this.sourceJump();
|
||||
};
|
||||
if(prevProps.liveScroll != this.props.liveScroll) {
|
||||
if ((prevProps.liveScroll != undefined) && (this.props.liveScroll)) this.brewJump();
|
||||
if((prevProps.liveScroll != undefined) && (this.props.liveScroll)) this.brewJump();
|
||||
};
|
||||
},
|
||||
|
||||
@@ -119,14 +119,15 @@ 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 ];
|
||||
if (movementKeys.includes(e.keyCode)) {
|
||||
const movementKeys = [13, 33, 34, LEFTARROW_KEY, 38, RIGHTARROW_KEY, 40];
|
||||
if(movementKeys.includes(e.keyCode)) {
|
||||
const curPage = this.getCurrentPage();
|
||||
if( curPage != lastPage ) {
|
||||
if(curPage != lastPage) {
|
||||
this.brewJump();
|
||||
lastPage = curPage;
|
||||
}
|
||||
@@ -136,9 +137,9 @@ const Editor = createClass({
|
||||
// Handle CTRL-HOME and CTRL-END
|
||||
if(((e.keyCode == END_KEY) || (e.keyCode == HOME_KEY)) && this.props.liveScroll) this.brewJump();
|
||||
if(!e.metaKey) return;
|
||||
if (e.shiftKey && (e.keyCode == RIGHTARROW_KEY)) this.brewJump();
|
||||
if (e.shiftKey && (e.keyCode == LEFTARROW_KEY)) this.sourceJump();
|
||||
if ((e.keyCode == LEFTARROW_KEY) || (e.keyCode == RIGHTARROW_KEY)) {
|
||||
if(e.shiftKey && (e.keyCode == RIGHTARROW_KEY)) this.brewJump();
|
||||
if(e.shiftKey && (e.keyCode == LEFTARROW_KEY)) this.sourceJump();
|
||||
if((e.keyCode == LEFTARROW_KEY) || (e.keyCode == RIGHTARROW_KEY)) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
@@ -53,10 +53,10 @@
|
||||
mask-image: url('../icons/book-part-cover.svg');
|
||||
}
|
||||
.image-wrap-left {
|
||||
content: url('../icons/image-wrap-left.svg');
|
||||
mask-image: url('../icons/image-wrap-left.svg');
|
||||
}
|
||||
.image-wrap-right {
|
||||
content: url('../icons/image-wrap-right.svg');
|
||||
mask-image: url('../icons/image-wrap-right.svg');
|
||||
}
|
||||
.davek {
|
||||
mask-image: url('../icons/Davek.svg');
|
||||
|
||||
Reference in New Issue
Block a user