Skip to content
Discussion options

You must be logged in to vote

You have completely overridden the attrs of the super class.
You should use the defaultsDeep() utilitity to merge the nested attrs. See docs.

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)
  }
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Tetsu-hub
Comment options

@Geliogabalus
Comment options

@Tetsu-hub
Comment options

Answer selected by Tetsu-hub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants