mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Move hoveredDock property from Workspace to WorkspaceElement
It's not used in Workspace anymore.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user