Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

d3-geo-fit

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-geo-fit

Calculates the projection transform of the given d3 geo path to fit the given geometry features into the given widht/height.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

d3-geo-fit

A utility function which calculates the projection transform of the given d3 geo path to fit the given geometry features into the given width/height.

/**
 * Calculates the projection transform for the given d3.geo.path
 * to fit the given geometry features into the box  [0, 0, width, height].
 *
 * @param geoPath  Instance of d3.geo.path
 * @param features  GeoJSON features
 * @param width    {Number}
 * @param height   {Number}
 * @param padding  {Number} Padding in pixels
 * @returns {{scale: number, translate: *[]}}
 */

fitTransform(geoPath, features, width, height, padding)

FAQs

Package last updated on 18 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts