bugfix
This commit is contained in:
@@ -279,9 +279,9 @@ export class Shape {
|
|||||||
|
|
||||||
onProps(props) { // the display properties of an existing shape were changed
|
onProps(props) { // the display properties of an existing shape were changed
|
||||||
if (this.debug) console.log('shape onProps', this.model, props)
|
if (this.debug) console.log('shape onProps', this.model, props)
|
||||||
if (props.textcolor && props.textcolor !== this.tvProps.textcolor)
|
if (props.textcolor && typeof props.textcolor !== 'object' && props.textcolor !== this.tvProps.textcolor)
|
||||||
this.updateModel({color:props.textcolor})
|
this.updateModel({color:props.textcolor})
|
||||||
else if (props.linecolor && props.linecolor !== this.tvProps.linecolor)
|
else if (props.linecolor && typeof props.linecolor !== 'object' && props.linecolor !== this.tvProps.linecolor)
|
||||||
this.updateModel({color:props.linecolor})
|
this.updateModel({color:props.linecolor})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ const props = defineProps({
|
|||||||
setModelValue: Function, // setModelValue(model,value) -> void
|
setModelValue: Function, // setModelValue(model,value) -> void
|
||||||
setValues: Function, // setValues(values:Array) -> void
|
setValues: Function, // setValues(values:Array) -> void
|
||||||
setWeights: Function, // setWeights(values:Array) -> void
|
setWeights: Function, // setWeights(values:Array) -> void
|
||||||
setShapes: Function, // setShapes([shapeA, innerShape, ..., shapeB]) -> void
|
setShapes: { type: Function, default: null }, // setShapes([shapeA, innerShape, ..., shapeB]) -> void
|
||||||
})
|
})
|
||||||
|
|
||||||
const flippedSign = computed(()=>props.flip?-1:1)
|
const flippedSign = computed(()=>props.flip?-1:1)
|
||||||
@@ -330,7 +330,8 @@ function adjustShapes() {
|
|||||||
for( const shape of interiorShapes )
|
for( const shape of interiorShapes )
|
||||||
shape.delete()
|
shape.delete()
|
||||||
interiorShapes = []
|
interiorShapes = []
|
||||||
props.setShapes([])
|
if (props.setShapes)
|
||||||
|
props.setShapes([])
|
||||||
}
|
}
|
||||||
else if (vs.length === 1) {
|
else if (vs.length === 1) {
|
||||||
//
|
//
|
||||||
@@ -343,7 +344,8 @@ function adjustShapes() {
|
|||||||
shape.delete()
|
shape.delete()
|
||||||
interiorShapes = []
|
interiorShapes = []
|
||||||
}
|
}
|
||||||
props.setShapes([shapeA])
|
if (props.setShapes)
|
||||||
|
props.setShapes([shapeA])
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//
|
//
|
||||||
@@ -362,7 +364,8 @@ function adjustShapes() {
|
|||||||
else
|
else
|
||||||
interiorShapes[i-1].setModel(makeModel(i))
|
interiorShapes[i-1].setModel(makeModel(i))
|
||||||
}
|
}
|
||||||
props.setShapes([shapeA, ...interiorShapes, shapeB])
|
if (props.setShapes)
|
||||||
|
props.setShapes([shapeA, ...interiorShapes, shapeB])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -380,7 +383,8 @@ function deleteShapes() {
|
|||||||
for (const shape of interiorShapes)
|
for (const shape of interiorShapes)
|
||||||
shape.delete()
|
shape.delete()
|
||||||
interiorShapes = []
|
interiorShapes = []
|
||||||
props.setShapes([])
|
if (props.setShapes)
|
||||||
|
props.setShapes([])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user