Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
</div>
</div>
<div class="entities">
<div class="none" *ngIf="!entities || entities.length === 0">
<div class="none" *ngIf="!entitiesLoaded">
Loading entities...
</div>
<div class="none" *ngIf="entitiesLoaded && entities.length === 0">
You don't have any entities yet. Click the Wrench Icon to get started.
</div>
<svg #svgRoot *ngIf="entities" xmlns="http://www.w3.org/2000/svg">
<svg #svgRoot *ngIf="entitiesLoaded && entities" xmlns="http://www.w3.org/2000/svg">
<g class="nodes" [attr.transform]="mainTransform">
<g #entityDef *ngFor="let entity of entities"
class="entity-def"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class EntityModelerComponent implements AfterViewChecked {
private svgRect: Rect;

public entities: Array<Entity>;
private entitiesLoaded: boolean = false;
private connections: Array<Connection> = [];
private entityMap: Map<string, Entity> = new Map<string, Entity>();
private draggingEntity: Entity;
Expand Down Expand Up @@ -139,6 +140,7 @@ export class EntityModelerComponent implements AfterViewChecked {

getEntities(): void {
this.entitiesService.entitiesChange.subscribe(entities => {
this.entitiesLoaded = true;
this.entities = entities;
this.entities.forEach((entity: Entity) => {
this.entityMap.set(entity.name, entity);
Expand Down