Skip to content

Commit 3829295

Browse files
committed
Closes #7960
- Removed in-page `style` defs from ExtendedLinesOverlay.vue; CSS actually located in timeline.scss. - Improved sizing and style for Marcus Bains ("now") line. - Removed extraneous padding at bottom of plot view when in Time Strip. - Added missing header info to timeline.scss. - CSS refinements.
1 parent 96d8870 commit 3829295

File tree

6 files changed

+90
-56
lines changed

6 files changed

+90
-56
lines changed

src/plugins/events/components/EventTimelineView.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
-->
2222

2323
<template>
24-
<div ref="events" class="c-events-tsv c-timeline-holder">
24+
<div ref="events" class="c-events-tsv">
2525
<div ref="eventsHolder" class="c-events-tsv__contents u-contents"></div>
2626
</div>
2727
</template>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.c-events-tsv {
2+
overflow: hidden;
23
div.c-events-tsv__event-wrapper {
34
cursor: pointer;
45
position: absolute;
@@ -8,27 +9,26 @@
89
margin-top: 5px;
910
&:hover {
1011
z-index: 2;
11-
12+
1213
[class*='__event-handle'] {
1314
background-color: $colorBodyFg;
1415
}
1516
}
1617
}
17-
18+
1819
&__no-items {
1920
fill: $colorBodyFg !important;
2021
}
21-
22+
2223
&__event-handle {
2324
background-color: rgba($colorBodyFg, 0.5);
2425
}
2526
}
26-
27+
2728
.c-events-canvas {
2829
pointer-events: auto; // This allows the event element to receive a browser-level context click
2930
position: absolute;
3031
left: 0;
3132
top: 0;
3233
z-index: 2;
3334
}
34-

src/plugins/timeline/ExtendedLinesOverlay.vue

+1-21
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
this source code distribution or the Licensing information page available
2020
at runtime from the About dialog for additional information.
2121
-->
22-
2322
<template>
24-
<div class="extended-lines-overlay">
23+
<div class="c-timeline__overlay-lines">
2524
<div v-for="(lines, key) in extendedLinesPerKey" :key="key" class="extended-line-container">
2625
<div
2726
v-for="(line, index) in lines"
@@ -53,22 +52,3 @@ export default {
5352
}
5453
};
5554
</script>
56-
57-
<style scoped>
58-
.extended-lines-overlay {
59-
position: absolute;
60-
top: 0;
61-
left: 0;
62-
width: 100%;
63-
height: 100%;
64-
pointer-events: none;
65-
z-index: 10;
66-
}
67-
68-
.extended-line {
69-
position: absolute;
70-
top: 0;
71-
width: 2px;
72-
background-color: blue;
73-
}
74-
</style>

src/plugins/timeline/timeline.scss

+42-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,51 @@
1+
/*****************************************************************************
2+
* Open MCT, Copyright (c) 2014-2024, United States Government
3+
* as represented by the Administrator of the National Aeronautics and Space
4+
* Administration. All rights reserved.
5+
*
6+
* Open MCT is licensed under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
* http://www.apache.org/licenses/LICENSE-2.0.
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
* License for the specific language governing permissions and limitations
15+
* under the License.
16+
*
17+
* Open MCT includes source code licensed under additional open source
18+
* licenses. See the Open Source Licenses file (LICENSES.md) included with
19+
* this source code distribution or the Licensing information page available
20+
* at runtime from the About dialog for additional information.
21+
*****************************************************************************/
22+
23+
/********************************************* TIME STRIP */
124
.c-timeline-holder {
2-
overflow: hidden;
3-
position: relative;
25+
overflow: hidden;
26+
position: relative;
27+
28+
// Plot view overrides
29+
.gl-plot-display-area,
30+
.gl-plot-axis-area.gl-plot-y {
31+
bottom: $interiorMargin !important;
32+
}
433
}
534

635
.c-timeline__objects {
7-
display: contents;
36+
display: contents;
837
}
938

10-
.extended-lines-overlay {
11-
position: absolute;
12-
top: 0;
13-
left: 0;
14-
pointer-events: none; /* Allows clicks to pass through */
15-
z-index: 10; /* Ensure it sits atop swimlanes */
39+
.c-timeline__overlay-lines {
40+
//background: rgba(deeppink, 0.2);
41+
@include abs();
42+
pointer-events: none; /* Allows clicks to pass through */
43+
z-index: 10; /* Ensure it sits atop swimlanes */
1644
}
1745

1846
.extended-line {
19-
position: absolute;
20-
top: 0;
21-
width: 2px;
22-
background-color: $colorBodyFg; /* Use desired color */
23-
}
47+
position: absolute;
48+
top: 0;
49+
width: 2px;
50+
background-color: $colorBodyFg; /* Use desired color */
51+
}

src/ui/components/TimeSystemAxis.vue

+8-5
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
-->
2222
<template>
2323
<div ref="axisHolder" class="c-timesystem-axis">
24-
<div class="nowMarker" :style="nowMarkerStyle"><span class="icon-arrow-down"></span></div>
24+
<div class="c-timesystem-axis__mb-line" :style="nowMarkerStyle"></div>
2525
<svg :width="svgWidth" :height="svgHeight">
26-
<g class="axis" font-size="1.3em" :transform="axisTransform"></g>
26+
<g class="axis" :transform="axisTransform"></g>
2727
</svg>
2828
</div>
2929
</template>
@@ -44,6 +44,7 @@ import { useResizeObserver } from '../composables/resize';
4444
const PADDING = 1;
4545
const PIXELS_PER_TICK = 100;
4646
const PIXELS_PER_TICK_WIDE = 200;
47+
const TIME_AXIS_LINE_Y = 20;
4748

4849
export default {
4950
inject: ['openmct', 'domainObject', 'path'],
@@ -78,7 +79,7 @@ export default {
7879
const { size: containerSize, startObserving } = useResizeObserver();
7980
const svgWidth = ref(0);
8081
const svgHeight = ref(0);
81-
const axisTransform = ref('translate(0,20)');
82+
const axisTransform = ref(`translate(0,${TIME_AXIS_LINE_Y}})`);
8283
const alignmentOffset = ref(0);
8384
const nowMarkerStyle = reactive({
8485
height: '0px',
@@ -169,10 +170,12 @@ export default {
169170
this.updateNowMarker();
170171
},
171172
updateNowMarker() {
172-
const nowMarker = this.$el.querySelector('.nowMarker');
173+
const nowMarker = this.$el.querySelector('.c-timesystem-axis__mb-line');
173174
if (nowMarker) {
174175
nowMarker.classList.remove('hidden');
175-
this.nowMarkerStyle.height = this.contentHeight + 'px';
176+
// const markerH = this.contentHeight - TIME_AXIS_LINE_Y;
177+
this.nowMarkerStyle.height = this.contentHeight - TIME_AXIS_LINE_Y + 'px';
178+
this.nowMarkerStyle.top = TIME_AXIS_LINE_Y + 'px';
176179
const nowTimeStamp = this.openmct.time.now();
177180
const now = this.xScale(nowTimeStamp);
178181
this.nowMarkerStyle.left = `${now + this.alignmentOffset}px`;

src/ui/components/timesystem-axis.scss

+33-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
@use 'sass:math';
2+
13
.c-timesystem-axis {
24
$h: 30px;
35
height: $h;
46

57
svg {
6-
$lineC: rgba($colorBodyFg, 0.3) !important;
8+
$lineC: $colorInteriorBorder; //rgba($colorBodyFg, 0.3) !important;
79
text-rendering: geometricPrecision;
810
width: 100%;
911
height: 100%;
@@ -26,21 +28,42 @@
2628
}
2729
}
2830

29-
.nowMarker {
30-
width: 2px;
31+
&__mb-line {
32+
$c: $colorTimeRealtimeBtnBgMajor;
33+
$w: 13px;
34+
$wHalf: math.floor(math.div($w, 2));
35+
//$h: 5px;
36+
//$hHalf: math.floor(math.div($h, 2));
37+
$transform: translateX(($wHalf - 1) * -1);
38+
39+
border-right: 2px dashed $c;
40+
pointer-events: none;
41+
width: 1px;
3142
position: absolute;
3243
z-index: 10;
33-
background: gray;
44+
45+
&:before,
46+
&:after {
47+
//background: $c;
48+
content: '';
49+
display: block;
50+
position: absolute;
51+
width: 0;
52+
height: 0;
53+
transform: $transform;
54+
border-left: $wHalf solid transparent;
55+
border-right: $wHalf solid transparent;
56+
border-top: $wHalf solid $c;
57+
}
58+
59+
&:after {
60+
bottom: 0;
61+
transform: $transform rotate(180deg);
62+
}
3463

3564
&.hidden {
3665
display: none;
3766
}
3867

39-
& .icon-arrow-down {
40-
font-size: large;
41-
position: absolute;
42-
top: -8px;
43-
left: -8px;
44-
}
4568
}
4669
}

0 commit comments

Comments
 (0)