From 2ee851a2189ca5005a04a9cf0d04bcc1b36beff1 Mon Sep 17 00:00:00 2001 From: Matthew Dapena-Tretter Date: Wed, 12 Apr 2017 11:20:04 -0700 Subject: [PATCH] Don't show resize handle at all for collapsed docks They no longer have any functionality. Themes can add extra affordances if they want. --- src/dock.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/dock.js b/src/dock.js index fd65fed10..d62227107 100644 --- a/src/dock.js +++ b/src/dock.js @@ -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({