mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Fix not to show scroll bar when full screen mode in Windows
This commit is contained in:
@@ -160,26 +160,29 @@ class Main extends React.Component {
|
|||||||
handleFullScreenButton (e) {
|
handleFullScreenButton (e) {
|
||||||
this.setState({ fullScreen: !this.state.fullScreen }, () => {
|
this.setState({ fullScreen: !this.state.fullScreen }, () => {
|
||||||
const noteDetail = document.querySelector('.NoteDetail')
|
const noteDetail = document.querySelector('.NoteDetail')
|
||||||
|
const noteList = document.querySelector('.NoteList')
|
||||||
const mainBody = document.querySelector('#main-body')
|
const mainBody = document.querySelector('#main-body')
|
||||||
|
|
||||||
if (this.state.fullScreen) {
|
if (this.state.fullScreen) {
|
||||||
this.hideLeftLists(noteDetail, mainBody)
|
this.hideLeftLists(noteDetail, noteList, mainBody)
|
||||||
} else {
|
} else {
|
||||||
this.showLeftLists(noteDetail, mainBody)
|
this.showLeftLists(noteDetail, noteList, mainBody)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
hideLeftLists (noteDetail, mainBody) {
|
hideLeftLists (noteDetail, noteList, mainBody) {
|
||||||
this.state.noteDetailWidth = noteDetail.style.left
|
this.state.noteDetailWidth = noteDetail.style.left
|
||||||
this.state.mainBodyWidth = mainBody.style.left
|
this.state.mainBodyWidth = mainBody.style.left
|
||||||
noteDetail.style.left = '0px'
|
noteDetail.style.left = '0px'
|
||||||
mainBody.style.left = '0px'
|
mainBody.style.left = '0px'
|
||||||
|
noteList.style.display = 'none'
|
||||||
}
|
}
|
||||||
|
|
||||||
showLeftLists (noteDetail, mainBody) {
|
showLeftLists (noteDetail, noteList, mainBody) {
|
||||||
noteDetail.style.left = this.state.noteDetailWidth
|
noteDetail.style.left = this.state.noteDetailWidth
|
||||||
mainBody.style.left = this.state.mainBodyWidth
|
mainBody.style.left = this.state.mainBodyWidth
|
||||||
|
noteList.style.display = 'inline'
|
||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
|
|||||||
Reference in New Issue
Block a user