Move hoveredDock property from Workspace to WorkspaceElement

It's not used in Workspace anymore.
This commit is contained in:
Max Brunsfeld
2017-04-10 14:18:58 -07:00
parent 399b70662d
commit c43bfafdfb
2 changed files with 4 additions and 5 deletions

View File

@@ -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)
}

View File

@@ -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)