Skip to content

Expose Fit Internals #217

Description

@curran

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions