fixed BUG-96 (no longer wrapped name of file for image viewer)

This commit is contained in:
2022-07-17 16:45:11 +10:00
parent 3193b86f9f
commit f62eaef1cd
2 changed files with 5 additions and 3 deletions

View File

@@ -63,6 +63,9 @@ function DrawImg()
canvas.width=NewWidth(im) canvas.width=NewWidth(im)
canvas.height=NewHeight(im) canvas.height=NewHeight(im)
// dont let caption be wider than image
$('#img-cap').width(canvas.width)
// actually draw the pixel images to the canvas at the right size // actually draw the pixel images to the canvas at the right size
if( grayscale ) if( grayscale )
context.filter='grayscale(1)' context.filter='grayscale(1)'
@@ -77,7 +80,6 @@ function DrawImg()
if( $('#fname_toggle').prop('checked' ) ) if( $('#fname_toggle').prop('checked' ) )
{ {
// reset fname for new image (if navigated left/right to get here) // reset fname for new image (if navigated left/right to get here)
$('#fname').html(PrettyFname(objs[current].url))
$('.figcaption').show() $('.figcaption').show()
} }
else else

View File

@@ -176,8 +176,8 @@
window.addEventListener('resize', DrawImg, false); window.addEventListener('resize', DrawImg, false);
</script> </script>
<figcaption id="img-cap" class="figure-caption text-center text-wrap text-break"><span id="fname_i"></span></figcaption> <figcaption id="img-cap" class="figure-caption text-center text-wrap text-break"><span id="fname_i"></span></figcaption>
<script>$('#fname_i').html(PrettyFname('{{objs[current].FullPathOnFS()}}'))</script>
</figure> </figure>
<script>$('#fname_i').html(PrettyFname(objs[current].url))</script>
{% if objs[current].type.name != "Image" %} {% if objs[current].type.name != "Image" %}
<script>$('#figure').hide()</script> <script>$('#figure').hide()</script>
{% endif %} {% endif %}
@@ -187,7 +187,7 @@
Your browser does not support the video tag. Your browser does not support the video tag.
</video> </video>
<figcaption id="vid-cap" class="figure-caption text-center text-wrap text-break"><span id="fname_v"></span></figcaption> <figcaption id="vid-cap" class="figure-caption text-center text-wrap text-break"><span id="fname_v"></span></figcaption>
<script>$('#fname_v').html(PrettyFname('{{objs[current].FullPathOnFS()}}'))</script> <script>$('#fname_v').html(PrettyFname(objs[current].url))</script>
</div> </div>
<script> <script>
window.addEventListener('resize', ResizeVideo, false); window.addEventListener('resize', ResizeVideo, false);