mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
Eliminate unnecessary event listener removals
This commit is contained in:
11
src/dock.js
11
src/dock.js
@@ -80,8 +80,6 @@ module.exports = class Dock {
|
||||
destroy () {
|
||||
this.subscriptions.dispose()
|
||||
this.paneContainer.destroy()
|
||||
this.resizeHandle.destroy()
|
||||
this.toggleButton.destroy()
|
||||
window.removeEventListener('mousemove', this.handleMouseMove)
|
||||
window.removeEventListener('mouseup', this.handleMouseUp)
|
||||
window.removeEventListener('drag', this.handleDrag)
|
||||
@@ -651,10 +649,6 @@ class DockResizeHandle {
|
||||
}
|
||||
}
|
||||
|
||||
destroy () {
|
||||
this.element.removeEventListener('mousedown', this.handleMouseDown)
|
||||
}
|
||||
|
||||
handleMouseDown (event) {
|
||||
if (event.detail === 2) {
|
||||
this.props.onResizeToFit()
|
||||
@@ -695,11 +689,6 @@ class DockToggleButton {
|
||||
return this.bounds
|
||||
}
|
||||
|
||||
destroy () {
|
||||
this.innerElement.removeEventListener('click', this.handleClick)
|
||||
this.innerElement.removeEventListener('dragenter', this.handleDragEnter)
|
||||
}
|
||||
|
||||
update (newProps) {
|
||||
this.props = Object.assign({}, this.props, newProps)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user