Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
SriNandan33 committed Jan 24, 2021
1 parent 7e8e2bf commit 6478887
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/views/Room.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,28 +225,27 @@ export default {
},
// Resize listenrs
addResizeListeners(){
addResizeListeners() {
const resizer = document.querySelector('.resizer')
const holder = document.querySelector('.holder')
const editor = document.querySelector('.code-editor')
const drawingBoard = document.querySelector('.drawing-board')
const parentWidth = holder.offsetWidth
let isMouseDown = false;
let isMouseDown = false
resizer.addEventListener('mousedown', (e) => {
isMouseDown = true;
isMouseDown = true
})
document.addEventListener('mousemove', (e) => {
if (!isMouseDown) return;
if (!isMouseDown) return
editor.style.width = `${e.clientX}px`
drawingBoard.style.width = `${parentWidth - e.clientX}px`
})
document.addEventListener('mouseup', () => {
isMouseDown = false;
isMouseDown = false
})
}
}
}
Expand Down

0 comments on commit 6478887

Please sign in to comment.