Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#6812): Align Plot and Plan X-Axes in Time Strips #7744

Merged
merged 26 commits into from
Jul 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5aa6a03
DRAFT - alignment for axes
shefalijoshi Jun 8, 2024
b240519
Use alignmentContext to manage tick widths instead of passing around …
shefalijoshi Jun 11, 2024
eff6398
Merge branch 'master' of https://github.com/nasa/openmct into alignme…
shefalijoshi Jun 11, 2024
c14960f
Remove log statements
shefalijoshi Jun 11, 2024
d2f7458
Add ability to remove alignment widths for a given y axis
shefalijoshi Jun 18, 2024
7e28e18
Fix computation of left margin and width of plan when in the timestrip
shefalijoshi Jun 20, 2024
2167eef
Remove excess padding when there is no left y axis
shefalijoshi Jun 20, 2024
bea3a92
Use alignment composable to adjust left margin and width of time syst…
shefalijoshi Jun 20, 2024
7ab7dc3
Fix now marker visibility
shefalijoshi Jun 20, 2024
8e15ba2
refactor: use built in `Map()` data structure
ozyx Jun 24, 2024
ae90491
refactor: improve readability and conciseness
ozyx Jun 24, 2024
ee1a322
docs: improve jsdocs
ozyx Jun 24, 2024
8f5e2ed
refactor: move jsdoc typedefs to bottom of file
ozyx Jun 24, 2024
78e5ec9
refactor: axis to use vue reactivity
ozyx Jun 25, 2024
81e66fc
fix: return alignment as an object of refs
ozyx Jun 26, 2024
63ac403
alignmentMap needs to be shared state, move it out of the useAlignmen…
shefalijoshi Jun 26, 2024
a096829
Merge branch 'alignment-composable' of https://github.com/nasa/openmc…
shefalijoshi Jun 26, 2024
8288570
Fix now marker offset
shefalijoshi Jul 1, 2024
c76c339
Merge branch 'master' of https://github.com/nasa/openmct into alignme…
shefalijoshi Jul 2, 2024
2029b93
Add new visual test for time strips
shefalijoshi Jul 5, 2024
5b51761
Merge branch 'master' of https://github.com/nasa/openmct into alignme…
unlikelyzero Jul 17, 2024
7b13022
update with animation stabilization
unlikelyzero Jul 17, 2024
467d5c8
Fix failing test due to changed injected property (path -> objectPath)
shefalijoshi Jul 22, 2024
68fdd6d
change injected property from path to objectPath
shefalijoshi Jul 22, 2024
99c1657
Fix spelling
shefalijoshi Jul 22, 2024
548533f
Remove unused arguments to function call
shefalijoshi Jul 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix computation of left margin and width of plan when in the timestrip
  • Loading branch information
shefalijoshi committed Jun 20, 2024
commit 7e28e18eddec45070967790feb25f8d8ea221565
15 changes: 13 additions & 2 deletions src/plugins/plan/components/ActivityTimeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@
</template>

<script>
const AXES_PADDING = 20;

import { inject } from 'vue';

import SwimLane from '@/ui/components/swim-lane/SwimLane.vue';
Expand Down Expand Up @@ -159,10 +161,19 @@ export default {
},
computed: {
alignmentStyle() {
return { marginLeft: `${this.alignmentData.leftWidth + 20}px` };
const leftOffset = this.alignmentData.multiple ? 2 * AXES_PADDING : AXES_PADDING;
return {
marginLeft: `${this.alignmentData.leftWidth + leftOffset}px`
};
},
svgWidth() {
return this.width - this.alignmentData.leftWidth - 20;
// Reduce the width by left axis width, then take off the right yaxis width as well
const leftOffset = this.alignmentData.multiple ? 2 * AXES_PADDING : AXES_PADDING;
const rightOffset = this.alignmentData.rightWidth ? AXES_PADDING : 0;
return (
this.width -
(this.alignmentData.leftWidth + leftOffset + this.alignmentData.rightWidth + rightOffset)
);
}
},
methods: {
Expand Down