Skip to content

Commit

Permalink
style changes (for smaller screens)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArielMant0 committed Dec 13, 2023
1 parent 07b0bf6 commit dc732ce
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@
</v-sheet>

<v-sheet class="ma-2 d-flex flex-column align-center"
style="overflow-x: hidden; max-height: 99vh; min-width: 1100px;"
:style="{ 'overflow-x': 'auto', 'max-height': '99vh', 'width': (chartWidth+200)+'px'}"
color="grey-lighten-5" rounded="sm">

<div class="ma-1 mt-2 pa-1">
<KeepAlive>
<LineChart v-if="mainTab !== MAIN_TABS.HELP"
:data="lineData"
:width="950"
:width="chartWidth-150"
:height="300"
x-attr="0" y-attr="1"
:color-scale="mainTab === MAIN_TABS.TS && ts ? app.tsColorScale : app.tscColorScale"
Expand All @@ -74,7 +74,7 @@
:add-node-id="tree.addNodeID"
:replace-node-id="replaceCompID"
:x-values="tsc.dataX"
:width="1000"
:width="chartWidth"
@update="updateCompositor"
@switch="switchComponents"
@replace="replaceComponent"
Expand Down Expand Up @@ -130,6 +130,7 @@
import OperationTree from '@/components/OperationTree.vue';
import TutorialManager from '@/components/TutorialManager.vue';
import HelpPage from '@/components/HelpPage.vue';
import { useElementSize } from '@vueuse/core';
const app = useApp();
const comms = useComms();
Expand All @@ -140,6 +141,17 @@
const { mainTab } = storeToRefs(app)
const wrapperSize = reactive(useElementSize(wrapper))
const chartWidth = computed(() => {
return Math.max(
500,
Math.min(
wrapperSize.width*0.6,
Math.min(wrapperSize.width-350, 900)
)
)
});
const replaceCompID = ref("");
const lineData = ref([]);
const exportData = reactive({
Expand Down

0 comments on commit dc732ce

Please sign in to comment.