mirror of
https://github.com/atom/atom.git
synced 2026-02-18 02:21:43 -05:00
updating tree-view html to better situate the resizer
This commit is contained in:
@@ -27,7 +27,8 @@ class TreeView extends ScrollView
|
||||
@instance.serialize()
|
||||
|
||||
@content: (rootView) ->
|
||||
@ol class: 'tree-view tool-panel', tabindex: -1, =>
|
||||
@div class: 'tree-view-wrapper', =>
|
||||
@ol class: 'tree-view tool-panel', tabindex: -1, outlet: 'treeViewList'
|
||||
@div class: 'tree-view-resizer', outlet: 'resizer'
|
||||
|
||||
@deserialize: (state, rootView) ->
|
||||
@@ -37,7 +38,6 @@ class TreeView extends ScrollView
|
||||
treeView.focusAfterAttach = state.hasFocus
|
||||
treeView.scrollTopAfterAttach = state.scrollTop
|
||||
treeView.width(state.width)
|
||||
treeView.resizer.css(left: state.width)
|
||||
treeView.attach() if state.attached
|
||||
treeView
|
||||
|
||||
@@ -141,7 +141,7 @@ class TreeView extends ScrollView
|
||||
@root?.remove()
|
||||
if rootDirectory = @rootView.project.getRootDirectory()
|
||||
@root = new DirectoryView(directory: rootDirectory, isExpanded: true, project: @rootView.project)
|
||||
@append(@root)
|
||||
@treeViewList.append(@root)
|
||||
else
|
||||
@root = null
|
||||
|
||||
|
||||
@@ -1,22 +1,26 @@
|
||||
.tree-view {
|
||||
.tree-view-wrapper {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
cursor: default;
|
||||
-webkit-user-select: none;
|
||||
min-width: 100px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.tree-view .tree-view-resizer {
|
||||
.tree-view {
|
||||
cursor: default;
|
||||
-webkit-user-select: none;
|
||||
overflow: auto;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tree-view-wrapper .tree-view-resizer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 10px;
|
||||
background: transparent;
|
||||
cursor: col-resize;
|
||||
position: fixed;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user