From 32cf647efb7da77b7060d58cca92a4fbd4bc23e3 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Tue, 22 Jun 2021 14:35:11 +0200 Subject: [PATCH 01/33] Add image-image component --- .../image-image/image-image.component.html | 1 + .../image-image/image-image.component.scss | 0 .../image-image/image-image.component.spec.ts | 25 +++++++++++++++++++ .../image-image/image-image.component.ts | 15 +++++++++++ 4 files changed, 41 insertions(+) create mode 100644 src/app/view-modes/image-image/image-image.component.html create mode 100644 src/app/view-modes/image-image/image-image.component.scss create mode 100644 src/app/view-modes/image-image/image-image.component.spec.ts create mode 100644 src/app/view-modes/image-image/image-image.component.ts diff --git a/src/app/view-modes/image-image/image-image.component.html b/src/app/view-modes/image-image/image-image.component.html new file mode 100644 index 000000000..c5ba3d946 --- /dev/null +++ b/src/app/view-modes/image-image/image-image.component.html @@ -0,0 +1 @@ +

image-image works!

diff --git a/src/app/view-modes/image-image/image-image.component.scss b/src/app/view-modes/image-image/image-image.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/view-modes/image-image/image-image.component.spec.ts b/src/app/view-modes/image-image/image-image.component.spec.ts new file mode 100644 index 000000000..e32a9e02b --- /dev/null +++ b/src/app/view-modes/image-image/image-image.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ImageImageComponent } from './image-image.component'; + +describe('ImageImageComponent', () => { + let component: ImageImageComponent; + let fixture: ComponentFixture; + + beforeEach(async() => { + await TestBed.configureTestingModule({ + declarations: [ ImageImageComponent ], + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ImageImageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/view-modes/image-image/image-image.component.ts b/src/app/view-modes/image-image/image-image.component.ts new file mode 100644 index 000000000..5a620df1d --- /dev/null +++ b/src/app/view-modes/image-image/image-image.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'evt-image-image', + templateUrl: './image-image.component.html', + styleUrls: ['./image-image.component.scss'] +}) +export class ImageImageComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} From 4e961af4288f74588d9b31999a28d7abe3aedea5 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Tue, 22 Jun 2021 14:35:33 +0200 Subject: [PATCH 02/33] Add image-image-component in app.module --- src/app/app.module.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 9959dcaf8..d974eb318 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -114,6 +114,7 @@ import { XMLParsers } from './services/xml-parsers/xml-parsers'; import { ShortcutsComponent } from './shortcuts/shortcuts.component'; import { MsDescSectionComponent } from './ui-components/ms-desc-section/ms-desc-section.component'; import { CollationComponent } from './view-modes/collation/collation.component'; +import { ImageImageComponent } from './view-modes/image-image/image-image.component'; import { ImageTextComponent } from './view-modes/image-text/image-text.component'; import { ReadingTextComponent } from './view-modes/reading-text/reading-text.component'; import { TextSourcesComponent } from './view-modes/text-sources/text-sources.component'; @@ -161,6 +162,7 @@ export function initializeApp(appConfig: AppConfig) { HtmlAttributesDirective, HumanizePipe, IdentifierComponent, + ImageImageComponent, ImagePanelComponent, ImageTextComponent, LbComponent, From ad2f657432ed571ba00a445eea744a505d868f74 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Tue, 22 Jun 2021 23:05:00 +0200 Subject: [PATCH 03/33] Update image-image template --- .../view-modes/image-image/image-image.component.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/view-modes/image-image/image-image.component.html b/src/app/view-modes/image-image/image-image.component.html index c5ba3d946..5c5b7f6bf 100644 --- a/src/app/view-modes/image-image/image-image.component.html +++ b/src/app/view-modes/image-image/image-image.component.html @@ -1 +1,8 @@ -

image-image works!

+ + + + + + + + \ No newline at end of file From 4cd43fd2714ccb806a93c750482e75aea8ff1839 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Wed, 23 Jun 2021 16:49:19 +0200 Subject: [PATCH 04/33] Add image-image component in app-routing-module --- src/app/app-routing.module.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 7a2ed2473..738e9f405 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,6 +1,7 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { CollationComponent } from './view-modes/collation/collation.component'; +import { ImageImageComponent } from './view-modes/image-image/image-image.component'; import { ImageTextComponent } from './view-modes/image-text/image-text.component'; import { ReadingTextComponent } from './view-modes/reading-text/reading-text.component'; import { TextSourcesComponent } from './view-modes/text-sources/text-sources.component'; @@ -11,6 +12,7 @@ const appRoutes: Routes = [ { path: 'imageText', component: ImageTextComponent }, { path: 'readingText', component: ReadingTextComponent }, { path: 'textText', component: TextTextComponent }, + { path: 'imageImage', component: ImageImageComponent }, { path: 'collation', component: CollationComponent }, { path: 'textSources', component: TextSourcesComponent }, { path: 'textVersions', component: TextVersionsComponent }, From fdfa59b1bc60f3253e05a1024be0cf8ac567630f Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Wed, 23 Jun 2021 16:51:28 +0200 Subject: [PATCH 05/33] Add image-image icon in edition_config --- src/assets/config/edition_config.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/assets/config/edition_config.json b/src/assets/config/edition_config.json index a2c863fcf..baa762ff0 100644 --- a/src/assets/config/edition_config.json +++ b/src/assets/config/edition_config.json @@ -108,6 +108,12 @@ "id": "textText", "label": "Text Text" }, + { + "icon": "imgImg", + "iconSet": "evt", + "id": "imageImage", + "label": "Image Image" + }, { "icon": "collation", "iconSet": "evt", From 532a65968197343cd2b49c9aaaace37e34333761 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Wed, 23 Jun 2021 17:22:44 +0200 Subject: [PATCH 06/33] Update image-panel template --- .../image-panel/image-panel.component.html | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/app/panels/image-panel/image-panel.component.html b/src/app/panels/image-panel/image-panel.component.html index 6b192a5f7..a0ecd92b9 100644 --- a/src/app/panels/image-panel/image-panel.component.html +++ b/src/app/panels/image-panel/image-panel.component.html @@ -1,14 +1,25 @@ - +
- + + + {{ item.label }} + +
+ [page]="imageIndex" + (pageChange)="eventPageImg($event)"

Found no source file

From 1f226656d4b359c629107c8223a35aa10ad76eab Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Wed, 23 Jun 2021 18:46:54 +0200 Subject: [PATCH 07/33] Update image-panel component --- .../image-panel/image-panel.component.html | 6 +- .../image-panel/image-panel.component.ts | 64 ++++++++++++++----- 2 files changed, 51 insertions(+), 19 deletions(-) diff --git a/src/app/panels/image-panel/image-panel.component.html b/src/app/panels/image-panel/image-panel.component.html index a0ecd92b9..93688eb26 100644 --- a/src/app/panels/image-panel/image-panel.component.html +++ b/src/app/panels/image-panel/image-panel.component.html @@ -12,7 +12,7 @@ {{ item.label }} - +
-
- +
+
diff --git a/src/app/panels/image-panel/image-panel.component.ts b/src/app/panels/image-panel/image-panel.component.ts index 7e4b84b88..5e2d176c3 100644 --- a/src/app/panels/image-panel/image-panel.component.ts +++ b/src/app/panels/image-panel/image-panel.component.ts @@ -1,6 +1,5 @@ -import { Component, Input } from '@angular/core'; -import { BehaviorSubject, combineLatest } from 'rxjs'; -import { filter, map } from 'rxjs/operators'; +import { HttpClient } from '@angular/common/http'; +import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; import { ViewerDataType } from '../../models/evt-models'; import { EVTModelService } from '../../services/evt-model.service'; @@ -9,27 +8,60 @@ import { EVTModelService } from '../../services/evt-model.service'; templateUrl: './image-panel.component.html', styleUrls: ['./image-panel.component.scss'], }) -export class ImagePanelComponent { +export class ImagePanelComponent implements OnInit{ @Input() viewerData: ViewerDataType; - currentMsDescId$ = new BehaviorSubject(undefined); - currentMsDesc$ = combineLatest([this.evtModelService.msDesc$, this.currentMsDescId$]).pipe( - filter(([msDesc, currentId]) => !!msDesc && !!currentId), - map(([msDesc, currentId]) => msDesc.find(m => m.id === currentId)), - ); - - msDescOpen = false; + get imageIndex() { return this._imageIndex; } constructor( - private evtModelService: EVTModelService, + public evtModelService: EVTModelService, + public http: HttpClient, + private cdref: ChangeDetectorRef, ) { } + public msDesc$ = this.evtModelService.msDesc$; + public showSecondaryContent = false; + public selectedPage; + public msDescID = ''; + public value: number; + public images = []; + public currentImg: string; + // tslint:disable-next-line: variable-name + private _imageIndex: number; + public manifest; + + toggleImg(event){ + this._imageIndex = this.images.indexOf(event); + } + + eventPageImg(pageImg: number){ + this.currentImg = this.images[pageImg - 1].label; + this.cdref.detectChanges(); + } - setMsDescOpen(isOpen: boolean) { - this.msDescOpen = isOpen; + ngOnInit() { + if (this.viewerData.type === 'manifest'){ + this.manifest = this.viewerData.value?.manifestURL; + // tslint:disable-next-line: no-any + this.http.get(`${this.manifest}`).subscribe((item: any) => { + item.sequences.forEach((value) => { + this.images.push(...value.canvases); + }); + this.currentImg = this.images[0].label; + }); + } } - setMsDescID(msDescId: string) { - this.currentMsDescId$.next(msDescId); + isSecondaryContentOpened(): boolean { + return this.showSecondaryContent; } + + isMsDescOpen(event: boolean){ + this.showSecondaryContent = event; + } + + setMsDescID(idMsDesc: string){ + this.msDescID = idMsDesc; + } + } From 729200e0d47bf85ad5305124823614c565ece586 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Thu, 24 Jun 2021 10:14:40 +0200 Subject: [PATCH 08/33] Update image-image component --- .../image-image/image-image.component.ts | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/app/view-modes/image-image/image-image.component.ts b/src/app/view-modes/image-image/image-image.component.ts index 5a620df1d..018b0e9ec 100644 --- a/src/app/view-modes/image-image/image-image.component.ts +++ b/src/app/view-modes/image-image/image-image.component.ts @@ -1,15 +1,35 @@ import { Component, OnInit } from '@angular/core'; +import { DisplayGrid, GridsterConfig, GridsterItem, GridType } from 'angular-gridster2'; @Component({ selector: 'evt-image-image', templateUrl: './image-image.component.html', - styleUrls: ['./image-image.component.scss'] + styleUrls: ['./image-image.component.scss'], }) export class ImageImageComponent implements OnInit { + public layoutOptions: GridsterConfig = {}; + public imagePanel1Item: GridsterItem = { cols: 1, rows: 1, y: 0, x: 0 }; + public imagePanel2Item: GridsterItem = { cols: 1, rows: 1, y: 0, x: 1 }; - constructor() { } - - ngOnInit(): void { + ngOnInit() { + this.initGridster(); } + private initGridster() { + this.layoutOptions = { + gridType: GridType.Fit, + displayGrid: DisplayGrid.None, + margin: 0, + maxCols: 2, + maxRows: 1, + draggable: { + enabled: true, + ignoreContent: true, + dragHandleClass: 'panel-header', + }, + resizable: { + enabled: false, + }, + }; + } } From 240847e1940aad22be087fbfd73c2dc351b6a3f5 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Fri, 25 Jun 2021 17:55:40 +0200 Subject: [PATCH 09/33] Update osd component --- src/app/components/osd/osd.component.ts | 33 +++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/app/components/osd/osd.component.ts b/src/app/components/osd/osd.component.ts index f8c0d82ce..f3a99e8e9 100644 --- a/src/app/components/osd/osd.component.ts +++ b/src/app/components/osd/osd.component.ts @@ -1,4 +1,4 @@ -import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnDestroy, Output, ViewChild } from '@angular/core'; +import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; @@ -66,12 +66,34 @@ To: } */ +const outputArray = []; +let cont = 0; + +function manifestResourcetoTileSource(manifestResource) { + outputArray.push({ + n: cont, + id: manifestResource.service['@id'], + context: manifestResource.service['@context'], + }); + + cont = cont + 1; + + return { + '@context': manifestResource.service['@context'], + '@id': manifestResource.service['@id'], + profile: [manifestResource.service['@profile']], + protocol: 'http://iiif.io/api/image', + height: manifestResource.height, + width: manifestResource.width, + }; +} + @Component({ selector: 'evt-osd', templateUrl: './osd.component.html', styleUrls: ['./osd.component.scss'], }) -export class OsdComponent implements AfterViewInit, OnDestroy { +export class OsdComponent implements AfterViewInit, OnDestroy, OnInit { @ViewChild('osd', { read: ElementRef, static: true }) div: ElementRef; @@ -108,6 +130,9 @@ export class OsdComponent implements AfterViewInit, OnDestroy { @Output() pageChange = new EventEmitter(); + // tslint:disable-next-line: no-any + @Output() data: EventEmitter = new EventEmitter(); + @Input() text: string; viewer: Partial; @@ -174,4 +199,8 @@ export class OsdComponent implements AfterViewInit, OnDestroy { ngOnDestroy(): void { this.subscriptions.forEach((s) => s.unsubscribe()); } + + ngOnInit() { + this.data.emit(outputArray); + } } From 2be71e3cf6116073def8ba113bf9fc930ff358b2 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Fri, 25 Jun 2021 17:55:53 +0200 Subject: [PATCH 10/33] Update image-panel template --- .../image-panel/image-panel.component.html | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/app/panels/image-panel/image-panel.component.html b/src/app/panels/image-panel/image-panel.component.html index 93688eb26..9d4a19cfb 100644 --- a/src/app/panels/image-panel/image-panel.component.html +++ b/src/app/panels/image-panel/image-panel.component.html @@ -1,18 +1,18 @@
- - - {{ item.label }} - - - + + + {{ item.label }} + + +

Found no source file

-
-
- +
+
+ +
From 0954320f5d192bc5da406910bc76d55f3c2ed9fb Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Fri, 25 Jun 2021 17:56:21 +0200 Subject: [PATCH 11/33] Update image-panel component --- src/app/panels/image-panel/image-panel.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/panels/image-panel/image-panel.component.ts b/src/app/panels/image-panel/image-panel.component.ts index 5e2d176c3..81bc0887f 100644 --- a/src/app/panels/image-panel/image-panel.component.ts +++ b/src/app/panels/image-panel/image-panel.component.ts @@ -64,4 +64,4 @@ export class ImagePanelComponent implements OnInit{ this.msDescID = idMsDesc; } -} +} \ No newline at end of file From e079d3a6b059cb19fd701c49f9a3c22febf1dca0 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Fri, 25 Jun 2021 18:58:15 +0200 Subject: [PATCH 12/33] Update image-panel template --- src/app/panels/image-panel/image-panel.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/panels/image-panel/image-panel.component.ts b/src/app/panels/image-panel/image-panel.component.ts index 81bc0887f..5e2d176c3 100644 --- a/src/app/panels/image-panel/image-panel.component.ts +++ b/src/app/panels/image-panel/image-panel.component.ts @@ -64,4 +64,4 @@ export class ImagePanelComponent implements OnInit{ this.msDescID = idMsDesc; } -} \ No newline at end of file +} From c758c7de78725b8cbb8d187fb0b1dc49e51f208d Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Mon, 28 Jun 2021 12:15:30 +0200 Subject: [PATCH 13/33] Update osd component --- src/app/components/osd/osd.component.ts | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/app/components/osd/osd.component.ts b/src/app/components/osd/osd.component.ts index f3a99e8e9..a371c58a8 100644 --- a/src/app/components/osd/osd.component.ts +++ b/src/app/components/osd/osd.component.ts @@ -1,4 +1,4 @@ -import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core'; +import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnDestroy, Output, ViewChild } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; @@ -66,17 +66,7 @@ To: } */ -const outputArray = []; -let cont = 0; - function manifestResourcetoTileSource(manifestResource) { - outputArray.push({ - n: cont, - id: manifestResource.service['@id'], - context: manifestResource.service['@context'], - }); - - cont = cont + 1; return { '@context': manifestResource.service['@context'], @@ -93,7 +83,7 @@ function manifestResourcetoTileSource(manifestResource) { templateUrl: './osd.component.html', styleUrls: ['./osd.component.scss'], }) -export class OsdComponent implements AfterViewInit, OnDestroy, OnInit { +export class OsdComponent implements AfterViewInit, OnDestroy { @ViewChild('osd', { read: ElementRef, static: true }) div: ElementRef; @@ -121,7 +111,7 @@ export class OsdComponent implements AfterViewInit, OnDestroy, OnInit { private _page: number; @Input() set page(v: number) { if (v !== this._page) { - this._page = v; + this._page = v + 1; this.pageChange.next(this._page); } } @@ -192,6 +182,8 @@ export class OsdComponent implements AfterViewInit, OnDestroy, OnInit { this.viewer.addHandler('page', ({ page }) => { this.pageChange.next(page + 1); + this._page = page; + this.data.emit(page); }); })); } @@ -200,7 +192,4 @@ export class OsdComponent implements AfterViewInit, OnDestroy, OnInit { this.subscriptions.forEach((s) => s.unsubscribe()); } - ngOnInit() { - this.data.emit(outputArray); - } } From cc4d66341295cd90bd735d38f23184ea622501e0 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Thu, 1 Jul 2021 18:04:42 +0200 Subject: [PATCH 14/33] Add imgImg icon in icon style component --- src/app/ui-components/icon/icon.component.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/ui-components/icon/icon.component.scss b/src/app/ui-components/icon/icon.component.scss index 26ecc8583..a7e0b6bbc 100644 --- a/src/app/ui-components/icon/icon.component.scss +++ b/src/app/ui-components/icon/icon.component.scss @@ -78,6 +78,10 @@ content: "\e91c"; } +.evt-icon-imgImg:before { + content: "\e92b"; +} + .evt-icon-txt:before { content: "\e92e"; } From 7914c1a3f026014a4afc23ba384c656cce176d50 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Thu, 1 Jul 2021 18:06:48 +0200 Subject: [PATCH 15/33] Update fonts in assets --- src/assets/fonts/evt-icons.eot | Bin 11060 -> 12316 bytes src/assets/fonts/evt-icons.svg | 5 +++++ src/assets/fonts/evt-icons.ttf | Bin 10888 -> 12144 bytes src/assets/fonts/evt-icons.woff | Bin 10964 -> 12220 bytes 4 files changed, 5 insertions(+) diff --git a/src/assets/fonts/evt-icons.eot b/src/assets/fonts/evt-icons.eot index 60a39e2f56e3051c0daf5fe8e7c9dfa1b1f9b005..ce50c997c6e6abe1cda2f574734e74e4e1d3fb3c 100755 GIT binary patch delta 1660 zcmai!YiJx*6vxk*J2RWj&SPh0cW1LrH~X61me|yNOB<7l+M32k>?2m%(1cj~ATfai zX=&}IC{Lh&) zdpW-|_xt`&2j$ks0mj!(%O&x=d2(WUL!~kR06)?i93CASUp#ib2>@G3@7g;wF;3P` z`XJe+y(5QSe{1;T3#6w2R-fIsXXv$+&YK9({siSq`zYX95SvN!y41eW$%8huZX$h( zYEmO(!$X^c+gyOh&Qku==+MD&=Kvt(BozIW-*)8 zFc=8sv+*u07ShSAb62GDU}!m#kQ+sIez{8cS1}M{se;fJ_GnFVZPsfvg=5*26g5?! zA#|DwJ!nDekOdn#!+C(G8W&>pn4> zOG>vdhEt3&6d6l}St^wmFshh5`6yEZ!BVvV256gUxQ*>Ibv2tkh=>c%eY#tfztI@;w@A%nvxd-Rty?OpMsLb^8V z6pIc)QB1<18ib_bElD$$F1UYmwYq;BVWGvSpz04ue=*GrYCnDAe$L5oB7TM4jRe1P zZyrY7-RUJ1Qb<3*B*A+?Xli+(WoutFuzkINT$M3J#;TR zWA2|%RS=u~qNOIXnxN@^KjPF99D=1mezHOz`fr>*02U2>uEa+^AsdhI3(#9E_C9Q}4a;%2_kO3k5PYQ~g13H)U1o2C z3Sr1Vj;1EQge~6qSBFro#~gjHnX*RXBzx?x##ABFm+bKhM2>a2mwA7%O*M?#x+9t% zSde{US3bSir^ZY+MN)i?$hosxES9NvUW5>&O*=g*^56|1gPj3{` zEN;Y^Z_=IJvA*AZhU}~B`h{(`&!x-dG~1X?k#Prb7CTQLdU*^_AKEf5B+E2>nNleu z45Z7ojl#g39r7Bj6DQ5{yYV-29-w(eiR# zjjcNOV)Jp|0pE=8ypm9MDQA>RYKMAUy{&E5X0&ViD!orXqhIo`^ItbwjT6Q#v%`Gf hylOpXy<=SsYzbU!yt4HKzXwapaAt#CfFV$iVF3e!MhZ|sAulmEHIps% z1(4qY)bO|w4xU}pX?Ift>@(gVojW8h$5VqjxnWKeji`cm_y>;J$1 z|AW*5`3yk5E||~w|FJlWIHTAVZREk|trfcK!bMgE(Um3Vr zz&dYEKYk3v0MU~LP1YZah0gVD$%HYB + + + + + diff --git a/src/assets/fonts/evt-icons.ttf b/src/assets/fonts/evt-icons.ttf index 04361acb1cb3b150551f7484d12fbc53e9cdde7d..c90314d757dfb1bb0b5fc3ec1d200b1af2906ad6 100755 GIT binary patch delta 1632 zcmai!ZERCz6vxlG&%N!s-k09nm)n)mb!~5pnGDnWBx)Ky89pnC2__JfFiZ#`F)@VRdY*11<1IFMo^$@^ zJm=oq^E>yxJ8<)r0w4gmp$H6~*w()xtr?CXiu_1xcywZ9YU$|pIsj}Wy?fut^b}bS z=~=RM`^FEx_SWd97f2TY9y>F(cjVQz)|+(2mM1Bn8>4{poLEnq*Tu&sW@b%j+)DZ+ z)x^gqM>mi3_;=UBt)+6MOeN_Ff}BP6bz{CZ}iULFu=l zkLQ808*}ADsZAtgr~?5+`ahASmZfK_m1>oubZ7~d*4GqPub86A=mL0p2EXzaBq&zP zY>t(o7lvRGj>5-umvo>B{cY)h>DPS@r;5&4b2O1`#jKvmbzxgJljF&?4|=@p-YlkK zD*Anawp4Q`W;2Oc%32jEJQ!MuL>;vvvu&kH_*d2uBk_#T6m+U}j>@7-uM0*}aVcyl zZe8dwWIE8neI&CiWZTJPkD&SOPu*?w|9j~Gogs!6fm|j* zP787@1>$0QrF#e^Q!(rQ?n`K*M1$aWIs#qTiCvh)L{vjFpUWh16dg`&o2tGiev(O4 z7Oia7A}F#!7!;k5)VyVBL=qYM&(22srXCa;^a3g#pY%6V4Zr%+XZ9DI3@74|*=i*C zwSDUlYW6M{p^yUF0VWBq143QH3l05+{!pms(j02ND7J|6_Kid)YcY?NB}j(MQ9X3e zT9fu)n+u5b9?`2rQ>vh99uH!184kfxyuvD4Pw^*E%Pv7;`?Y`+M<%%T<3dBjz>$Ga zPYC!sSuGu90+C~#_GR85Y*KW+(tcRg zeCHf)G4y_4gV!Z8=bReRVq4eP7nnTQv@2>Gg#CwbIHxOpyiCz&4r`VutvP-x)E(C% zYRSn&mp6p#vA8EHhV7^AUva5Lu;UkzB6WX-ppIIy;S!2x|n;$ zUfj8H(0+#O%k6{0jyq=)`Fw(H;k!MAi`X%L@Wn}-Ke&BLh~;V6lDS+`7)sQjlamV{L4@FcUms4OEbx{Tk4Ow z54acH=jEupTRtUUQd*T`${n>wT~M!S>$E=Yly=F}?zyfv>c{olMyqkcxaxh*`;Paj SZ@cee?V8>2-RbdljlzGEaXrTX delta 386 zcmewm*AZIJz{tSBz|GLWz|3IaAFOZ0FT|D(6xjpB3CX#M1q^HU7&9<1$^iK(>50V! zKw1FEZvfI9={c2YORB2kf&2~z29+lnsfj6Kepdt;7}Ror@@5%80ro>ItU&$}AYUaT zx1@rNL3$sMe*&mSASXZBF;PO6ZyN)H`VF9huH3|m0){|_1q=)tDL}qLUSe))CR^$Y zAio8u;c-EJaS70&K%kWYl4oFM{xR`DwWSA;!^gnEz{J1?^pCwhQ!1WcIvs)VtB?$&OPV+ z@4a*Hp5L9j=eC~i55K&jvl9^LdH6K=T|Wj`{ox_=#L94`Z*XK_3;>6zV+XhSBUkHo z4eaCEkCfLfSzy=R122&F6Tr%ExVm7H4E&KP}wyF6D98df}@V2S$cSqebx& zx80thD`TVk#_9Kb_}@525o6b?G9JvWrC6qo3n0?(j?XvGKe13-SRj?&IuG+LZiWk& zEYV`X0B2_LQ?nw$#KJ5)!DgWc`d}1}z}vK3KHP+%wtUzM=|PWIMQ7z&2la)}Ns7BZ=veVbCbS6Wh%9(R(}wlqulN7fPJ>4MM{ z@v3#6+O$uvi^OwjDP|~sU1&FC8qm&TB)6Ezj+e;+LlNrz)Yfje2~Km#*~ycNg8g#9 zl$~kWFyvpDtmz7y)%;>CpOS9QMbeBh6d6lLSUTM%U`#f6=Yw1g1XEFi7^G&(4c+D= zUV`zm-1djYTYvDJd=BywkI8fuzwqim2{=T zrz!gQA!)Xjr-m(&h~5Ve}kWI0pK?l`Tmx#&SlEj zRSjl84^8l1BqRSTnUCky+3czH^~d~s{8Rq3a#G$QpOh~st;#XwrrNDesaLcW+D7f9 wb|J7Ta8+;AkLx##R^v_MviYQW)Vv(r6r6M4*#%$H?aUv6{|C+dyaI)P0iv=b%7 delta 430 zcmdlJeory#U|@H zVvyJwAfE$@1=4dW(|}@E7#LKZfbf#4s`!l5M4%qE9Y8f^AS~v0MKA*>2o(DO)60&^TauX|n7Hez(@)f{1kYPby zVs0u>>;h2ZV-U_{OMOw0Ut9w8&lb2kW+021`Nw1)#%fCsAe#^9a3%&epuZJfs=m~G z>H7cg|NlU7pt&y@fP7srpYi`=aTak#v40HAK$Q%ecQ7s$p3Ey5vbj}?T~MZL Date: Sat, 25 Sep 2021 14:47:07 +0200 Subject: [PATCH 16/33] Add msDesc selector in image panel template --- src/app/panels/image-panel/image-panel.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/panels/image-panel/image-panel.component.html b/src/app/panels/image-panel/image-panel.component.html index 9d4a19cfb..75bbf5953 100644 --- a/src/app/panels/image-panel/image-panel.component.html +++ b/src/app/panels/image-panel/image-panel.component.html @@ -24,7 +24,7 @@

Found no source file

-
+
From d71f0434ba26e163b75c10588365d85cad37e747 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Wed, 5 Jan 2022 19:44:28 +0100 Subject: [PATCH 17/33] Update image-image component --- .../image-image/image-image.component.ts | 29 +++---------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/app/view-modes/image-image/image-image.component.ts b/src/app/view-modes/image-image/image-image.component.ts index 018b0e9ec..1d9e287a1 100644 --- a/src/app/view-modes/image-image/image-image.component.ts +++ b/src/app/view-modes/image-image/image-image.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component } from '@angular/core'; import { DisplayGrid, GridsterConfig, GridsterItem, GridType } from 'angular-gridster2'; @Component({ @@ -6,30 +6,9 @@ import { DisplayGrid, GridsterConfig, GridsterItem, GridType } from 'angular-gri templateUrl: './image-image.component.html', styleUrls: ['./image-image.component.scss'], }) -export class ImageImageComponent implements OnInit { - public layoutOptions: GridsterConfig = {}; +export class ImageImageComponent { + // tslint:disable-next-line: max-line-length + public layoutOptions: GridsterConfig = { gridType: GridType.Fit, displayGrid: DisplayGrid.None, margin: 0, maxCols: 2, maxRows: 1, draggable: { enabled: true, ignoreContent: true, dragHandleClass: 'panel-header'}, resizable: { enabled: false }}; public imagePanel1Item: GridsterItem = { cols: 1, rows: 1, y: 0, x: 0 }; public imagePanel2Item: GridsterItem = { cols: 1, rows: 1, y: 0, x: 1 }; - - ngOnInit() { - this.initGridster(); - } - - private initGridster() { - this.layoutOptions = { - gridType: GridType.Fit, - displayGrid: DisplayGrid.None, - margin: 0, - maxCols: 2, - maxRows: 1, - draggable: { - enabled: true, - ignoreContent: true, - dragHandleClass: 'panel-header', - }, - resizable: { - enabled: false, - }, - }; - } } From 068157bddf5e5f0f9bde9291b5c9cdbbb64f0537 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Wed, 5 Jan 2022 19:50:32 +0100 Subject: [PATCH 18/33] Update osd component --- src/app/components/osd/osd.component.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app/components/osd/osd.component.ts b/src/app/components/osd/osd.component.ts index a371c58a8..5b1c9a05b 100644 --- a/src/app/components/osd/osd.component.ts +++ b/src/app/components/osd/osd.component.ts @@ -111,8 +111,8 @@ export class OsdComponent implements AfterViewInit, OnDestroy { private _page: number; @Input() set page(v: number) { if (v !== this._page) { - this._page = v + 1; - this.pageChange.next(this._page); + this._page = v; + this.pageChange.next(this._page + 1); } } @@ -120,8 +120,7 @@ export class OsdComponent implements AfterViewInit, OnDestroy { @Output() pageChange = new EventEmitter(); - // tslint:disable-next-line: no-any - @Output() data: EventEmitter = new EventEmitter(); + @Output() pageImg = new EventEmitter(); @Input() text: string; @@ -183,7 +182,7 @@ export class OsdComponent implements AfterViewInit, OnDestroy { this.viewer.addHandler('page', ({ page }) => { this.pageChange.next(page + 1); this._page = page; - this.data.emit(page); + this.pageImg.emit(page); }); })); } From ed7f86f313bfc418c93d9ec77113288120a27e67 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Wed, 5 Jan 2022 19:51:06 +0100 Subject: [PATCH 19/33] Update image-panel template --- src/app/panels/image-panel/image-panel.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/panels/image-panel/image-panel.component.html b/src/app/panels/image-panel/image-panel.component.html index 75bbf5953..9d4a19cfb 100644 --- a/src/app/panels/image-panel/image-panel.component.html +++ b/src/app/panels/image-panel/image-panel.component.html @@ -24,7 +24,7 @@

Found no source file

-
+
From 2b0bd39176ced35c940ec4bbf9930c74a2ce6b0b Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Thu, 13 Jan 2022 22:13:38 +0100 Subject: [PATCH 20/33] Add width in ng-select --- src/styles.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/styles.scss b/src/styles.scss index 02b317f3e..a463e5f4f 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -58,6 +58,7 @@ body { font-size: 0.875rem; line-height: 1.5; border-radius: 0.2rem; + width: 10rem; .ng-select-container .ng-value-container .ng-placeholder { top: 0 !important; From 6acd64e6da49f90cd61d53b18f9d9bf8deb7decd Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Tue, 25 Jan 2022 10:01:18 +0100 Subject: [PATCH 21/33] Add width to the image selector --- src/styles.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/styles.scss b/src/styles.scss index a463e5f4f..bc16a76f4 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -58,7 +58,6 @@ body { font-size: 0.875rem; line-height: 1.5; border-radius: 0.2rem; - width: 10rem; .ng-select-container .ng-value-container .ng-placeholder { top: 0 !important; @@ -153,6 +152,10 @@ body { } } +.imgSelect { + width: 10rem; +} + .overflow-y-auto { overflow-y: auto; } From b9db170b878ca82bbba6857f512f56e89897e236 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Tue, 25 Jan 2022 10:01:47 +0100 Subject: [PATCH 22/33] Delete pageImg output from osd component --- src/app/components/osd/osd.component.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/app/components/osd/osd.component.ts b/src/app/components/osd/osd.component.ts index 5b1c9a05b..f77546841 100644 --- a/src/app/components/osd/osd.component.ts +++ b/src/app/components/osd/osd.component.ts @@ -120,8 +120,6 @@ export class OsdComponent implements AfterViewInit, OnDestroy { @Output() pageChange = new EventEmitter(); - @Output() pageImg = new EventEmitter(); - @Input() text: string; viewer: Partial; @@ -181,8 +179,6 @@ export class OsdComponent implements AfterViewInit, OnDestroy { this.viewer.addHandler('page', ({ page }) => { this.pageChange.next(page + 1); - this._page = page; - this.pageImg.emit(page); }); })); } From 8aeff48be2e264fa41955aef7d9bd3df84b535c0 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Wed, 26 Jan 2022 10:19:54 +0100 Subject: [PATCH 23/33] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77bf53a1a..35b684186 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Sampling declaration visualization - Project description visualization - Encoding description visualization +- Image-image visualization - Critical edition navigation - Project Info modal - Notes statement visualization From 9553d1f610d4a6cd9c0dfcacce6e8815410b1db6 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Mon, 30 May 2022 19:50:01 +0200 Subject: [PATCH 24/33] Delete manifestResourcetoTileSource function --- src/app/components/osd/osd.component.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/app/components/osd/osd.component.ts b/src/app/components/osd/osd.component.ts index f77546841..970a69aca 100644 --- a/src/app/components/osd/osd.component.ts +++ b/src/app/components/osd/osd.component.ts @@ -66,18 +66,6 @@ To: } */ -function manifestResourcetoTileSource(manifestResource) { - - return { - '@context': manifestResource.service['@context'], - '@id': manifestResource.service['@id'], - profile: [manifestResource.service['@profile']], - protocol: 'http://iiif.io/api/image', - height: manifestResource.height, - width: manifestResource.width, - }; -} - @Component({ selector: 'evt-osd', templateUrl: './osd.component.html', From 48ef7d032372b5c0864df14589cf83bbb23c3826 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Tue, 31 May 2022 13:24:36 +0200 Subject: [PATCH 25/33] Update image-panel component template --- src/app/panels/image-panel/image-panel.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/panels/image-panel/image-panel.component.html b/src/app/panels/image-panel/image-panel.component.html index 9d4a19cfb..a11c9fc80 100644 --- a/src/app/panels/image-panel/image-panel.component.html +++ b/src/app/panels/image-panel/image-panel.component.html @@ -17,9 +17,9 @@
+ [viewerData]="viewerData" [page]="imageIndex" - (pageChange)="eventPageImg($event)" + (pageChange)="eventPageImg($event)">

Found no source file

From 3f619237156db2b8d66baef5d0dc94033bde50f7 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Tue, 31 May 2022 13:25:00 +0200 Subject: [PATCH 26/33] Add comma in image-panel component --- src/app/panels/image-panel/image-panel.component.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/panels/image-panel/image-panel.component.spec.ts b/src/app/panels/image-panel/image-panel.component.spec.ts index 4499d7d2c..a6e99b9ca 100644 --- a/src/app/panels/image-panel/image-panel.component.spec.ts +++ b/src/app/panels/image-panel/image-panel.component.spec.ts @@ -8,7 +8,7 @@ describe('ImagePanelComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ ImagePanelComponent ] + declarations: [ ImagePanelComponent ], }) .compileComponents(); })); From 941d3316f4edf5f15c7d26339397bb39e512e53d Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Tue, 31 May 2022 13:25:24 +0200 Subject: [PATCH 27/33] Update image-image component template --- src/app/view-modes/image-image/image-image.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/view-modes/image-image/image-image.component.html b/src/app/view-modes/image-image/image-image.component.html index 5c5b7f6bf..847541257 100644 --- a/src/app/view-modes/image-image/image-image.component.html +++ b/src/app/view-modes/image-image/image-image.component.html @@ -1,8 +1,8 @@ - + - + \ No newline at end of file From 10a1a62385a5ababb417e7086896d0178d1ce807 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Tue, 31 May 2022 13:30:04 +0200 Subject: [PATCH 28/33] Update image-panel component --- src/app/panels/image-panel/image-panel.component.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/panels/image-panel/image-panel.component.ts b/src/app/panels/image-panel/image-panel.component.ts index 5e2d176c3..c5a7020ad 100644 --- a/src/app/panels/image-panel/image-panel.component.ts +++ b/src/app/panels/image-panel/image-panel.component.ts @@ -1,5 +1,5 @@ import { HttpClient } from '@angular/common/http'; -import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; +import { ChangeDetectorRef, Component, Input } from '@angular/core'; import { ViewerDataType } from '../../models/evt-models'; import { EVTModelService } from '../../services/evt-model.service'; @@ -8,7 +8,7 @@ import { EVTModelService } from '../../services/evt-model.service'; templateUrl: './image-panel.component.html', styleUrls: ['./image-panel.component.scss'], }) -export class ImagePanelComponent implements OnInit{ +export class ImagePanelComponent { @Input() viewerData: ViewerDataType; get imageIndex() { return this._imageIndex; } @@ -39,8 +39,9 @@ export class ImagePanelComponent implements OnInit{ this.cdref.detectChanges(); } - ngOnInit() { - if (this.viewerData.type === 'manifest'){ + // tslint:disable-next-line: use-lifecycle-interface + ngOnChanges() { + if (this.viewerData?.type === 'manifest'){ this.manifest = this.viewerData.value?.manifestURL; // tslint:disable-next-line: no-any this.http.get(`${this.manifest}`).subscribe((item: any) => { @@ -50,6 +51,9 @@ export class ImagePanelComponent implements OnInit{ this.currentImg = this.images[0].label; }); } + else { + this.currentImg = 'Error loading'; + } } isSecondaryContentOpened(): boolean { From 82e5cbff5797b2a7527eb0118826578db16de84b Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Tue, 31 May 2022 13:30:19 +0200 Subject: [PATCH 29/33] Update image-image component --- .../image-image/image-image.component.ts | 58 +++++++++++++++++-- 1 file changed, 54 insertions(+), 4 deletions(-) diff --git a/src/app/view-modes/image-image/image-image.component.ts b/src/app/view-modes/image-image/image-image.component.ts index 1d9e287a1..2d7946aa2 100644 --- a/src/app/view-modes/image-image/image-image.component.ts +++ b/src/app/view-modes/image-image/image-image.component.ts @@ -1,14 +1,64 @@ -import { Component } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; import { DisplayGrid, GridsterConfig, GridsterItem, GridType } from 'angular-gridster2'; +import { map } from 'rxjs/operators'; +import { AppConfig } from '../../app.config'; +import { Surface, ViewerDataType, XMLImagesValues } from '../../models/evt-models'; +import { ViewerSource } from '../../models/evt-polymorphic-models'; +import { EVTModelService } from '../../services/evt-model.service'; @Component({ selector: 'evt-image-image', templateUrl: './image-image.component.html', styleUrls: ['./image-image.component.scss'], }) -export class ImageImageComponent { - // tslint:disable-next-line: max-line-length - public layoutOptions: GridsterConfig = { gridType: GridType.Fit, displayGrid: DisplayGrid.None, margin: 0, maxCols: 2, maxRows: 1, draggable: { enabled: true, ignoreContent: true, dragHandleClass: 'panel-header'}, resizable: { enabled: false }}; +export class ImageImageComponent implements OnInit { + public layoutOptions: GridsterConfig = {}; public imagePanel1Item: GridsterItem = { cols: 1, rows: 1, y: 0, x: 0 }; public imagePanel2Item: GridsterItem = { cols: 1, rows: 1, y: 0, x: 1 }; + + public imageViewer$ = this.evtModelService.surfaces$.pipe( + map((surface) => this.getImageViewerType(AppConfig.evtSettings.files.editionImagesSource, surface)), + ); + + constructor( + private evtModelService: EVTModelService, + ) { + } + + getImageViewerType(editionImages, surface: Surface[]): ViewerDataType { + for (const key of Object.keys(editionImages)) { + if (editionImages[key].enabled) { + return ViewerSource.getDataType(key, surface); + } + } + const xmlImages: XMLImagesValues[] = []; + this.evtModelService.pages$.pipe().subscribe( + (pages) => pages.map(page => xmlImages.push({ url: page.facsUrl }), + )); + + return { type: 'default', value: { xmlImages } }; + } + + ngOnInit() { + this.initGridster(); + } + + private initGridster() { + this.layoutOptions = { + gridType: GridType.Fit, + displayGrid: DisplayGrid.None, + margin: 0, + maxCols: 2, + maxRows: 1, + draggable: { + enabled: true, + ignoreContent: true, + dragHandleClass: 'panel-header', + }, + resizable: { + enabled: false, + }, + }; + } + } From 33664d94923f5f80c89ab11d456e9187e265838d Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Tue, 31 May 2022 13:30:38 +0200 Subject: [PATCH 30/33] Add comma in image-text component --- src/app/view-modes/image-text/image-text.component.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/view-modes/image-text/image-text.component.spec.ts b/src/app/view-modes/image-text/image-text.component.spec.ts index 71c1c937d..e8de44b27 100644 --- a/src/app/view-modes/image-text/image-text.component.spec.ts +++ b/src/app/view-modes/image-text/image-text.component.spec.ts @@ -8,7 +8,7 @@ describe('ImageTextComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ ImageTextComponent ] + declarations: [ ImageTextComponent ], }) .compileComponents(); })); From 51356378c4bd67fc69321c6e623bf35ce1400fb0 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Sun, 3 Jul 2022 15:42:48 +0200 Subject: [PATCH 31/33] Update image-panel template --- src/app/panels/image-panel/image-panel.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/panels/image-panel/image-panel.component.html b/src/app/panels/image-panel/image-panel.component.html index a11c9fc80..482538e18 100644 --- a/src/app/panels/image-panel/image-panel.component.html +++ b/src/app/panels/image-panel/image-panel.component.html @@ -9,7 +9,7 @@ [ngModel]="currentImg" (change)="toggleImg($event)"> - {{ item.label }} + {{ item.label || item.url.split('/').pop().split('.')[0] }} From 285085e733492ab0dced47d59891fcb8fc19b8a6 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Sun, 3 Jul 2022 15:43:24 +0200 Subject: [PATCH 32/33] Update image-panel component --- .../panels/image-panel/image-panel.component.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/app/panels/image-panel/image-panel.component.ts b/src/app/panels/image-panel/image-panel.component.ts index c5a7020ad..ce70d1592 100644 --- a/src/app/panels/image-panel/image-panel.component.ts +++ b/src/app/panels/image-panel/image-panel.component.ts @@ -29,13 +29,20 @@ export class ImagePanelComponent { // tslint:disable-next-line: variable-name private _imageIndex: number; public manifest; + public imagePath; + public filename; toggleImg(event){ this._imageIndex = this.images.indexOf(event); } eventPageImg(pageImg: number){ - this.currentImg = this.images[pageImg - 1].label; + if (this.viewerData?.type === 'manifest'){ + this.currentImg = this.images[pageImg - 1].label; + } + if (this.viewerData?.type === 'default'){ + this.currentImg = this.images[pageImg - 1].url.split('/').pop().split('.')[0]; + } this.cdref.detectChanges(); } @@ -51,6 +58,12 @@ export class ImagePanelComponent { this.currentImg = this.images[0].label; }); } + if (this.viewerData?.type === 'default'){ + this.images = this.viewerData?.value?.xmlImages; + this.imagePath = this.viewerData?.value?.xmlImages[0]?.url; + this.filename = this.imagePath.split('/').pop().split('.')[0]; + this.currentImg = this.filename; + } else { this.currentImg = 'Error loading'; } From 439fe69a44b48b4617a2bdbcd5553fa934925240 Mon Sep 17 00:00:00 2001 From: SaraMaenza Date: Sun, 3 Jul 2022 15:59:28 +0200 Subject: [PATCH 33/33] Update image-panel component --- src/app/panels/image-panel/image-panel.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/panels/image-panel/image-panel.component.ts b/src/app/panels/image-panel/image-panel.component.ts index ce70d1592..ae03369b9 100644 --- a/src/app/panels/image-panel/image-panel.component.ts +++ b/src/app/panels/image-panel/image-panel.component.ts @@ -40,7 +40,7 @@ export class ImagePanelComponent { if (this.viewerData?.type === 'manifest'){ this.currentImg = this.images[pageImg - 1].label; } - if (this.viewerData?.type === 'default'){ + if (this.viewerData?.type === 'default' || this.viewerData?.type === 'graphics'){ this.currentImg = this.images[pageImg - 1].url.split('/').pop().split('.')[0]; } this.cdref.detectChanges(); @@ -58,7 +58,7 @@ export class ImagePanelComponent { this.currentImg = this.images[0].label; }); } - if (this.viewerData?.type === 'default'){ + if (this.viewerData?.type === 'default' || this.viewerData?.type === 'graphics'){ this.images = this.viewerData?.value?.xmlImages; this.imagePath = this.viewerData?.value?.xmlImages[0]?.url; this.filename = this.imagePath.split('/').pop().split('.')[0];