commit 025050e18dc52a5ab5e3406f1da7d75bf2955255
parent 7ddf4463c7b0fce7f26617249ece9e62668f3f78
Author: Brian C. Lane <bcl@brianlane.com>
Date: Sun, 24 Sep 2017 19:57:50 -0700
Attempt at making thumbnail next/prev more smooth.
This is better, but still not perfect. Changes to upper right still
result in the full page flashing.
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/strix/ui/index.html b/src/strix/ui/index.html
@@ -39,7 +39,9 @@ function get_events(camera_name, offset, limit) {
var start = nice_time_string(event.start);
return `<a href="/${event.video}" class="video" title="${start}" target="video"><img class="thumbnail" src="/${event.thumbnail}" /></a>`;
}).join("");
- camera_div.innerHTML = html;
+ new_div = document.createElement("div");
+ new_div.innerHTML = html;
+ camera_div.replaceChild(new_div, camera_div.childNodes[0]);
});
}
@@ -80,7 +82,7 @@ function setup_page() {
return `<div class="feed" id="${camera_name}">
<table>
<tr><a href="" class="feed-href" data-port="${port}"><img src="" class="feed-src" data-port="${port}"></a></tr>
- <tr class="controls"><td class="prev"><</td><td class="thumbnails"></td><td class="next">></td></tr>
+ <tr class="controls"><td class="prev"><</td><td class="thumbnails"><div /></td><td class="next">></td></tr>
</table>
</div>`;
}).join("\n");