I've a ScrollableView with 6 Views, the third and the fifth have a WebView inside (with other views and labels). The third one loads a local file '/graph/map.html' and construct a chart.js graph, every time that I want to reload the graph content I call a function like this:
var reload = function(properties) { map.setUrl('/graph/map.html'); var complete = function() { map.removeEventListener('load',complete); map.evalJS('reload('+JSON.stringify(properties)+')'); }; map.addEventListener('load',complete); $.wrap.add(map); };The fifth one it's a simple html code that I insert directly, only has a canvas with a simple path. When I scroll until the last View the content disappear, so, to prevent this I create another function and inserted it inside the load event:
$.over.visible = true; $.over.image = map.toImage(); $.wrap.remove(map);The this is, if I'm on another page of ScrollableView (container) and call the reload functions it works
for(var i in $.container.views) $.container.views[i].reload(properties);Unless I had never scroll to the last view of the container. I've tried some things to workaround this, but never works: remove the events and the webview and when I want to reload create all again; never remove the events and set url when I want to reload; add a app event listener inside the html page to rebuild the graph and fire it when I want to reload;