bugfix
This commit is contained in:
@@ -279,9 +279,9 @@ export class Shape {
|
||||
|
||||
onProps(props) { // the display properties of an existing shape were changed
|
||||
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})
|
||||
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})
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ const props = defineProps({
|
||||
setModelValue: Function, // setModelValue(model,value) -> void
|
||||
setValues: Function, // setValues(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)
|
||||
@@ -330,7 +330,8 @@ function adjustShapes() {
|
||||
for( const shape of interiorShapes )
|
||||
shape.delete()
|
||||
interiorShapes = []
|
||||
props.setShapes([])
|
||||
if (props.setShapes)
|
||||
props.setShapes([])
|
||||
}
|
||||
else if (vs.length === 1) {
|
||||
//
|
||||
@@ -343,7 +344,8 @@ function adjustShapes() {
|
||||
shape.delete()
|
||||
interiorShapes = []
|
||||
}
|
||||
props.setShapes([shapeA])
|
||||
if (props.setShapes)
|
||||
props.setShapes([shapeA])
|
||||
}
|
||||
else {
|
||||
//
|
||||
@@ -362,7 +364,8 @@ function adjustShapes() {
|
||||
else
|
||||
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)
|
||||
shape.delete()
|
||||
interiorShapes = []
|
||||
props.setShapes([])
|
||||
if (props.setShapes)
|
||||
props.setShapes([])
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user