0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 02:52:43 +00:00

Constant a lookup.

This commit is contained in:
David Bolack
2024-05-20 20:31:30 -05:00
parent 77450ed334
commit e69132b40a

View File

@@ -43,7 +43,7 @@ const SplitPane = createClass({
window.addEventListener('resize', this.handleWindowResize);
},
componentWillUnmount : function() {
componentWillUnmount : function() {
window.removeEventListener('resize', this.handleWindowResize);
},
@@ -123,12 +123,14 @@ const SplitPane = createClass({
style={{ left: this.state.currentDividerPos-4 }}
onClick={()=>{
this.setState({ liveScroll: !this.state.liveScroll });
if(document.getElementById('scrollToggle').classList.contains('fa-unlock')) {
document.getElementById('scrollToggle').className = 'fas fa-lock';
document.getElementById('scrollToggleDiv').className = 'arrow lock';
const toggle = document.getElementById('scrollToggle');
const toggleDiv = document.getElementById('scrollToggleDiv');
if(toggle.classList.contains('fa-unlock')) {
toggle.className = 'fas fa-lock';
toggleDiv.className = 'arrow lock';
} else {
document.getElementById('scrollToggle').className = 'fas fa-unlock';
document.getElementById('scrollToggleDiv').className = 'arrow unlock';
toggle.className = 'fas fa-unlock';
toggleDiv.className = 'arrow unlock';
}
}} >
<i id='scrollToggle' className='fas fa-unlock' />