show plotted images
This commit is contained in:
5
pdb-js/src/app/plot-view/plot-view.component.html
Normal file
5
pdb-js/src/app/plot-view/plot-view.component.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<img
|
||||
*ngIf="imageUrl"
|
||||
src="{{imageUrl}}" />
|
||||
|
||||
<div *ngIf="errorMessage" class="errorPanel">{{errorMessage}}</div>
|
||||
4
pdb-js/src/app/plot-view/plot-view.component.scss
Normal file
4
pdb-js/src/app/plot-view/plot-view.component.scss
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
img {
|
||||
display:block; /* removes 3 pixels extra height around the image */
|
||||
}
|
||||
25
pdb-js/src/app/plot-view/plot-view.component.spec.ts
Normal file
25
pdb-js/src/app/plot-view/plot-view.component.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PlotViewComponent } from './plot-view.component';
|
||||
|
||||
describe('PlotViewComponent', () => {
|
||||
let component: PlotViewComponent;
|
||||
let fixture: ComponentFixture<PlotViewComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ PlotViewComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PlotViewComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
19
pdb-js/src/app/plot-view/plot-view.component.ts
Normal file
19
pdb-js/src/app/plot-view/plot-view.component.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'pdb-plot-view',
|
||||
templateUrl: './plot-view.component.html',
|
||||
styleUrls: ['./plot-view.component.scss']
|
||||
})
|
||||
export class PlotViewComponent implements OnInit {
|
||||
|
||||
imageUrl : string;
|
||||
|
||||
errorMessage: string;
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user