mirror of
https://github.com/projectstorm/react-diagrams.git
synced 2025-08-26 07:51:10 +08:00
Support deriving from DefaultLabelModel
The DefaultLabelModel constructor deviated from pattern followed by the other Default*Model types, where `...options` is merged after the hardcoded values so that derived classes can override the options. This change makes it conform to that pattern.
This commit is contained in:
@ -12,9 +12,9 @@ export interface DefaultLabelModelGenerics extends LabelModelGenerics {
|
||||
export class DefaultLabelModel extends LabelModel<DefaultLabelModelGenerics> {
|
||||
constructor(options: DefaultLabelModelOptions = {}) {
|
||||
super({
|
||||
...options,
|
||||
offsetY: options.offsetY == null ? -23 : options.offsetY,
|
||||
type: 'default'
|
||||
type: 'default',
|
||||
...options
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user