open #445 Mods and simplifications to wait-spinner classes; Simplification and cleanup in plot.html to use loading class instead of hide/show DOM element;
94 lines
3.0 KiB
SCSS
94 lines
3.0 KiB
SCSS
/*****************************************************************************
|
|
* Open MCT Web, Copyright (c) 2014-2015, United States Government
|
|
* as represented by the Administrator of the National Aeronautics and Space
|
|
* Administration. All rights reserved.
|
|
*
|
|
* Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
|
* "License"); you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
* License for the specific language governing permissions and limitations
|
|
* under the License.
|
|
*
|
|
* Open MCT Web includes source code licensed under additional open source
|
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
* this source code distribution or the Licensing information page available
|
|
* at runtime from the About dialog for additional information.
|
|
*****************************************************************************/
|
|
@include keyframes(rotation) {
|
|
100% { @include transform(rotate(360deg)); }
|
|
}
|
|
|
|
@include keyframes(rotation-centered) {
|
|
0% { @include transform(translate(-50%, -50%) rotate(0deg)); }
|
|
100% { @include transform(translate(-50%, -50%) rotate(360deg)); }
|
|
}
|
|
|
|
@mixin spinner($b: 5px, $c: $colorKey) {
|
|
@include transform-origin(center);
|
|
@include animation-name(rotation-centered);
|
|
@include animation-duration(0.5s);
|
|
@include animation-iteration-count(infinite);
|
|
@include animation-timing-function(linear);
|
|
@include border-radius(100%);
|
|
@include box-sizing(border-box);
|
|
border-color: rgba($c, 0.25);
|
|
border-top-color: rgba($c, 1.0);
|
|
border-style: solid;
|
|
border-width: $b;
|
|
display: block;
|
|
position: absolute;
|
|
left: 50%; top: 50%;
|
|
}
|
|
|
|
.wait-spinner {
|
|
$d: 5%;
|
|
@include spinner(0.5em, $colorKey);
|
|
height: auto; width: auto;
|
|
padding: $d; // Will size object based on parent container WIDTH
|
|
pointer-events: none;
|
|
z-index: 2;
|
|
&.inline {
|
|
display: inline-block !important;
|
|
margin-right: $interiorMargin;
|
|
position: relative !important;
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
|
|
.treeview .wait-spinner {
|
|
// Only used in subtree.html, which I don't think this is actually being used
|
|
$d: 10px;
|
|
height: $d; width: $d;
|
|
margin: 0 !important;
|
|
padding: 0 !important;
|
|
top: 2px; left: 0;
|
|
}
|
|
|
|
.loading {
|
|
// Can be applied to any block element with height and width
|
|
pointer-events: none;
|
|
&:before,
|
|
&:after {
|
|
content: '';
|
|
}
|
|
&:before {
|
|
@include spinner(5px, $colorLoadingFg);
|
|
padding: 5%;
|
|
z-index: 10;
|
|
}
|
|
&:after {
|
|
@include absPosDefault();
|
|
background: $colorLoadingBg;
|
|
display: block;
|
|
z-index: 9;
|
|
}
|
|
&.tree-item:before {
|
|
padding: $menuLineH / 4;
|
|
border-width: 2px;
|
|
}
|
|
} |