Widget:Lower City Map: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
m (Undo revision 134955 by Sky (talk))
Tag: Undo
m (attempt 2 at zoom.transform)
Line 70: Line 70:
       container.select('.map-svg')
       container.select('.map-svg')
         .call(zoom)
         .call(zoom)
         .call(zoom.translateBy, initial_zoom[0], initial_zoom[1])
         .call(zoom.transform, d3.ZoomTransform(initial_scale, initial_zoom[0], initial_zoom[1]));
        .call(zoom.scaleBy, initial_scale);
     })
     })
}))
}))

Revision as of 14:05, 27 December 2023

Lower City Map.

Parameters:

Parameter Effect Default
transform display coordinates Defaults to an empty transform.
debug If 'true', shows display coordinates in a debug div. false
w / h SVG dimensions 400 / 270
caption Caption (no wikitext!) Interactive map of the Lower City
unique_name A valid HTML ID. Helps distinguish between multiple maps. lower-city-map

Example with viewport changed: {{#widget:Lower City Map|transform=translate(-4168.33781321086,-1970.1107490456338) scale(4.322901608157405)|unique_name=map-sorc|caption=Sorcerous Sundries.}}

Example map with debug enabled:

Note: I was intending to also implement tooltips, but unsure if that will ever happen. - Sky (talk) 13:09, 27 December 2023 (CET)