mirror of
https://github.com/projectstorm/react-diagrams.git
synced 2025-08-18 03:01:33 +08:00
24 lines
433 B
TypeScript
24 lines
433 B
TypeScript
import * as SRD from "../../src/main";
|
|
import * as _ from "lodash";
|
|
|
|
export class DiamondPortModel extends SRD.PortModel{
|
|
|
|
position: string|'top'|'bottom'|'left'|'right';
|
|
|
|
constructor(pos: string = 'top'){
|
|
super(pos);
|
|
this.position = pos ;
|
|
}
|
|
|
|
serialize(){
|
|
return _.merge(super.serialize(),{
|
|
position: this.position,
|
|
});
|
|
}
|
|
|
|
deSerialize(data:any){
|
|
super.deSerialize(data);
|
|
this.position = data.position;
|
|
}
|
|
|
|
} |