You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
45 lines
1.1 KiB
import { Component, OnInit, Input } from '@angular/core'; |
|
import Viewer from 'viewerjs' |
|
@Component({ |
|
selector: 'app-get-out-of-line-details', |
|
templateUrl: './get-out-of-line-details.component.html', |
|
styleUrls: ['./get-out-of-line-details.component.scss'] |
|
}) |
|
export class GetOutOfLineDetailsComponent implements OnInit { |
|
|
|
@Input() data: any |
|
@Input() type: any |
|
constructor() { } |
|
|
|
|
|
imgUrl: string |
|
vedioUrl: string |
|
ngOnInit(): void { |
|
this.imgUrl = this.data.violateImage |
|
this.vedioUrl = this.data.violateVideo |
|
} |
|
|
|
|
|
selectedType: string = 'img' |
|
contentType(type) { |
|
this.selectedType = type |
|
} |
|
lookImg() { |
|
let dom = document.getElementById(`viewerjs`) |
|
let pObjs = dom.childNodes; |
|
let node = document.createElement("img") |
|
node.style.display = "none"; |
|
node.src = "../../../../assets/images/bgImg.png"; |
|
node.id = 'img' |
|
dom.appendChild(node) |
|
setTimeout(() => { |
|
let viewer = new Viewer(document.getElementById(`viewerjs`), { |
|
hidden: () => { |
|
dom.removeChild(pObjs[0]); |
|
viewer.destroy(); |
|
} |
|
}); |
|
node.click(); |
|
}, 0); |
|
} |
|
}
|
|
|