zoom bug
I noticed an issue where the user can click zoom in or out buttons and 'erase' the map when they click past the zoom limits. I tried to ignore clicks past the zoom range, but some clicks can make it in before the zoomLevel is updated on the map. I considered disabling the controls until the action finished, but I rejected this because I wanted the controls to remain responsive.
The animationProcess method in Map has:
grid.allowPainting(__animSteps.length <= 1);
(2 times, but it is commented out for panning, and available for zooming in my version).
Tiles are not redrawn when the map hits a zoom limit because there are more animation steps queued up, and TileGrid throws out the zoomBy calls that would go past the zoom limits.
I put a hack into my copy of the normalizeWell function on TileGrid which seems to do the trick:
...
zoomAdjust = Math.round(Math.log(_well.scaleX) / Math.log(2));
scaleAdjust = Math.pow(2, zoomAdjust);
//trace('This is where we scale the whole well by '+zoomAdjust+' zoom levels: '+(100 / scaleAdjust)+'%');
var newZoom:int = zoomLevel + zoomAdjust;
if (newZoom == bottomRightInLimit.zoom || newZoom == topLeftOutLimit.zoom)
allowPainting(true);
var n:int;
for (n = 0; n < zoomAdjust; n += 1)
...
I think I am reporting a problem more than submitting code to be used- there must be a cleaner way to handle this, but I hope this helps someone else.
The animationProcess method in Map has:
grid.allowPainting(__animSteps.length <= 1);
(2 times, but it is commented out for panning, and available for zooming in my version).
Tiles are not redrawn when the map hits a zoom limit because there are more animation steps queued up, and TileGrid throws out the zoomBy calls that would go past the zoom limits.
I put a hack into my copy of the normalizeWell function on TileGrid which seems to do the trick:
...
zoomAdjust = Math.round(Math.log(_well.scaleX) / Math.log(2));
scaleAdjust = Math.pow(2, zoomAdjust);
//trace('This is where we scale the whole well by '+zoomAdjust+' zoom levels: '+(100 / scaleAdjust)+'%');
var newZoom:int = zoomLevel + zoomAdjust;
if (newZoom == bottomRightInLimit.zoom || newZoom == topLeftOutLimit.zoom)
allowPainting(true);
var n:int;
for (n = 0; n < zoomAdjust; n += 1)
...
I think I am reporting a problem more than submitting code to be used- there must be a cleaner way to handle this, but I hope this helps someone else.
1
person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Thanks for letting us know.
The zooming animation behaviour has been completely overhauled in recent versions of the as3 codebase, so we're not actively maintaining code with __animSteps in any more.
Ideally, any zooming methods on Map will now respect the zoom limits in the map provider. Hopefully the issue above is completely resolved.
The company says
this solves the problem
Loading Profile...



EMPLOYEE