Skip to content

Commit

Permalink
fix(ontology): display all classes in a property (DEV-564) (#701)
Browse files Browse the repository at this point in the history
  • Loading branch information
kilchenmann committed Apr 6, 2022
1 parent 5d4bb7c commit f90aedc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
4 changes: 3 additions & 1 deletion src/app/project/ontology/ontology.component.scss
Expand Up @@ -83,8 +83,10 @@ $width: 340px;
margin: 16px 10%;

.property {
height: 56px !important;
height: auto;
min-height: 56px !important;
margin: 4px 0;
padding: 16px 0;
&.odd {
background-color: $primary_50;
}
Expand Down
@@ -1,6 +1,6 @@
<div class="property-info" (mouseenter)="mouseEnter()" (mouseleave)="mouseLeave()">

<div mat-line class="title">
<div mat-line class="title" [class.with-line-break]="!propCard">
<span class="icon" *ngIf="propType" [matTooltip]="propType?.group + ': ' + propType?.label + ' (' + propDef.id.split('#')[1] + ')'"
matTooltipPosition="above">
<mat-icon class="type">{{propType?.icon}}</mat-icon>
Expand All @@ -19,7 +19,7 @@
</span>
</div>

<div mat-line class="info additional-info" [class.flex]="propCard">
<div mat-line class="info additional-info" [class.flex]="propCard" [class.with-line-break]="!propCard">
<span [matTooltip]="'id: ' + propDef.id" matTooltipPosition="above" class="mat-caption">
{{propDef.id | split: '#':1}}
</span>
Expand All @@ -32,7 +32,7 @@
required
</span>
<!-- in case of ontology property: display corresponding resource classes -->
<span *ngIf="!propCard">
<span *ngIf="!propCard" class="white-space">
<span *ngIf="resClasses.length; else notUsed">
Property is used in:
<!-- <span>{{ resClasses.join(", ") }}</span> -->
Expand Down
38 changes: 22 additions & 16 deletions src/app/project/ontology/property-info/property-info.component.scss
Expand Up @@ -12,27 +12,33 @@
display: flex !important;
}

.mat-line.title {
line-height: 1.8;
.mat-icon {
top: 4px;
position: relative;
.mat-line {
&.title {
line-height: 1.8;
.mat-icon {
top: 4px;
position: relative;
}
}
}

.mat-line.info {
font-size: small;
&.info {
font-size: small;

.mat-caption {
color: rgba($dark, .7);
.mat-caption {
color: rgba($dark, .7);
}

.mat-icon {
width: 12px;
height: 12px;
font-size: small;
top: 2px;
position: relative;
}
}

.mat-icon {
width: 12px;
height: 12px;
font-size: small;
top: 2px;
position: relative;
&.with-line-break {
white-space: normal;
}
}

Expand Down

0 comments on commit f90aedc

Please sign in to comment.