From 42ccba832ee3f58a0631618dece0b85fed132879 Mon Sep 17 00:00:00 2001 From: alban Date: Sun, 1 Nov 2020 23:28:34 +0100 Subject: [PATCH] [fix] tweaks --- docker-compose.yml | 2 +- index.html | 3 ++- js/canvas.js | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5446cbc..2845d14 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,5 +41,5 @@ services: image: teamlaser/laser-app:latest depends_on: - db - command: bash -c "while true; do python ./worker.py; sleep 30; done" + command: bash -c "while true; do python ./worker.py; sleep 3; done" diff --git a/index.html b/index.html index a25fdc7..1b0f0d4 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,7 @@ video { border: 1px solid #ccc; display: block; margin: 0 0 20px 0; } #canvas { margin-top: 20px; border: 1px solid #ccc; display: block; } span.ui-slider-handle.ui-corner-all.ui-state-default { background: dodgerblue;} + canvas#simuCanvas {background: #333;} @@ -67,7 +68,7 @@ -
+
diff --git a/js/canvas.js b/js/canvas.js index 9bd113d..17d33fc 100644 --- a/js/canvas.js +++ b/js/canvas.js @@ -255,6 +255,13 @@ $(document).ready(function(){ } function refreshImageList(){ var imageList = localStorage.getItem("imageList") ? JSON.parse(localStorage.getItem("imageList")) : [] + + if( 0 == imageList.length){ + $("#preview").hide() + return + } + $("#preview").show() + html = '' for( id in imageList){ hash_name = imageList[id]