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<{
1111const updateValue = (value : string | number | null ) => {
1212 if (value !== null ) {
1313 if (typeof value === ' string' ) {
14- emit (' update:modelValue' , parseInt (value ))
14+ emit (' update:modelValue' , parseFloat (value ))
1515 } else {
1616 emit (' update:modelValue' , value )
1717 }
Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ const updateValue = (v: Vector2 | undefined) => {
1414 emit (' update:modelValue' , v )
1515}
1616const updateX = (x : string | number | null ) => {
17- if (x ) {
17+ if (x !== null ) {
1818 const y = props .modelValue ?.y || 0
1919 if (typeof x === ' string' ) {
20- updateValue ({x: parseInt (x ), y })
20+ updateValue ({x: parseFloat (x ), y })
2121 } else {
2222 updateValue ({x , y })
2323 }
@@ -26,11 +26,10 @@ const updateX = (x: string | number | null) => {
2626 }
2727}
2828const updateY = (y : string | number | null ) => {
29- if (y ) {
29+ if (y !== null ) {
3030 const x = props .modelValue ?.x || 0
3131 if (typeof y === ' string' ) {
32- updateValue ({x , y: parseInt (y )})
33-
32+ updateValue ({x , y: parseFloat (y )})
3433 } else {
3534 updateValue ({x , y })
3635 }
You can’t perform that action at this time.
0 commit comments