File tree 1 file changed +6
-5
lines changed
web/src/components/VDbChart
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 30
30
{{ name }}
31
31
</text >
32
32
<svg v-if =" pk || props.indexPk" class =" db-field__pk-icon" xmlns =" http://www.w3.org/2000/svg" height =" 16" viewBox =" 0 -960 960 960" width =" 16"
33
- :x =" state.name_width+3 "
33
+ :x =" state.name_width+8 "
34
34
:y =" size.height/4" >
35
35
<path d =" M280-400q-33 0-56.5-23.5T200-480q0-33 23.5-56.5T280-560q33 0 56.5 23.5T360-480q0 33-23.5 56.5T280-400Zm0 160q-100 0-170-70T40-480q0-100 70-170t170-70q67 0 121.5 33t86.5 87h352l120 120-180 180-80-60-80 60-85-60h-47q-32 54-86.5 87T280-240Zm0-80q56 0 98.5-34t56.5-86h125l58 41 82-61 71 55 75-75-40-40H435q-14-52-56.5-86T280-640q-66 0-113 47t-47 113q0 66 47 113t113 47Z" />
36
36
</svg >
37
37
<svg v-if =" _enum || note || dbdefault" xmlns =" http://www.w3.org/2000/svg" class =" db-field__note-icon" height =" 16" viewBox =" 0 -960 960 960" width =" 16"
38
- :x =" pk || props.indexPk ? state.name_width + 20 : state.name_width+4 "
38
+ :x =" pk || props.indexPk ? state.name_width + 24 : state.name_width+8 "
39
39
:y =" size.height/4" >
40
40
<path d =" M200-200h360v-200h200v-360H200v560Zm0 80q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v400L600-120H200Zm80-280v-80h200v80H280Zm0-160v-80h400v80H280Zm-80 360v-560 560Z" />
41
41
</svg >
@@ -99,13 +99,14 @@ import { useChartStore } from '../../store/chart';
99
99
name_width: (props .name .length * 6 )+ 16 ,
100
100
}))
101
101
102
- const updateNameWidth = ()=> {
102
+ const updateNameWidth = (value )=> {
103
103
if (! root .value ) return ;
104
- state .value .name_width = root .value .querySelectorAll (" .db-field__name" )[0 ].getComputedTextLength ()+ 18 ;
104
+ state .value .name_width = value .length * 7
105
+ state .value .name_width = state .value .name_width + 4
105
106
};
106
107
107
108
watch (() => props .name , value => {
108
- updateNameWidth ();
109
+ updateNameWidth (value );
109
110
});
110
111
111
112
const type_shift = computed (()=> {
You can’t perform that action at this time.
0 commit comments