MCPcopy Create free account
hub / github.com/microsoft/SandDance / fit

Function fit

docs/app/js/sanddance-app.js:131632–131635  ·  view source on GitHub ↗
(proj, _)

Source from the content-addressed store, hash-verified

131630 }
131631});
131632function fit(proj, _) {
131633 const data = collectGeoJSON(_.fit);
131634 _.extent ? proj.fitExtent(_.extent, data) : _.size && proj.fitSize(_.size, data);
131635}
131636function create(type) {
131637 const constructor = (0, _vegaProjection.projection)((type || "mercator").toLowerCase());
131638 if (!constructor) (0, _vegaUtil.error)("Unrecognized projection type: " + type);

Callers 4

transformFunction · 0.70
fitExtentFunction · 0.70
fitWidthFunction · 0.70
fitHeightFunction · 0.70

Calls 4

collectGeoJSONFunction · 0.70
fitBoundsFunction · 0.70
translateMethod · 0.45
scaleMethod · 0.45

Tested by

no test coverage detected