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">
|
<div content="jquery-wrapper" class="abs holder-all browse-mode">
|
||||||
<mct-include key="'topbar-browse'"></mct-include>
|
<mct-include key="'topbar-browse'"></mct-include>
|
||||||
<div class="holder browse-area outline abs" ng-controller="BrowseController">
|
<div class="holder browse-area outline abs" ng-controller="BrowseController">
|
||||||
<div class='split-layout vertical contents abs'>
|
<div class='split-layout vertical contents abs'
|
||||||
<div class='split-pane-component treeview pane'>
|
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 key="'create-button'" mct-object="navigatedObject">
|
||||||
</mct-representation>
|
</mct-representation>
|
||||||
<div class='holder tree-holder abs'>
|
<div class='holder tree-holder abs'>
|
||||||
@ -12,12 +14,17 @@
|
|||||||
</mct-representation>
|
</mct-representation>
|
||||||
</div>
|
</div>
|
||||||
</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'>
|
<div class='holder abs' id='content-area'>
|
||||||
<mct-representation mct-object="navigatedObject" key="'browse-object'">
|
<mct-representation mct-object="navigatedObject" key="'browse-object'">
|
||||||
</mct-representation>
|
</mct-representation>
|
||||||
</div>
|
</div>
|
||||||
</mct-container>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<mct-include key="'bottombar'"></mct-include>
|
<mct-include key="'bottombar'"></mct-include>
|
||||||
|
@ -6,9 +6,10 @@ define(
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function SplitPaneController() {
|
function SplitPaneController() {
|
||||||
var minimum = 8,
|
var minimum = 120,
|
||||||
maximum = 600,
|
maximum = 600,
|
||||||
current = 200,
|
current = 200,
|
||||||
|
start = 200,
|
||||||
style;
|
style;
|
||||||
|
|
||||||
function updateStyle() {
|
function updateStyle() {
|
||||||
@ -21,10 +22,16 @@ define(
|
|||||||
style: function () {
|
style: function () {
|
||||||
return style;
|
return style;
|
||||||
},
|
},
|
||||||
|
state: function () {
|
||||||
|
return current;
|
||||||
|
},
|
||||||
|
startMove: function () {
|
||||||
|
start = current;
|
||||||
|
},
|
||||||
move: function (delta) {
|
move: function (delta) {
|
||||||
current = Math.min(
|
current = Math.min(
|
||||||
maximum,
|
maximum,
|
||||||
Math.max(minimum, current + delta)
|
Math.max(minimum, start + delta)
|
||||||
);
|
);
|
||||||
updateStyle();
|
updateStyle();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user