projectstorm / react-diagrams

a super simple, no-nonsense diagramming library written in react that just works
https://projectstorm.cloud/react-diagrams
MIT License
8.51k stars 1.17k forks source link

Update DefaultPortModel.ts #877

Closed lancety closed 2 years ago

lancety commented 2 years ago

this is about fixing a type error when creating custom port model; when making custom port widget with custom styled link, I need to make a custom port model, which need a custom type in constructor's options object, but options.type is missing in the DefaultPortModel constructor props type. So I added it in.

Checklist

Feel good image:

(Add your own one below :])

LOL

dylanvorster commented 2 years ago

The thing is though, you should not extend from Default if you want to make your own models, thats why type is hardcoded to default.