diff --git a/src/workspace-element.js b/src/workspace-element.js index 64ff69090..fbcbabcd0 100644 --- a/src/workspace-element.js +++ b/src/workspace-element.js @@ -182,12 +182,12 @@ class WorkspaceElement extends HTMLElement { } updateHoveredDock (mousePosition) { - this.model.hoveredDock = null + this.hoveredDock = null for (let location in this.model.paneContainers) { if (location !== 'center') { const dock = this.model.paneContainers[location] - if (!this.model.hoveredDock && dock.pointWithinHoverArea(mousePosition)) { - this.model.hoveredDock = dock + if (!this.hoveredDock && dock.pointWithinHoverArea(mousePosition)) { + this.hoveredDock = dock dock.setHovered(true) } else { dock.setHovered(false) @@ -198,7 +198,7 @@ class WorkspaceElement extends HTMLElement { } checkCleanupDockHoverEvents () { - if (this.cursorInCenter && !this.model.hoveredDock) { + if (this.cursorInCenter && !this.hoveredDock) { window.removeEventListener('mousemove', this.handleEdgesMouseMove) window.removeEventListener('dragend', this.handleDockDragEnd) } diff --git a/src/workspace.js b/src/workspace.js index 861aa48f4..7864e9178 100644 --- a/src/workspace.js +++ b/src/workspace.js @@ -54,7 +54,6 @@ module.exports = class Workspace extends Model { this.deserializerManager = params.deserializerManager this.textEditorRegistry = params.textEditorRegistry this.styleManager = params.styleManager - this.hoveredDock = null this.draggingItem = false this.itemLocationStore = new StateStore('AtomPreviousItemLocations', 1)