How can I create custom VSM shape? #3021
-
Beta Was this translation helpful? Give feedback.
Answered by
kumilingus
Jul 24, 2025
Replies: 1 comment 3 replies
-
You have completely overridden the class CustomSupplier extends shapes.VSMCustomerSupplier {
defaults() {
return util.defaultsDeep({
type: 'CustomSupplier',
size: { width: 50, height: 50 },
attrs: {
body: {
fill: '#dddddd',
stroke: 'black',
strokeWidth: 2,
},
label: {
text: 'Custom Supplier'
},
},
}, super.defaults)
}
} |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
Tetsu-hub
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have completely overridden the
attrs
of the super class.You should use the
defaultsDeep()
utilitity to merge the nestedattrs
. See docs.