Faced with the task of adding fit methods to geo-albers-usa-territories , I'm a bit stuck.
Ideally I could follow the pattern found in albersUsa.js, namely
import {fitExtent, fitSize, fitWidth, fitHeight} from "./fit.js";
However, since the projection is not inside this repository, and those internals from fit.js are not exported from the top level of this package, I see no way to access them. Am I missing an approach that would work?
FWIW I did try
import { fitExtent, fitSize, fitWidth, fitHeight } from 'd3-geo/src/fit.js';
But that feels janky, and caused some headaches with Rollup (here's what I tried, for reference).
I propose to export these methods from the d3-geo package, for use by projections defined outside this project.
Thoughts?
Faced with the task of adding
fitmethods to geo-albers-usa-territories , I'm a bit stuck.Ideally I could follow the pattern found in albersUsa.js, namely
However, since the projection is not inside this repository, and those internals from
fit.jsare not exported from the top level of this package, I see no way to access them. Am I missing an approach that would work?FWIW I did try
But that feels janky, and caused some headaches with Rollup (here's what I tried, for reference).
I propose to export these methods from the
d3-geopackage, for use by projections defined outside this project.Thoughts?