reduce logging in webmap console

This commit is contained in:
Adam 2022-05-15 13:10:00 +02:00
parent e2781e7bf2
commit 6edf5415d0

View file

@ -67,18 +67,17 @@ class App(
.filterIsInstance<Image>()
.map { img ->
val imgSrc = img.src.substringBeforeLast('?')
println("fetching $imgSrc")
// println("fetching $imgSrc")
var newImg : Image? = Image()
var newImg: Image? = Image()
newImg!!.onload = {
window.requestAnimationFrame {
println("image loaded ${newImg!!.src}")
// println("image loaded ${newImg!!.src}")
img.setAttribute("dynamic-reload", "true")
img.src = newImg!!.src
newImg = null // try to encourage garbage collection
Unit
}
}
newImg!!.src = imgSrc //+ "?t=${currentTimeMillis()}"