File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ export function stringProperty(...args) {
97
97
export function colorProperty ( target : any , k ?, desc ?: PropertyDescriptor ) : any ;
98
98
export function colorProperty ( options : ShapePropertyOptions ) : ( target : any , k ?, desc ?: PropertyDescriptor ) => any ;
99
99
export function colorProperty ( ...args ) {
100
- return shapeProperty ( ( v ) => new Color ( v ) , args ) ;
100
+ return shapeProperty ( ( v ) => ( v ? new Color ( v ) : null ) , args ) ;
101
101
}
102
102
export function lengthProperty ( target : any , k ?, desc ?: PropertyDescriptor ) : any ;
103
103
export function lengthProperty ( options : ShapePropertyOptions ) : ( target : any , k ?, desc ?: PropertyDescriptor ) => any ;
@@ -171,12 +171,12 @@ export default abstract class Shape extends Observable {
171
171
paintSetter : applyShadow ,
172
172
} )
173
173
shadow : Shadow ;
174
- @stringProperty ( { nonPaintProp :true } ) visibility : Visibility = 'visible' ;
174
+ @stringProperty ( { nonPaintProp : true } ) visibility : Visibility = 'visible' ;
175
175
176
176
abstract drawOnCanvas ( canvas : Canvas , parent : CanvasView ) : void ;
177
177
178
178
drawMyShapeOnCanvas ( canvas : Canvas , parent : CanvasView ) {
179
- if ( this . visibility !== 'visible' ) {
179
+ if ( this . visibility !== 'visible' ) {
180
180
return ;
181
181
}
182
182
const paint = this . paint ;
You can’t perform that action at this time.
0 commit comments