buildLine() typecast to Number

This commit is contained in:
Tim
2024-05-15 00:17:42 -04:00
parent 522cbfcec3
commit b1c17e088d
2 changed files with 3 additions and 2 deletions

View File

@@ -210,6 +210,7 @@ function onSelectedLineToolChanged() {
export let dragging = false
function mouseDown() {
// console.log('mouseDown')
// todo push into drawing event queue instead, then set dragging there
dragging = true
}

View File

@@ -94,7 +94,7 @@
<script setup>
import {allocationText, applyLinePoints, builderDefaults, useChartOrderStore} from "@/orderbuild.js";
import {sideColor} from "@/misc.js";
import {DISTANT_FUTURE, DISTANT_PAST, MAX_FRACTION, newTranche} from "@/blockchain/orderlib.js";
import {MAX_FRACTION, newTranche} from "@/blockchain/orderlib.js";
import RungBuilder from "@/components/chart/RungBuilder.vue";
import {computed, ref} from "vue";
import {DLine} from "@/charts/shape.js";
@@ -175,7 +175,7 @@ function flattenLine(l) {
function buildLine(f) {
// console.log('buildLine', f)
return f === null ? null : [{time: f[0], price: f[1]}, {time: f[2], price: f[3]}]
return f === null ? null : [{time: Number(f[0]), price: Number(f[1])}, {time: Number(f[2]), price: Number(f[3])}]
}
const _endpoints = ref([flattenLine(props.builder.lineA), flattenLine(props.builder.lineB)])