shows current and max frame. Red for warning
parent
d196386d3c
commit
b1f68b367b
|
@ -37,9 +37,12 @@ export class FrameHandler {
|
||||||
private SetCurrentImageDiv() {
|
private SetCurrentImageDiv() {
|
||||||
this.currentImageDiv.innerHTML = `<img src="${this.filenames[this.currentFrame]}"></img>`;
|
this.currentImageDiv.innerHTML = `<img src="${this.filenames[this.currentFrame]}"></img>`;
|
||||||
if (this.filenames.length === 0) {
|
if (this.filenames.length === 0) {
|
||||||
this.frameNumberDiv.innerText = 'No images uploaded yet. Drag images onto the page to upload them';
|
this.frameNumberDiv.className = 'warning';
|
||||||
|
this.frameNumberDiv.innerText = 'No images uploaded yet';
|
||||||
} else {
|
} else {
|
||||||
this.frameNumberDiv.innerText = 'Current Frame: ' + this.currentFrame.toString();
|
this.frameNumberDiv.className = 'instruction';
|
||||||
|
this.frameNumberDiv.innerText =
|
||||||
|
'Frame ' + this.currentFrame.toString() + '/' + (this.filenames.length - 1).toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,18 @@ div {
|
||||||
font-family: "Arial", Helvetica, sans-serif;
|
font-family: "Arial", Helvetica, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.instruction {
|
||||||
|
display: block;
|
||||||
|
color: blue;
|
||||||
|
font-family: "Arial", Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warning {
|
||||||
|
display: block;
|
||||||
|
color: red;
|
||||||
|
font-family: "Arial", Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
width: 500px;
|
width: 500px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,16 +11,16 @@
|
||||||
<div id="dropZone">
|
<div id="dropZone">
|
||||||
<div id="output"></div>
|
<div id="output"></div>
|
||||||
|
|
||||||
<div id="instructions" class="sub">
|
<div id="instructions" class="instruction">
|
||||||
<p>advance frames with arrow keys</p>
|
<p>Drag images onto the page to upload them. Advance frames with arrow keys</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="frameNumber" class="sub">
|
<div id="frameNumber" class="warning">
|
||||||
<p></p>
|
<p></p>
|
||||||
</div>
|
</div>
|
||||||
<!-- canvas -->
|
<!-- canvas -->
|
||||||
<div id="currentImage">
|
<div id="currentImage">
|
||||||
<img alt="Current Image">
|
<img alt="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue