#68 center loader

This commit is contained in:
Eugenio Romano 2016-06-07 11:06:13 +01:00
parent 9bbf7cc382
commit b7b938b453
4 changed files with 20 additions and 17 deletions

View File

@ -2,6 +2,10 @@
background: #3E3E3E; background: #3E3E3E;
} }
.viewer-loader-text {
text-align: center;
}
:host .page { :host .page {
margin: 10px auto !important; margin: 10px auto !important;
overflow: visible; overflow: visible;

View File

@ -1,11 +1,11 @@
<!-- Start Pdf Canvas --> <!-- Start Pdf Canvas -->
<div id="viewer-pdf-container" class="viewer-pdf-container" (keypress)=eventHandler()> <div id="viewer-pdf-container" class="center-element viewer-pdf-container" (keypress)=eventHandler()>
<div id="viewer-viewerPdf" style="border:1px solid black;"> <div id="viewer-viewerPdf" class="center-element" >
<div id="loader"> <div id="viewer-loader" class="center-element" >
<div> <div>
<div id="loader-spin" class="mdl-progress mdl-js-progress mdl-progress__indeterminate"></div> <div id="loader-spin" class="mdl-progress mdl-js-progress mdl-progress__indeterminate"></div>
</div> </div>
<div id="loader-text">Loading...</div> <div id="viewer-loader-text" class="viewer-loader-text">Loading...</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -37,6 +37,18 @@ describe('PdfViewer', () => {
expect(element.querySelector('#viewer-pdf-container')).not.toBeNull(); expect(element.querySelector('#viewer-pdf-container')).not.toBeNull();
}); });
})); }));
it('Loader should be present', injectAsync([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb
.createAsync(PdfViewerComponent)
.then((fixture) => {
let element = fixture.nativeElement;
fixture.detectChanges();
expect(element.querySelector('#viewer-loader')).not.toBeNull();
});
}));
}); });
describe('User interaction', () => { describe('User interaction', () => {

View File

@ -14,19 +14,6 @@
margin: 20px; margin: 20px;
} }
#loader{
margin: auto;
padding-top: 20px;
width:300px;
}
#loader-text{
width:300px;
white-space: nowrap;
text-align: center;
position: relative;
color: #000;
}
#viewer-toolbar-pagination { #viewer-toolbar-pagination {
margin-left: 25%; margin-left: 25%;
} }