#1052 - fixed and improved test with tooltip component

This commit is contained in:
Vito Albano
2016-12-06 12:03:43 +00:00
parent 089507b131
commit 4ed8caf490
3 changed files with 225 additions and 24 deletions

View File

@@ -22,6 +22,7 @@ export class DiagramModel {
diagramWidth: string;
elements: DiagramElementModel[] = [];
flows: DiagramFlowElementModel[] = [];
pools: DiagramPoolElementModel[] = [];
constructor(obj?: any) {
if (obj) {
@@ -39,6 +40,11 @@ export class DiagramModel {
this.flows.push(new DiagramFlowElementModel(flow));
});
}
if (obj.pools) {
obj.pools.forEach((pool: DiagramPoolElementModel) => {
this.pools.push(new DiagramPoolElementModel(pool));
});
}
}
}
}
@@ -55,17 +61,19 @@ export class DiagramElementModel {
properties: DiagramElementPropertyModel[] = [];
dataType: string = '';
eventDefinition: DiagramEventDefinitionModel;
taskType: string = '';
constructor(obj?: any) {
if (obj) {
this.height = obj.height;
this.id = obj.id;
this.name = obj.name;
this.type = obj.type;
this.width = obj.width;
this.value = obj.value;
this.x = obj.x;
this.y = obj.y;
this.height = obj.height || '';
this.id = obj.id || '';
this.name = obj.name || '';
this.type = obj.type || '';
this.width = obj.width || '';
this.value = obj.value || '';
this.x = obj.x || '';
this.y = obj.y || '';
this.taskType = obj.taskType || '';
if (obj.properties) {
obj.properties.forEach((property: DiagramElementPropertyModel) => {
this.properties.push(new DiagramElementPropertyModel(property));
@@ -140,3 +148,51 @@ export class DiagramEventDefinitionModel {
}
}
}
export class DiagramPoolElementModel {
height: string;
id: string;
name: string;
properties: any;
lanes: DiagramLaneElementModel[] = [];
width: string;
x: number;
y: number;
constructor(obj?: any) {
if (obj) {
this.height = obj.height;
this.id = obj.id;
this.name = obj.name;
this.properties = obj.properties;
this.width = obj.width;
this.x = obj.x;
this.y = obj.y;
if (obj.lanes) {
obj.lanes.forEach((lane: DiagramLaneElementModel) => {
this.lanes.push(new DiagramLaneElementModel(lane));
});
}
}
}
}
export class DiagramLaneElementModel {
height: number;
id: string;
name: string;
width: number;
x: number;
y: number;
constructor(obj?: any) {
if (obj) {
this.height = obj.height;
this.id = obj.id;
this.name = obj.name;
this.width = obj.width;
this.x = obj.x;
this.y = obj.y;
}
}
}