Open flavens opened 6 years ago
in the resources template, osdviewer is loaded correctly, but there is still an error message:
resource.component.html
<ul>
<li *ngFor="let val of prop.value | key">
<span [ngSwitch]="val.value.getClassName()">
<read-text-value-as-html *ngSwitchCase="KnoraConstants.ReadTextValueAsHtml" [valueObject]="val.value" [ontologyInfo]="ontologyInfo" [bindEvents]="true"></read-text-value-as-html>
<read-text-value-as-string *ngSwitchCase="KnoraConstants.ReadTextValueAsString" [valueObject]="val.value"></read-text-value-as-string>
<read-text-value-as-xml *ngSwitchCase="KnoraConstants.ReadTextValueAsXml" [valueObject]="val.value"></read-text-value-as-xml>
<read-date-value *ngSwitchCase="KnoraConstants.ReadDateValue" [valueObject]="val.value" [calendar]="true" [era]="true"></read-date-value>
<read-link-value *ngSwitchCase="KnoraConstants.ReadLinkValue" [valueObject]="val.value" [ontologyInfo]="ontologyInfo"></read-link-value>
<read-integer-value *ngSwitchCase="KnoraConstants.ReadIntegerValue" [valueObject]="val.value"></read-integer-value>
<read-decimal-value *ngSwitchCase="KnoraConstants.ReadDecimalValue" [valueObject]="val.value"></read-decimal-value>
<read-geom-value *ngSwitchCase="KnoraConstants.ReadGeomValue" [valueObject]="val.value"></read-geom-value>
<read-color-value *ngSwitchCase="KnoraConstants.ReadColorValue" [valueObject]="val.value"></read-color-value>
<read-uri-value *ngSwitchCase="KnoraConstants.ReadUriValue" [valueObject]="val.value"></read-uri-value>
<read-boolean-value *ngSwitchCase="KnoraConstants.ReadBooleanValue" [valueObject]="val.value"></read-boolean-value>
<read-interval-value *ngSwitchCase="KnoraConstants.ReadIntervalValue" [valueObject]="val.value"></read-interval-value>
<read-list-value *ngSwitchCase="KnoraConstants.ReadListValue" [valueObject]="val.value"></read-list-value>
<read-textfile-value *ngSwitchCase="KnoraConstants.TextFileValue" [valueObject]="val.value"></read-textfile-value>
<span *ngSwitchDefault="">Not supported {{val.value.getClassName()}}</span>
</span>
</li>
</ul>
</div>
<!-- Check for incoming images -->
<kui-still-image #OSDViewer
class="osd-viewer"
*ngIf="resource?.incomingStillImageRepresentations?.length > 0;"
(getImages)="changeOffsetForStillImageRepresentations($event)"
[images]="resource?.stillImageRepresentationsToDisplay"
[imageRangeStart]="0"
[imageRangeEnd]="4"
[imageChangeInterval]="5">
</kui-still-image>
This is because osdviewer is not part of the switch case statement.
there are two cases:
In either case, it is sufficient to display resource?.stillImageRepresentationsToDisplay
since this collection will contain all relevant images (collectImagesAndRegionsForResource
).