Jason Rudolph
ae9f24602d
🐛 Fix #14442
...
Fixes error activating next/previous pane from Dock.
2017-05-17 15:28:24 -04:00
Max Brunsfeld
a61accf175
Don't change focus when hiding an unfocused dock
2017-05-02 10:34:14 -07:00
Matthew Dapena-Tretter
d40a14be29
Add tests for dock sizing behavior
2017-04-15 11:50:41 -07:00
Matthew Dapena-Tretter
f6b20cd31c
Reduce dock initial size lookups
...
Previously, we would get the initial size every time we didn't have an
explicit one. With this commit, we only get the initial size when we
deserialize and when we go from 0 -> 1 pane items.
Also, if the dock doesn't already have an explicit size, we'll use the
preferred size of the item being dragged when peaking the dock. That
way, dropping it won't cause it to change size.
2017-04-15 11:50:19 -07:00
Matthew Dapena-Tretter
915931dddd
🐛 Make sure docks affordance can always be revealed
2017-04-13 15:52:05 -07:00
Antonio Scandurra
b8e6689abf
Merge pull request #14178 from atom/fb-mdt-resize-handle-shouldnt-cover-center
...
Prevent the resize handle from covering the center
2017-04-13 18:17:09 +02:00
Matthew Dapena-Tretter
2ee851a218
Don't show resize handle at all for collapsed docks
...
They no longer have any functionality. Themes can add extra affordances
if they want.
2017-04-12 11:24:47 -07:00
Nathan Sobo
8b8218bf81
Properly restore focus to center when hiding dock via toggle
2017-04-12 09:46:18 -06:00
Matthew Dapena-Tretter
2a2d657d98
Prevent the resize handle from covering the center
...
Currently, the absolutely positioned element is the only thing with a
size. That means that it'll cover the center. With this change, we give
a size to the (relatively-positioned) atom-dock element so that closed
docks take up canvas space instead.
I think @simurai mentioned this problem before but I wasn't following
and then forgot about it. 😖
2017-04-11 22:38:09 -07:00
Max Brunsfeld
399b70662d
Fix regression in hovered dock tracking due to workspace refactor
...
Also, backfill tests for showing, hiding and updating the dock toggle
buttons in response to mouse movements.
2017-04-10 14:15:31 -07:00
Nathan Sobo
9259372f23
Fix dock hiding on drag
2017-04-08 14:29:34 -06:00
Max Brunsfeld
cabeeca8b6
Publicize more Dock methods
2017-04-07 15:38:25 -07:00
Max Brunsfeld
63d27c5f0a
Rename Dock.isOpen to .isVisible and Dock.open to .show
2017-04-06 17:23:53 -07:00
Nathan Sobo
f15b6d9074
Eliminate unnecessary event listener removals
2017-04-06 16:58:13 -06:00
Nathan Sobo
6f6ec70094
Allow items closed in docks to be reopened
2017-04-06 15:57:26 -06:00
Nathan Sobo
646047f563
Maintain an active pane container on the workspace
...
This will be used by many commands that previously only interacted with
the center of the workspace.
2017-04-06 15:30:01 -06:00
Nathan Sobo
73f04fdaed
Focus the active center pane when hiding a dock
2017-04-05 20:58:05 -06:00
Nathan Sobo
88422ee4c9
Focus the active pane of docks when they are activated
2017-04-05 15:35:47 -06:00
Nathan Sobo
334290aaa7
Resize dock to fit on double-click of resize handle
2017-04-05 12:45:29 -07:00
Nathan Sobo
095dc71ba9
Rename getPreferredInitialHeight/Width to getPereferredHeight/Width
2017-04-05 12:45:29 -07:00
Max Brunsfeld
8b407bf48f
Don't allow opening docks by clicking on the resize handle
2017-04-05 12:45:29 -07:00
Max Brunsfeld
caafa41f6f
Open docks when activating their panes, but not when adding items
2017-04-05 12:00:38 -07:00
Matthew Dapena-Tretter
08e8975a10
Always show the dock when an item is dropped into it
...
Previously, we were only showing it when going from 0 -> 1 items (which
is a bug).
2017-03-27 18:17:02 -07:00
Matthew Dapena-Tretter
3b23ab44bc
Add getLocation() to PaneContainer class
...
This allows the location to be inspected without having to jump to the
DOM and searching for a dock element.
2017-03-27 17:45:21 -07:00
Matthew Dapena-Tretter
41953ae7d6
Only show dock toggle buttons when dragging if item is allowed
2017-03-27 17:45:15 -07:00
Matthew Dapena-Tretter
f3c3917825
Don't show the dock toggle button if it's closed and empty
2017-03-27 14:20:47 -07:00
Matthew Dapena-Tretter
13f0c8a977
Docks: define handle size in CSS; measure in JS
2017-03-27 12:19:08 -07:00
Max Brunsfeld
bc872143cc
Avoid duplicate search for pane container in Workspace.open
2017-03-24 15:49:35 -07:00
Max Brunsfeld
93ba6109fa
Create Dock element lazily to be compatible w/ snapshotting
2017-03-24 15:29:46 -07:00
Matthew Dapena-Tretter
791457d9a7
Add remaining pane container methods and documentation to docks
2017-03-23 11:24:41 -07:00
Matthew Dapena-Tretter
37a3c9b59c
Measure toggle button size instead of hardcoding it
2017-03-23 11:24:41 -07:00
Matthew Dapena-Tretter
e01bc40a78
"affordance" -> "hoverMargin"
2017-03-23 11:24:41 -07:00
Matthew Dapena-Tretter
cd62357f0f
Mention dock getters in Dock docs
2017-03-20 22:39:28 -07:00
Matthew Dapena-Tretter
98e7fcc505
Prefer getElement() to view registry for Docks, PaneContainer & Pane
2017-03-20 22:39:23 -07:00
Matthew Dapena-Tretter
d854a88dbb
Add workspace.toggle() method
2017-03-18 15:32:01 -07:00
Matthew Dapena-Tretter
3ff830102f
Serialize docks
2017-03-18 15:31:57 -07:00
Matthew Dapena-Tretter
bf39947eee
Add Dock component
2017-03-18 15:31:51 -07:00