mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
#1052 - fixed and improved test with tooltip component
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user