mirror of
https://github.com/nasa/openmct.git
synced 2025-01-01 19:06:40 +00:00
[Browse] Utilize splite pane directly
Utilize split pane controller directly from browse template; quick fix for need to see more information about packet/point names, WTD-747.
This commit is contained in:
parent
06b599ee37
commit
8fecaaf4f8
@ -1,8 +1,10 @@
|
||||
<div content="jquery-wrapper" class="abs holder-all browse-mode">
|
||||
<mct-include key="'topbar-browse'"></mct-include>
|
||||
<div class="holder browse-area outline abs" ng-controller="BrowseController">
|
||||
<div class='split-layout vertical contents abs'>
|
||||
<div class='split-pane-component treeview pane'>
|
||||
<div class='split-layout vertical contents abs'
|
||||
ng-controller="SplitPaneController as splitter">
|
||||
<div class='split-pane-component treeview pane'
|
||||
ng-style="{ width: splitter.state() + 'px'}">
|
||||
<mct-representation key="'create-button'" mct-object="navigatedObject">
|
||||
</mct-representation>
|
||||
<div class='holder tree-holder abs'>
|
||||
@ -12,12 +14,17 @@
|
||||
</mct-representation>
|
||||
</div>
|
||||
</div>
|
||||
<mct-container key="splitter">
|
||||
<div class="splitter"
|
||||
ng-style="{ left: splitter.state() + 'px'}"
|
||||
mct-drag-down="splitter.startMove()"
|
||||
mct-drag="splitter.move(delta[0])"></div>
|
||||
<div class='split-pane-component items pane'
|
||||
ng-style="{ left: splitter.state() + 'px', right: '0px' }">
|
||||
<div class='holder abs' id='content-area'>
|
||||
<mct-representation mct-object="navigatedObject" key="'browse-object'">
|
||||
</mct-representation>
|
||||
</div>
|
||||
</mct-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<mct-include key="'bottombar'"></mct-include>
|
||||
|
@ -6,9 +6,10 @@ define(
|
||||
"use strict";
|
||||
|
||||
function SplitPaneController() {
|
||||
var minimum = 8,
|
||||
var minimum = 120,
|
||||
maximum = 600,
|
||||
current = 200,
|
||||
start = 200,
|
||||
style;
|
||||
|
||||
function updateStyle() {
|
||||
@ -21,10 +22,16 @@ define(
|
||||
style: function () {
|
||||
return style;
|
||||
},
|
||||
state: function () {
|
||||
return current;
|
||||
},
|
||||
startMove: function () {
|
||||
start = current;
|
||||
},
|
||||
move: function (delta) {
|
||||
current = Math.min(
|
||||
maximum,
|
||||
Math.max(minimum, current + delta)
|
||||
Math.max(minimum, start + delta)
|
||||
);
|
||||
updateStyle();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user