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