mirror of
https://github.com/nasa/openmct.git
synced 2024-12-29 09:28:52 +00:00
[Treeview] Create button and slide transition
Made the create button visible when the left pane is closed. Added a transition between opening and closing the pane.
This commit is contained in:
parent
81ece1190e
commit
d2bc8227c7
@ -24,6 +24,7 @@
|
|||||||
<div class="object-browse-bar bar abs">
|
<div class="object-browse-bar bar abs">
|
||||||
|
|
||||||
<div class="ui-symbol left-pane-tabs"
|
<div class="ui-symbol left-pane-tabs"
|
||||||
|
ng-class="{inactivePane: !ngModel.leftPane}"
|
||||||
ng-click="ngModel.leftPane = !ngModel.leftPane; log(ngModel.pane)">
|
ng-click="ngModel.leftPane = !ngModel.leftPane; log(ngModel.pane)">
|
||||||
<
|
<
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,7 +35,8 @@
|
|||||||
ng-class='{inactive: !paneModel.leftPane}'>
|
ng-class='{inactive: !paneModel.leftPane}'>
|
||||||
|
|
||||||
<mct-representation key="'create-button'"
|
<mct-representation key="'create-button'"
|
||||||
mct-object="navigatedObject">
|
mct-object="navigatedObject"
|
||||||
|
ng-model="paneModel">
|
||||||
</mct-representation>
|
</mct-representation>
|
||||||
|
|
||||||
<div class='holder tree-holder abs'>
|
<div class='holder tree-holder abs'>
|
||||||
|
@ -20,8 +20,10 @@
|
|||||||
at runtime from the About dialog for additional information.
|
at runtime from the About dialog for additional information.
|
||||||
-->
|
-->
|
||||||
<div class="menu-element wrapper" ng-controller="ClickAwayController as createController">
|
<div class="menu-element wrapper" ng-controller="ClickAwayController as createController">
|
||||||
<div class="btn btn-menu create-btn major" ng-click="createController.toggle()">
|
<div class="btn btn-menu create-btn major"
|
||||||
Create
|
ng-class="{inactivePane: !ngModel.leftPane}"
|
||||||
|
ng-click="createController.toggle()">
|
||||||
|
<span>Create</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="menu dropdown super-menu" ng-show="createController.isActive()">
|
<div class="menu dropdown super-menu" ng-show="createController.isActive()">
|
||||||
<mct-representation mct-object="domainObject" key="'create-menu'">
|
<mct-representation mct-object="domainObject" key="'create-menu'">
|
||||||
|
@ -706,25 +706,61 @@ mct-container {
|
|||||||
* this source code distribution or the Licensing information page available
|
* this source code distribution or the Licensing information page available
|
||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/* line 27, ../sass/tree/_layout.scss */
|
/* line 28, ../sass/tree/_layout.scss */
|
||||||
|
.pane.left {
|
||||||
|
transition: width 0.25s; }
|
||||||
|
/* line 31, ../sass/tree/_layout.scss */
|
||||||
.pane.left.inactive {
|
.pane.left.inactive {
|
||||||
visibility: hidden;
|
|
||||||
width: 0 !important;
|
width: 0 !important;
|
||||||
min-width: 0 !important; }
|
min-width: 0 !important; }
|
||||||
|
|
||||||
/* line 36, ../sass/tree/_layout.scss */
|
/* line 37, ../sass/tree/_layout.scss */
|
||||||
|
.splitter-bar.left {
|
||||||
|
opacity: 1;
|
||||||
|
transition: left 0.25s, opacity 0.25s, visibility 0.25s; }
|
||||||
|
/* line 41, ../sass/tree/_layout.scss */
|
||||||
.splitter-bar.left.inactive {
|
.splitter-bar.left.inactive {
|
||||||
left: 0 !important;
|
left: 0 !important;
|
||||||
visibility: hidden; }
|
visibility: hidden;
|
||||||
|
opacity: 0;
|
||||||
|
width: 0; }
|
||||||
|
/* line 48, ../sass/tree/_layout.scss */
|
||||||
|
.splitter-bar.left.inactive:before {
|
||||||
|
border-width: 0; }
|
||||||
|
|
||||||
/* line 46, ../sass/tree/_layout.scss */
|
/* line 55, ../sass/tree/_layout.scss */
|
||||||
|
.create-btn.major {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
transition: all 0.25s; }
|
||||||
|
/* line 60, ../sass/tree/_layout.scss */
|
||||||
|
.create-btn.major.inactivePane {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
position: relative;
|
||||||
|
padding: 0;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
width: 13px;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 14px;
|
||||||
|
left: -11px;
|
||||||
|
top: 20px; }
|
||||||
|
/* line 78, ../sass/tree/_layout.scss */
|
||||||
|
.create-btn.major.inactivePane span {
|
||||||
|
display: none; }
|
||||||
|
|
||||||
|
/* line 85, ../sass/tree/_layout.scss */
|
||||||
|
.items.pane {
|
||||||
|
transition: left 0.25s; }
|
||||||
|
/* line 88, ../sass/tree/_layout.scss */
|
||||||
.items.pane.leftInactive {
|
.items.pane.leftInactive {
|
||||||
left: 0 !important; }
|
left: 0 !important; }
|
||||||
|
|
||||||
/* line 52, ../sass/tree/_layout.scss */
|
/* line 94, ../sass/tree/_layout.scss */
|
||||||
.object-browse-bar {
|
.object-browse-bar {
|
||||||
position: relative; }
|
position: relative; }
|
||||||
/* line 55, ../sass/tree/_layout.scss */
|
/* line 97, ../sass/tree/_layout.scss */
|
||||||
.object-browse-bar .left-pane-tabs {
|
.object-browse-bar .left-pane-tabs {
|
||||||
position: relative;
|
position: relative;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -739,7 +775,10 @@ mct-container {
|
|||||||
background-color: lightgrey;
|
background-color: lightgrey;
|
||||||
border: 1px solid grey;
|
border: 1px solid grey;
|
||||||
border-left-width: 0; }
|
border-left-width: 0; }
|
||||||
/* line 74, ../sass/tree/_layout.scss */
|
/* line 116, ../sass/tree/_layout.scss */
|
||||||
|
.object-browse-bar .left-pane-tabs.inactivePane {
|
||||||
|
left: -16px; }
|
||||||
|
/* line 121, ../sass/tree/_layout.scss */
|
||||||
.object-browse-bar .items-select {
|
.object-browse-bar .items-select {
|
||||||
margin-left: 10px; }
|
margin-left: 10px; }
|
||||||
|
|
||||||
|
@ -22,27 +22,69 @@
|
|||||||
|
|
||||||
// Added by shale on 08/19/2015. Styling for the collapsible tree view.
|
// Added by shale on 08/19/2015. Styling for the collapsible tree view.
|
||||||
|
|
||||||
|
$transitionTime: 0.25s;
|
||||||
|
|
||||||
//.pane.right,
|
//.pane.right,
|
||||||
.pane.left {
|
.pane.left {
|
||||||
|
transition: width $transitionTime;
|
||||||
|
|
||||||
&.inactive {
|
&.inactive {
|
||||||
// Don't want visibility hidden later, because create button
|
|
||||||
visibility: hidden;
|
|
||||||
width: 0 !important;
|
width: 0 !important;
|
||||||
min-width: 0 !important;
|
min-width: 0 !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.splitter-bar.left {
|
.splitter-bar.left {
|
||||||
|
opacity: 1;
|
||||||
|
transition: left $transitionTime, opacity $transitionTime, visibility $transitionTime;
|
||||||
|
|
||||||
&.inactive {
|
&.inactive {
|
||||||
left: 0 !important;
|
left: 0 !important;
|
||||||
|
//display: none;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
//width: 0;
|
opacity: 0;
|
||||||
|
width: 0;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
border-width: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// When the pane is closed, move and resize the create button
|
||||||
|
.create-btn.major {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
transition: all $transitionTime;
|
||||||
|
|
||||||
|
&.inactivePane {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
|
||||||
|
width: 13px;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 14px;
|
||||||
|
|
||||||
|
left: -11px;
|
||||||
|
top: 20px;
|
||||||
|
|
||||||
|
// Remove 'Create' text from the button when in small mode
|
||||||
|
span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The main view needs to align left when the panes are moving around
|
// The main view needs to align left when the panes are moving around
|
||||||
.items.pane {
|
.items.pane {
|
||||||
|
transition: left $transitionTime;
|
||||||
|
|
||||||
&.leftInactive {
|
&.leftInactive {
|
||||||
left: 0 !important;
|
left: 0 !important;
|
||||||
}
|
}
|
||||||
@ -69,6 +111,11 @@
|
|||||||
background-color: lightgrey;
|
background-color: lightgrey;
|
||||||
border: 1px solid grey;
|
border: 1px solid grey;
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
|
|
||||||
|
// Move button closer
|
||||||
|
&.inactivePane {
|
||||||
|
left: -16px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.items-select {
|
.items-select {
|
||||||
|
Loading…
Reference in New Issue
Block a user