buildLine() typecast to Number
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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)])
|
||||
|
||||
Reference in New Issue
Block a user