From 551363ccb5567bc62fb8127691c020dd1b6a10c8 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 20 Mar 2024 22:04:07 -0400 Subject: [PATCH] bugfixes --- src/charts/chart.js | 2 +- src/charts/shape.js | 1 + src/components/chart/LimitBuilder.vue | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/charts/chart.js b/src/charts/chart.js index eba3b2e..89cc6b0 100644 --- a/src/charts/chart.js +++ b/src/charts/chart.js @@ -211,7 +211,7 @@ let eventLock = false // this is set to true before events are processed, in ord let propsEvents = {} function handleDrawingEvent(id, event) { - if (eventLock && event !== 'properties_changed') { // properties has its own locking mechanism + if (eventLock && event !== 'properties_changed' && event !== 'remove') { // properties has its own locking mechanism console.log('ignoring event', id, event) return } diff --git a/src/charts/shape.js b/src/charts/shape.js index ee9a10d..f957bcd 100644 --- a/src/charts/shape.js +++ b/src/charts/shape.js @@ -160,6 +160,7 @@ class Shape { setPropsIfDirty(props) { + // console.log('dirtyProps', this.props, props, dirtyProps(this.props, props)) if( dirtyProps(this.props, props) ) this.setProps(props) } diff --git a/src/components/chart/LimitBuilder.vue b/src/components/chart/LimitBuilder.vue index f15c5e1..f079824 100644 --- a/src/components/chart/LimitBuilder.vue +++ b/src/components/chart/LimitBuilder.vue @@ -296,12 +296,12 @@ function allocationText(weight) { function adjustShapes() { // this is where all the lines are created or adjusted - // console.log('adjustShapes()') + console.log('adjustShapes()') const limits = prices.value const colorStrings = colors.value // line properties - const lps = weights.value.map((w)=>{return {text:allocationText(w), textcolor:color.value}}) + const lps = weights.value.map((w)=>{return {text:allocationText(w), textcolor:color.value, showLabel: true}}) // todo make this label innate to HLine with allocation and amount set in the model if( limits.length === 0 ) { lineA.delete() lineB.delete()