Skip to content

Commit

Permalink
Closes #7936
Browse files Browse the repository at this point in the history
- Fixed previous change that broke grid layout of Stacked Plots in Time Strip.
- Re-enabled code that sets min-height for Stacked Plots in Time Strip based
on the number of children.
  • Loading branch information
charlesh88 committed Dec 19, 2024
1 parent 8c72e4a commit 65b1f02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/plugins/timeline/TimelineViewLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const unknownObjectType = {
};

const AXES_PADDING = 20;
const PLOT_ITEM_H_PX = 100;

export default {
components: {
Expand Down Expand Up @@ -156,14 +157,12 @@ export default {
rowCount = getValidatedGroups(domainObject, planData).length;
} else if (domainObject.type === 'gantt-chart') {
rowCount = Object.keys(domainObject.configuration.swimlaneVisibility).length;
} else if (domainObject.type === 'telemetry.plot.stacked') {
rowCount = domainObject.composition.length;
}

let height =
domainObject.type === 'telemetry.plot.stacked'
? `${domainObject.composition.length * 100}px`
: '100px';
? `${domainObject.composition.length * PLOT_ITEM_H_PX}px`
: 'auto';
let item = {
domainObject,
objectPath,
Expand Down
6 changes: 5 additions & 1 deletion src/ui/components/swim-lane/SwimLane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@
/>
</div>
</div>
<div class="c-swimlane__lane-object" :class="{ 'u-contents': showUcontents }">
<div
class="c-swimlane__lane-object"
:style="{ 'min-height': minHeight }"
:class="{ 'u-contents': showUcontents }"
>
<slot name="object"></slot>
</div>
</div>
Expand Down

0 comments on commit 65b1f02

Please sign in to comment.