charting refactor into shapes, not debugged
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div class="d-flex">
|
||||
<div class="d-flex" >
|
||||
<span class="arrow align-self-start"><v-icon icon="mdi-arrow-up-bold" color="green"/></span>
|
||||
<span class="logo">dexorder</span>
|
||||
<v-chip text="ALPHA" size='x-small' color="red" class="align-self-start" variant="text"/>
|
||||
<v-btn variant="flat" prepend-icon="mdi-clock-outline" @click="build('DCABuilder')">DCA</v-btn>
|
||||
<!-- <v-btn variant="flat" prepend-icon="mdi-clock-outline" @click="build('DCABuilder')">DCA</v-btn>-->
|
||||
<v-btn variant="flat" prepend-icon="mdi-ray-vertex" @click="build('LimitBuilder')">Limit</v-btn>
|
||||
<v-btn variant="flat" prepend-icon="mdi-vector-line">Line</v-btn>
|
||||
<v-btn variant="flat" prepend-icon="mdi-question" @click="test">Test</v-btn>
|
||||
<!-- <v-btn variant="flat" prepend-icon="mdi-vector-line">Line</v-btn>-->
|
||||
<v-btn variant="flat" prepend-icon="mdi-question" @click="build('Test')">Test</v-btn>
|
||||
<!--
|
||||
mdi-ray-start-end
|
||||
mdi-vector-polyline
|
||||
@@ -18,8 +18,9 @@
|
||||
<script setup>
|
||||
import {useStore} from "@/store/store.js";
|
||||
import {useChartOrderStore} from "@/orderbuild.js";
|
||||
import {chart, drawShape, ShapeType} from "@/chart.js";
|
||||
import {chart, drawShape} from "@/charts/chart.js";
|
||||
import {timestamp} from "@/misc.js";
|
||||
import {ShapeType} from "@/charts/shape.js";
|
||||
|
||||
const s = useStore()
|
||||
const co = useChartOrderStore()
|
||||
@@ -29,10 +30,13 @@ let shape = null
|
||||
|
||||
|
||||
function test() {
|
||||
if( shape === null )
|
||||
drawShape(ShapeType.VLine, {onCreate:function (shapeId){shape=shapeId}})
|
||||
else
|
||||
chart.getShapeById(shape).setPoints([{time:timestamp()}])
|
||||
const testCb = {
|
||||
onCreate(shapeId) {shape=shapeId},
|
||||
}
|
||||
if( shape === null ) {
|
||||
drawShape(ShapeType.HLine, testCb)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user