Skip to content

Commit 4af2fcb

Browse files
committed
uml work
2 parents aaff4a2 + 1d00cda commit 4af2fcb

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

src/components/designer/CodeViewer.vue

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
11
<template>
2-
<v-container>
2+
<v-container
3+
>
4+
35
<v-card>
46
<v-card-title v-if="value[0][0]">
57
{{value[0][0].name}}
68
</v-card-title>
7-
<v-card-text>
9+
<v-card-text
10+
id="scroll-target"
11+
style="max-height: 700px"
12+
class="overflow-y-auto"
13+
>
814
<codemirror
915
ref="codemirror"
1016
:value="code"
1117
:options="cmOption"
1218
@ready="onCmReady"
1319
@Focus="onCmFocus"
1420
@input="onCmCodeChange"
15-
:height="500"
21+
:height="700"
22+
1623
>
1724
</codemirror>
1825
</v-card-text>
19-
2026
</v-card>
2127

2228
</v-container>
@@ -42,6 +48,7 @@
4248
data() {
4349
return {
4450
code: '',
51+
offsetTop: 0,
4552
definitionList: []
4653
}
4754
},
@@ -59,7 +66,8 @@
5966
lineWrapping: true,
6067
matchBrackets: true,
6168
scroll: true,
62-
readOnly: 'nocursor'
69+
readOnly: 'nocursor',
70+
scrollbarStyle : null
6371
}
6472
} else if (this.value[0][0].name.includes('.yml') || this.value[0][0].name.includes('.yaml')) {
6573
var type = {
@@ -147,7 +155,9 @@
147155
}
148156
},
149157
methods: {
150-
158+
onScroll (e) {
159+
this.offsetTop = e.target.scrollTop
160+
},
151161
onCmReady(cm) {
152162
// console.log('the editor is readied!', cm)
153163

src/components/designer/modeling/ModelingDesigner.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
<modal name="uml-modal" :height='"80%"' :width="'80%'">
55
<class-modeler></class-modeler>
66
</modal>
7-
8-
<modal name="code-modal" scrollable :height='"auto"' :width="'80%'">
7+
<modal name="code-modal" :height='"auto"' :width="'80%'">
98
<v-card>
109
<v-card-title>
1110
<span class="headline">Code View</span>
@@ -23,7 +22,9 @@
2322
<v-col :lg="3"
2423
:md="6"
2524
:sm="2"
26-
style="margin-right: 15px; border-right: 1px solid black"
25+
style="margin-right: 15px; border-right: 1px solid black; max-height: 800px;"
26+
id="scroll-target"
27+
class="overflow-y-auto"
2728
>
2829
<v-treeview
2930
:items="codeList"
@@ -53,7 +54,7 @@
5354
<!--console.log(str);-->
5455
<!--</highlight-code>-->
5556

56-
<code-viewer v-model="definitionSet"></code-viewer>
57+
<code-viewer v-model="definitionSet" ></code-viewer>
5758
</v-col>
5859
</v-row>
5960
</v-card-text>

0 commit comments

Comments
 (0)