Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_legacy-plots.scss « styles « src - github.com/nasa/openmct.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a5faf3ec5332aedca5bc69f824216c5360ebe33f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
/*****************************************************************************
 * Open MCT, Copyright (c) 2014-2022, United States Government
 * as represented by the Administrator of the National Aeronautics and Space
 * Administration. All rights reserved.
 *
 * Open MCT 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 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.
 *****************************************************************************/
/********************************************************************* PLOTS */
mct-plot {
    display: contents;
}

/*********************** STACKED PLOT LAYOUT */
.is-editing {
    .gl-plot.child-frame {
        @include hover {
            background: rgba($editUIColorBg, 0.1);
            box-shadow: inset rgba($editUIColorBg, 0.3) 0 0 0 1px;
        }

        &[s-selected] {
            background: rgba($editUIColorBg, 0.2);
            box-shadow: inset rgba($editUIColorBg, 0.8) 0 0 0 1px;
            z-index: 2;
        }
    }

    .plot-wrapper-axis-and-display-area {
        pointer-events: none;
    }
}

.c-plot,
.gl-plot {
        .s-status-taking-snapshot & {
        .c-control-bar {
            display: none;
        }
        .gl-plot-x-label__select,
        .gl-plot-y-label__select {
            display: none;
        }
    }

    /*********************** MISSING ITEM INDICATORS */
    .is-status__indicator {
        font-size: 0.8em;
    }
}

.c-plot {
    @include abs($mainViewPad);
    display: flex;
    overflow: hidden;
    min-height: $plotMinH;

    .c-control-bar {
        flex: 0 0 auto;
        margin-bottom: $interiorMargin;
    }

    .l-view-section {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .c-plot--stacked-container {
        border: 1px solid transparent;
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: $plotMinH;
        overflow: hidden;

        &[s-selected] {
            .is-editing & {
                border: $editMarqueeBorder;
            }
        }
    }
;

    &--stacked {
        min-height: auto !important;

        .child-frame {
            .has-control-bar {
                .c-control-bar {
                    // Hides buttons per plot element in a stacked plot
                    display: none;
                }
            }

            mct-plot {
                display: flex;
                flex: 1 1 auto;
                height: 100%;
                position: relative;
            }
            flex: 1 1 auto;
        }

        .s-status-timeconductor-unsynced .holder-plot {
            .t-object-alert.t-alert-unsynced {
                display: block;
            }
        }
    }

    .--width-less-than-600 & {
        .c-control-bar {
            display: none;
        }
    }
}

.gl-plot {
    display: flex;
    flex: 1 1 auto;

    /*********************** AXIS AND DISPLAY AREA */
    .plot-wrapper-axis-and-display-area {
        position: relative;
        flex: 1 1 auto;
        //min-height: $plotMinH;
    }

    .gl-plot-wrapper-display-area-and-x-axis {
        // Holds the plot area and the X-axis only
        position: absolute;
        top: nth($plotDisplayArea, 1);
        right:0;
        bottom: 0;
        left: nth($plotDisplayArea, 4);

        .gl-plot-display-area {
            overflow: hidden;
            position: absolute;
            top: 0;
            right: 0;
            bottom: nth($plotDisplayArea, 3);
            left: 0;
        }

        .gl-plot-chart-area, .gl-plot-chart-wrapper {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
        }
        .alt-pressed {
            // When alt is being pressed and user is hovering over the plot, set the cursor
            @include cursorGrab();
        }

        .gl-plot-axis-area.gl-plot-x {
            top: auto;
            right: 0;
            bottom: 0;
            left: 0;
            height: $plotXBarH;
            width: auto;
            overflow: hidden;
        }
    }

    .gl-plot-axis-area {
        position: absolute;
        &.gl-plot-y {
            top: nth($plotDisplayArea, 1);
            right: auto;
            bottom: nth($plotDisplayArea, 3);
            left: 0;
            width: $plotYBarW;

            &:hover {
                .gl-plot-y-label__select {
                    display: block;
                }
            }
        }

        &.gl-plot-x {
            @include hover {
                .gl-plot-x-label__select {
                    display: block;
                }
            }
        }
    }

    .gl-plot-coords {
        // This does not appear to be in use in Open MCT
        box-sizing: border-box;
        border-radius: $controlCr;
        background: black;
        padding: 2px 5px;
        position: absolute;
        top: nth($plotDisplayArea,1) + $interiorMarginLg;
        right: auto;
        bottom: auto;
        left: nth($plotDisplayArea,4) + $interiorMarginLg;
        z-index: 10;
        &:empty {
            display: none;
        }
    }

    .gl-plot-ticks, .gl-plot-tick-wrapper {
        height: 100%;
    }

    .gl-plot-label,
    .l-plot-label {
        position: absolute;
        text-align: center;

        &.gl-plot-x-label,
        &.l-plot-x-label {
            top: auto;
            right: 0;
            bottom: 0;
            left: 0;
            height: auto;
        }

        &.gl-plot-y-label {
            display: block;
            left: 0; top: 0; right: auto; bottom: 0;
            text-orientation: mixed;
            writing-mode: vertical-lr;
            &:before {
                // Icon denoting configurability
                margin-bottom: $interiorMargin; // Uses margin-bottom due to writing-mode
            }
        }
    }

    .gl-plot-x-label__select {
        position: absolute;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        z-index: 10;
    }

    .gl-plot-y-label__select {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: 0;
        z-index: 10;
    }

    .gl-plot-x-options,
    .gl-plot-y-options {
        $h: 24px;
        position: absolute;
        height: $h;
        min-height: $h;
        z-index: 2;
    }

    .gl-plot-x-options {
        transform: translateX(-50%);
        bottom: 0;
        left: 50%;
    }

    .gl-plot-y-options {
        transform: translateY(-50%);
        min-width: 150px; // Need this due to enclosure of .select
        top: 50%;
        left: $plotYLabelW + $interiorMargin * 2;
    }

    .t-plot-display-controls {
        position: absolute;
        top: $interiorMargin;
        right: $interiorMargin;
    }

    .gl-plot-hash {
        position: absolute;
        opacity: $opacityPlotHash;
        &.hash-v {
            border-right: 1px $colorPlotHash $stylePlotHash;
            height: 100%;
        }
        &.hash-h {
            border-bottom: 1px $colorPlotHash $stylePlotHash;
            width: 100%;
        }
    }

    &__local-controls {
        // Plot local controls
        $m: $interiorMargin;
        display: flex;
        align-items: center;
        position: absolute;
        top: $m;
        left: $m;
        z-index: 9;

        &__reset {
            transition: right 100ms;
            top: $m;
            right: $m;
        }

        &__zoom-and-guides {
            top: $m;
            right: $m;
        }

        .c-button {
            box-shadow: $colorLocalControlOvrBg 0 0 0 2px;
        }
    }

    .l-state-indicators {
        color: $colorPausedBg;
        position: absolute;
        cursor: help;
        font-size: 1.2em;
        bottom: $interiorMarginSm;
        left: $interiorMarginSm;
        z-index: 2;

        > * + * {
            margin-left: $interiorMarginSm;
        }

        .t-alert-unsynced {
            display: none;
        }
    }
}

.gl-plot-display-area,
.plot-display-area {
    @if $colorPlotBg != none {
        background-color: $colorPlotBg;
    }
    cursor: crosshair;
    border: 1px solid $colorPlotAreaBorder;
}

.tick {
    position: absolute;
    border: 0 $colorPlotHash solid;
    &.tick-x {
        border-right-width: 1px;
        height: 100%; // Assumption is that the tick will be in a holder that will set it's height;
    }
}

.gl-plot-tick,
.tick-label {
    @include reverseEllipsis();
    font-size: 0.7rem;
    position: absolute;
    &.gl-plot-x-tick-label,
    &.tick-label-x {
        right: auto;
        bottom: auto;
        left: auto;
        height: auto;
        width: 20%;
        margin-left: -10%;
        text-align: center;
    }
    &.gl-plot-y-tick-label,
    &.tick-label-y {
        top: auto;
        height: 1em;
        width: auto;
        margin-bottom: -0.5em;
        text-align: right;
    }
}

.gl-plot-tick {
    &.gl-plot-x-tick-label {
        top: $interiorMarginSm;
    }
    &.gl-plot-y-tick-label {
        right: $interiorMarginSm;
        left: auto;
    }
}

.tick-label {
    &.tick-label-x {
        top: 0;
    }
    &.tick-label-y {
        right: 0;
        left: 0;
    }
}

.export-plot {
    $bg: white;
    $fg: black;
    $gry: #999;

    background: $bg !important;
    z-index: -10;

    .l-view-section {
        .s-status-timeconductor-unsynced .holder-plot {
            .t-object-alert.t-alert-unsynced {
                display: none;
            }
        }
    }

    .gl-plot-display-area {
        background: none !important;
        border-color: $gry !important;

        .gl-plot-local-controls,
        .h-local-controls {
            opacity: 0;
        }
    }

    .gl-plot {
        color: $fg;

        .gl-plot-hash {
            opacity: 0.1;
            border-color: $fg;
        }
    }

    table {
        thead {
            border-bottom: none;

            th {
                background: #eee;
                border-left-color: $bg;
                color: #666;
            }

            tr {
                border: none;
            }
        }
        tbody {
            tr {
                border-top: 1px solid #ccc;
            }

            td {
                color: $fg;
            }
        }
    }
}

/****************** _LEGEND.SCSS */
.gl-plot-legend,
.c-plot-legend {
    overflow: hidden;
    flex: 0 0 auto; // Prevents clipping for all legend placements (top, bottom, etc.)

    &__wrapper {
        // Holds view-control and both collapsed and expanded legends
        flex: 1 1 auto;
        height: 100%;
        overflow: auto;
        padding: 2px;
    }

    &__view-control {
        padding-top: 4px;
        margin-right: $interiorMarginSm;
    }

    &__header {
        @include propertiesHeader();
        margin-bottom: $interiorMarginSm;
    }

    .--width-less-than-600 & {
        &.is-legend-hidden {
            display: none;
        }
    }
}

.c-plot--stacked {
    .is-legend-hidden {
        // Always show the legend in a stacked plot
        display: flex !important;
    }
}


.gl-plot-legend {
    display: flex;
    align-items: flex-start;

    table {
        table-layout: fixed;
        th,
        td {
            @include ellipsize(); // Note: this won't work if table-layout uses anything other than fixed.
            padding: 1px 3px; // Tighter than standard tabular padding
        }
    }
}

*[class*="-legend"] {
    &.hover-on-plot {
        // User is hovering over the plot to get a value at a point
        .hover-value-enabled {
            background-color: $legendHoverValueBg;
            border-radius: $smallCr;
            padding: 0 $interiorMarginSm;

            &.value-to-display-min:before {
                content: 'MIN ';
            }
            &.value-to-display-max:before {
                content: 'MAX ';
            }
        }
    }
}

/***************** GENERAL STYLES, ALL STATES */
.plot-legend-item, .plot-series-limit-label {
    // General styles for legend items, both expanded and collapsed legend states
    > * + * {
        margin-left: $interiorMarginSm;
    }

    .plot-series-color-swatch {
        @include colorSwatch();
        display: inline-block;
        flex: 0 0 auto;
    }
    .plot-series-name {
        display: inline;
        @include ellipsize();
    }

    .plot-series-value {
        @include ellipsize();
        @include isLimit();
    }
}

.plot-series-swatch-and-name {
    display: flex;
    flex: 0 1 auto;
    align-items: center;

    > * + * {
        margin-left: $interiorMarginSm;
    }
}

.plot-wrapper-expanded-legend {
    flex: 1 1 auto;
}

.plot-legend-top .gl-plot-legend { margin-bottom: $interiorMargin; }
.plot-legend-bottom .gl-plot-legend { margin-top: $interiorMargin; }
.plot-legend-left .gl-plot-legend { margin-right: $interiorMargin; }
.plot-legend-right .gl-plot-legend { margin-left: $interiorMargin; }

.gl-plot,
.c-plot {
    &.plot-legend-collapsed .plot-wrapper-expanded-legend { display: none; }
    &.plot-legend-expanded .plot-wrapper-collapsed-legend { display: none; }

    &.plot-legend-collapsed .icon-cursor-lock::before { padding-right: 5px; }
    &.plot-legend-expanded .icon-cursor-lock::before { padding-right: 5px; }

    &.plot-legend-top .gl-plot-legend { margin-bottom: $interiorMargin; }
    &.plot-legend-bottom .gl-plot-legend { margin-top: $interiorMargin; }
    &.plot-legend-right .gl-plot-legend { margin-left: $interiorMargin; }
    &.plot-legend-left .gl-plot-legend { margin-right: $interiorMargin; }

    /***************** GENERAL STYLES, COLLAPSED */
    &.plot-legend-collapsed {
        // .plot-legend-item is a span of spans.

        .plot-legend-item {
            display: flex;
            justify-content: stretch;

            .plot-series-swatch-and-name,
            .plot-series-value {
                @include ellipsize();
                flex: 1 1 auto;
            }

            .plot-series-value {
                text-align: left;
            }
        }
    }

    /***************** GENERAL STYLES, EXPANDED */
    &.plot-legend-expanded {
        .gl-plot-legend {
             max-height: 70%;
        }

        .plot-wrapper-expanded-legend {
            overflow-y: auto;
            table thead th { background: $legendTableHeadBg; }
        }
    }

    /***************** TOP OR BOTTOM */
    &.plot-legend-top,
    &.plot-legend-bottom,
    &.plot-legend-hidden {
        // General styles when legend is on the top or bottom
        // -hidden included for legacy plots
        flex-direction: column;

        &.plot-legend-collapsed {
            // COLLAPSED ON TOP OR BOTTOM
            .plot-wrapper-collapsed-legend {
                display: flex;
                flex: 1 1 auto;
                overflow: hidden;

                > .plot-legend-item + .plot-legend-item {
                    // Space between plot items
                    margin-left: $interiorMarginLg;
                }
            }
        }
    }

    /***************** LEFT OR RIGHT */
    &.plot-legend-left,
    &.plot-legend-right {
        // General styles when legend is on left or right

        .gl-plot-legend {
            max-height: inherit;
        }

        &.plot-legend-expanded {
            // EXPANDED, ON EITHER SIDE
            .gl-plot-legend {
                width: $plotLegendWidthExpanded;
            }
        }

        &.plot-legend-collapsed {
            // COLLAPSED, ON EITHER SIDE
            .gl-plot-legend {
                width: $plotLegendWidthCollapsed;
            }

            .plot-wrapper-collapsed-legend {
                display: flex;
                flex-flow: column nowrap;
                min-width: 0;
                flex: 1 1 auto;
                overflow-y: auto;

                > * + * {
                    // Space between plot items
                    margin-top: $interiorMarginSm;
                }
            }
            .plot-legend-item {
                margin-bottom: $interiorMarginSm;
                margin-left: 0;
                flex-wrap: nowrap;
                .plot-series-swatch-and-name {
                    @include ellipsize();
                    flex: 0 1 auto;
                    min-width: 20%;
                }
                .plot-series-value {
                    flex: 0 1 auto;
                    width: auto;
                }
            }
        }
    }

    /***************** ON BOTTOM OR RIGHT */
    &.plot-legend-right,
    &.plot-legend-bottom {
        .gl-plot-legend {
            order: 2;
        }
        .plot-wrapper-axis-and-display-area {
            order: 1;
        }
    }
}

/***************** STACKED PLOT LEGEND OVERRIDES */
.c-plot--stacked {
    // Always show the legend on top, ignore any position setting
    .c-plot,
    .gl-plot {
        flex-direction: column !important;

        .c-plot-legend,
        .gl-plot-legend {
            margin: 0;
            margin-bottom: $interiorMargin;
            order: 1 !important;
            width: 100% !important;

            .plot-wrapper-collapsed-legend {
                flex-direction: row !important;
            }
        }
        .plot-wrapper-axis-and-display-area {
            order: 2 !important;
        }
    }

}

/***************** BAR GRAPHS */
.c-bar-chart {
    flex: 1 1 auto;
    overflow: hidden;
}

/***************** SCATTER PLOTS */
.c-scatter-chart {
    flex: 1 1 auto;
    overflow: hidden;
}

/***************** CURSOR GUIDES */
[class*='c-cursor-guide'] {
    box-shadow: $shdwCursorGuide;
    background-color: $colorCursorGuide;
    display: none; // Displayed when an element with has-cursor-guides gets a hover; see below
    pointer-events: none;
    position: absolute;
}

.has-cursor-guides:hover [class*='c-cursor-guide'] {
    display: block;
}

.c-cursor-guide {
    &--h {
        height: 1px;
        left: 0; right: 0;
    }

    &--v {
        width: 1px;
        top: 0; bottom: 0;
    }
}

.s-status-timeconductor-unsynced {
    .t-alert-unsynced {
        display: inline-block !important;
    }
}

/*********************** CURSOR LOCK INDICATOR */
[class*='c-state-indicator__alert-cursor-lock'] {
    display: none;
}

[class*='is-cursor-locked'] {
    background: rgba($colorInfo, 0.1);

    [class*='c-state-indicator__alert-cursor-lock'] {
        @include userSelectNone();
        color: $colorInfo;
        display: block;
        margin-right: $interiorMarginSm;

        &[class*='--verbose'] {
            padding: $interiorMarginSm;

        }
    }
}