mirror of
https://github.com/nasa/openmct.git
synced 2025-02-22 10:11:06 +00:00
Revert "persist user preference width for MCTSplitPanes issue #1646"
This commit is contained in:
parent
10b0f43fc1
commit
b41ceab51e
@ -26,7 +26,7 @@
|
|||||||
ng-controller="PaneController as modelPaneTree"
|
ng-controller="PaneController as modelPaneTree"
|
||||||
ng-class="modelPaneTree.visible() ? 'pane-tree-showing' : 'pane-tree-hidden'">
|
ng-class="modelPaneTree.visible() ? 'pane-tree-showing' : 'pane-tree-hidden'">
|
||||||
<mct-split-pane class='abs contents'
|
<mct-split-pane class='abs contents'
|
||||||
anchor='left' alias="leftSide">
|
anchor='left'>
|
||||||
<div class='split-pane-component treeview pane left'>
|
<div class='split-pane-component treeview pane left'>
|
||||||
<div class="abs holder l-flex-col holder-treeview-elements">
|
<div class="abs holder l-flex-col holder-treeview-elements">
|
||||||
<mct-representation key="'create-button'"
|
<mct-representation key="'create-button'"
|
||||||
@ -60,7 +60,7 @@
|
|||||||
ng-controller="InspectorPaneController as modelPaneInspect"
|
ng-controller="InspectorPaneController as modelPaneInspect"
|
||||||
ng-class="modelPaneInspect.visible() ? 'pane-inspect-showing' : 'pane-inspect-hidden'">
|
ng-class="modelPaneInspect.visible() ? 'pane-inspect-showing' : 'pane-inspect-hidden'">
|
||||||
|
|
||||||
<mct-split-pane class='l-object-and-inspector contents abs' anchor='right' alias="rightSide">
|
<mct-split-pane class='l-object-and-inspector contents abs' anchor='right'>
|
||||||
<div class='split-pane-component t-object pane primary-pane left'>
|
<div class='split-pane-component t-object pane primary-pane left'>
|
||||||
<mct-representation mct-object="navigatedObject"
|
<mct-representation mct-object="navigatedObject"
|
||||||
key="navigatedObject.getCapability('status').get('editing') ? 'edit-object' : 'browse-object'"
|
key="navigatedObject.getCapability('status').get('editing') ? 'edit-object' : 'browse-object'"
|
||||||
@ -87,3 +87,4 @@
|
|||||||
</div>
|
</div>
|
||||||
<mct-include key="'bottombar'"></mct-include>
|
<mct-include key="'bottombar'"></mct-include>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -94,7 +94,6 @@ define(
|
|||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function MCTSplitPane($parse, $log, $interval) {
|
function MCTSplitPane($parse, $log, $interval) {
|
||||||
var splitPaneNumber = 1;
|
|
||||||
function controller($scope, $element, $attrs) {
|
function controller($scope, $element, $attrs) {
|
||||||
var anchorKey = $attrs.anchor || DEFAULT_ANCHOR,
|
var anchorKey = $attrs.anchor || DEFAULT_ANCHOR,
|
||||||
anchor,
|
anchor,
|
||||||
@ -149,10 +148,8 @@ define(
|
|||||||
|
|
||||||
// Enforce minimum/maximum positions
|
// Enforce minimum/maximum positions
|
||||||
function enforceExtrema() {
|
function enforceExtrema() {
|
||||||
// Check for user preference on splitPane width
|
|
||||||
var userWidthPreference = window.localStorage[$attrs.alias];
|
|
||||||
position = Math.max(position, 0);
|
position = Math.max(position, 0);
|
||||||
position = Math.min(position,(userWidthPreference || getSize($element[0])));
|
position = Math.min(position, getSize($element[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getter-setter for the pixel offset of the splitter,
|
// Getter-setter for the pixel offset of the splitter,
|
||||||
@ -168,13 +165,7 @@ define(
|
|||||||
if (positionParsed.assign && position !== prior) {
|
if (positionParsed.assign && position !== prior) {
|
||||||
positionParsed.assign($scope, position);
|
positionParsed.assign($scope, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($attrs.alias) {
|
|
||||||
var myStorage = window.localStorage;
|
|
||||||
myStorage.setItem($attrs.alias, value);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return position;
|
return position;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,7 +219,9 @@ define(
|
|||||||
controller: ['$scope', '$element', '$attrs', controller]
|
controller: ['$scope', '$element', '$attrs', controller]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return MCTSplitPane;
|
return MCTSplitPane;
|
||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -83,3 +83,4 @@ define(
|
|||||||
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user