Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F85300038
info-box.component.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Sep 28, 03:29
Size
1 KB
Mime Type
text/x-java
Expires
Mon, Sep 30, 03:29 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
21156937
Attached To
rSVGTESTAPP svg-test-app
info-box.component.ts
View Options
import { Component, Input, OnInit} from '@angular/core';
import {MatExpansionModule} from '@angular/material/expansion';
import { Subscription } from 'rxjs';
import { InfoService } from '../services/info.service';
import { Word } from '../word';
@Component({
selector: 'app-info-box',
templateUrl: './info-box.component.html',
styleUrls: ['./info-box.component.css']
})
export class InfoBoxComponent {
@Input() manuscript: any;
information: string = "test";
word: Word;
subscription: Subscription;
showInfo: boolean = false;
expansion: boolean = true;
constructor(private infoService: InfoService, private matExpansionModule: MatExpansionModule){
this.subscription = infoService.wordChange$.subscribe(
word => {
if (this.word === word){
this.toggleShowInfo();
this.word = null;
} else {
this.word = word;
if (!this.showInfo){
this.toggleShowInfo();
}
}
});
}
toggleShowInfo(){
this.showInfo = !this.showInfo;
}
}
Event Timeline
Log In to Comment