mirror of
https://github.com/simon987/feed_viz.git
synced 2025-04-19 01:36:42 +00:00
Load new images from the top
This commit is contained in:
parent
061d8ed6eb
commit
0cf8902730
@ -169,7 +169,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="js/materialize.min.js"></script>
|
<script src="js/materialize.min.js"></script>
|
||||||
<script src="js/main.js?v=1.3.1"></script>
|
<script src="js/main.js?v=1.3.2"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -121,6 +121,8 @@ function connect(exchange, topics) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
socket.onclose = (e) => {
|
socket.onclose = (e) => {
|
||||||
|
console.log(e);
|
||||||
|
console.log(socket.CLOSED);
|
||||||
document.getElementById("connect").innerHTML = "Disconnected";
|
document.getElementById("connect").innerHTML = "Disconnected";
|
||||||
document.getElementById("connect").classList.remove("connected");
|
document.getElementById("connect").classList.remove("connected");
|
||||||
document.getElementById("connect").classList.remove("connecting");
|
document.getElementById("connect").classList.remove("connecting");
|
||||||
@ -174,8 +176,8 @@ function createGallery(count) {
|
|||||||
function popRow() {
|
function popRow() {
|
||||||
for (let i = 0; i < colCount; i++) {
|
for (let i = 0; i < colCount; i++) {
|
||||||
if (cols[i].hasChildNodes()) {
|
if (cols[i].hasChildNodes()) {
|
||||||
colHeights[i] -= cols[i].firstChild.height;
|
colHeights[i] -= cols[i].lastChild.height;
|
||||||
cols[i].firstChild.remove();
|
cols[i].lastChild.remove();
|
||||||
currentImages -= 1;
|
currentImages -= 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -199,7 +201,8 @@ function appendToGallery(child) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cols[min].appendChild(child);
|
cols[min].prepend(child);
|
||||||
|
|
||||||
if (!child.height) {
|
if (!child.height) {
|
||||||
colHeights[min] += 2400 / colCount;
|
colHeights[min] += 2400 / colCount;
|
||||||
child.onload = function () {
|
child.onload = function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user