melek / lib_elevation

A flexible elevation library for creating vertical encounter maps in MapTool.
4 stars 0 forks source link

While working on maps, selected "Map Elevation Data" to delete it so a new one would be made and could not find my new map. #8

Closed adventuremagic123 closed 3 years ago

adventuremagic123 commented 3 years ago

I had just gotten started creating a map and thought I'd clean up "Map Elevation Data". However, because my focus was on that token and it was so extremely far away from my map -- I couldn't find my map anymore. I tried zooming out and moving around. I would like it to be located near my map and let me position it where I would like it to be.

adventuremagic123 commented 3 years ago

lib:elevation 1.0b.

adventuremagic123 commented 3 years ago

BTW, there is a work-around. Make sure to put a token on your map before removing "Map Elevation Data".

melek commented 3 years ago

BTW, there is a work-around. Make sure to put a token on your map before removing "Map Elevation Data".

Great problem solving! This does work very well - you can then double click the token from the Map Explorer. In the future, you can actually use a method to delete the reference data on the data token: elevation.deleteMapDataObj(). This is functionally almost identical to simply clicking 'Delete' on every elevation from the UI.

Another solution is to use a macro. The following macro in chat will set your view area with 0, 0 on the top left and zoom to about 10 cells tall: [setViewArea(0, 0, 10, 10, 0)]

Lib:Elevation used to have methods to view the entire active elevation area where the data token and hidden linked elevation tokens are stashed. Elevation only works inside a huge square on the map (the 'Blocking Layer' area), so using this you'll have to zoom in a bunch to view your stuff - but you can also view this huge area with the following macro:

[h: "
<!--Since Lib:Elevation 1.0a - removed before 1.0b
    viewBLArea() jumps to the part of the map when Elevation Tokens are moved to.
-->"]

[h: vX = elevation.getElevationAnchorX()]
[h: vY = elevation.getElevationAnchorY()] 
[h: vX2 = vX + elevation.getElevationAreaWidth()]
[h: vY2 = vY + elevation.getElevationAreaHeight()] 
[h: setViewArea(vX, vY, vX2, vY2)]