reduce logging in webmap console
This commit is contained in:
parent
e2781e7bf2
commit
6edf5415d0
1 changed files with 3 additions and 4 deletions
|
|
@ -67,18 +67,17 @@ class App(
|
||||||
.filterIsInstance<Image>()
|
.filterIsInstance<Image>()
|
||||||
.map { img ->
|
.map { img ->
|
||||||
val imgSrc = img.src.substringBeforeLast('?')
|
val imgSrc = img.src.substringBeforeLast('?')
|
||||||
println("fetching $imgSrc")
|
// println("fetching $imgSrc")
|
||||||
|
|
||||||
var newImg : Image? = Image()
|
var newImg: Image? = Image()
|
||||||
|
|
||||||
newImg!!.onload = {
|
newImg!!.onload = {
|
||||||
|
|
||||||
window.requestAnimationFrame {
|
window.requestAnimationFrame {
|
||||||
println("image loaded ${newImg!!.src}")
|
// println("image loaded ${newImg!!.src}")
|
||||||
img.setAttribute("dynamic-reload", "true")
|
img.setAttribute("dynamic-reload", "true")
|
||||||
img.src = newImg!!.src
|
img.src = newImg!!.src
|
||||||
newImg = null // try to encourage garbage collection
|
newImg = null // try to encourage garbage collection
|
||||||
Unit
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newImg!!.src = imgSrc //+ "?t=${currentTimeMillis()}"
|
newImg!!.src = imgSrc //+ "?t=${currentTimeMillis()}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue