Intent of NavigatableComponent$isVisibleOnScreen()

Robert Scott lists at humanleg.org.uk
Sun Nov 19 23:09:28 UTC 2017


Hi,

Just trying to decode some of the reasoning behind bits of 
NavigatableComponent - was wondering what case exactly NavigatableComponent
$isVisibleOnScreen() is intended to protect updateLocationState() from.

I'm looking at it thinking whether it's possible to make it more granular with 
a view to being able to use MapView more fully in tests, and its presence 
confuses me - if it's possible to patch it out with just a constant true (e.g. 
in gui.mappaint.RenderingHelper, even in headless mode, what is its purpose?

Is it an optimization? Is it for cases when it might get called before a 
NavigatableComponent's added to a visible window? Is it for the CLI mode?

If I knew I'd be able to see whether it can be replaced with something more 
specific.


robert.




More information about the josm-dev mailing list