Don't show resize handle at all for collapsed docks

They no longer have any functionality. Themes can add extra affordances
if they want.
This commit is contained in:
Matthew Dapena-Tretter
2017-04-12 11:20:04 -07:00
parent 9d8df98343
commit 2ee851a218

View File

@@ -205,16 +205,11 @@ module.exports = class Dock {
const shouldBeVisible = state.visible || state.showDropTarget
const size = Math.max(MINIMUM_SIZE, state.size == null ? this.getInitialSize() : state.size)
const resizeHandleSize = this.resizeHandle.getSize()
// We need to change the size of the mask...
this.maskElement.style[this.widthOrHeight] = `${shouldBeVisible ? size : resizeHandleSize}px`
this.maskElement.style[this.widthOrHeight] = `${shouldBeVisible ? size : 0}px`
// ...but the content needs to maintain a constant size.
this.wrapperElement.style[this.widthOrHeight] = `${size}px`
// ...and the non-absolutely positioned dock element should always be large enough to fit the
// resize handle (so the handle doesn't cover the center).
const minWidthOrHeight = this.widthOrHeight === 'width' ? 'minWidth' : 'minHeight'
this.element.style[minWidthOrHeight] = `${resizeHandleSize}px`
this.resizeHandle.update({dockIsVisible: this.state.visible})
this.toggleButton.update({