0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-07 20:42:44 +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); window.addEventListener('resize', this.handleWindowResize);
}, },
componentWillUnmount : function() { componentWillUnmount : function() {
window.removeEventListener('resize', this.handleWindowResize); window.removeEventListener('resize', this.handleWindowResize);
}, },
@@ -123,12 +123,14 @@ const SplitPane = createClass({
style={{ left: this.state.currentDividerPos-4 }} style={{ left: this.state.currentDividerPos-4 }}
onClick={()=>{ onClick={()=>{
this.setState({ liveScroll: !this.state.liveScroll }); this.setState({ liveScroll: !this.state.liveScroll });
if(document.getElementById('scrollToggle').classList.contains('fa-unlock')) { const toggle = document.getElementById('scrollToggle');
document.getElementById('scrollToggle').className = 'fas fa-lock'; const toggleDiv = document.getElementById('scrollToggleDiv');
document.getElementById('scrollToggleDiv').className = 'arrow lock'; if(toggle.classList.contains('fa-unlock')) {
toggle.className = 'fas fa-lock';
toggleDiv.className = 'arrow lock';
} else { } else {
document.getElementById('scrollToggle').className = 'fas fa-unlock'; toggle.className = 'fas fa-unlock';
document.getElementById('scrollToggleDiv').className = 'arrow unlock'; toggleDiv.className = 'arrow unlock';
} }
}} > }} >
<i id='scrollToggle' className='fas fa-unlock' /> <i id='scrollToggle' className='fas fa-unlock' />