File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const emit = defineEmits<{
11
11
const updateValue = (value : string | number | null ) => {
12
12
if (value !== null ) {
13
13
if (typeof value === ' string' ) {
14
- emit (' update:modelValue' , parseInt (value ))
14
+ emit (' update:modelValue' , parseFloat (value ))
15
15
} else {
16
16
emit (' update:modelValue' , value )
17
17
}
Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ const updateValue = (v: Vector2 | undefined) => {
14
14
emit (' update:modelValue' , v )
15
15
}
16
16
const updateX = (x : string | number | null ) => {
17
- if (x ) {
17
+ if (x !== null ) {
18
18
const y = props .modelValue ?.y || 0
19
19
if (typeof x === ' string' ) {
20
- updateValue ({x: parseInt (x ), y })
20
+ updateValue ({x: parseFloat (x ), y })
21
21
} else {
22
22
updateValue ({x , y })
23
23
}
@@ -26,11 +26,10 @@ const updateX = (x: string | number | null) => {
26
26
}
27
27
}
28
28
const updateY = (y : string | number | null ) => {
29
- if (y ) {
29
+ if (y !== null ) {
30
30
const x = props .modelValue ?.x || 0
31
31
if (typeof y === ' string' ) {
32
- updateValue ({x , y: parseInt (y )})
33
-
32
+ updateValue ({x , y: parseFloat (y )})
34
33
} else {
35
34
updateValue ({x , y })
36
35
}
You can’t perform that action at this time.
0 commit comments