Socket
Socket
Sign inDemoInstall

geostyler-legend

Package Overview
Dependencies
2
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

geostyler-legend


Version published
Weekly downloads
952
decreased by-5.93%
Maintainers
0
Created
Weekly downloads
 

Changelog

Source

5.0.0 (2024-06-25)

⚠ BREAKING CHANGES

  • Switches to an esm build, so you might need to adapt your imports and reconfigure your bundler.
  • Built file locations are different, so you may need to update your imports.

Features

Bug Fixes

  • cleanup package.json (6dc07c9)
  • deps: update dependency @types/d3-selection to v3.0.10 (0297309)
  • exclude src folder in build (26bc5dc)
  • remove coveralls (f901018)
  • remove coveralls (9b1256a)
  • remove dependabot (94f8442)

Readme

Source

geostyler-legend

Greenkeeper badge Build Status Coverage Status

A simple legend component for geostyler-style.

Installation

npm i geostyler-legend

Usage

In order to render a legend, you construct a legend renderer like this:

      const renderer = new LegendRenderer({
        maxColumnWidth: 300,
        maxColumnHeight: 300,
        overflow: 'auto',
        styles: [style],
        size: [600, 300]
      });
      renderer.render(someElement);

The styles property can contain a list of geostyler style objects that each correspond to one legend rendered.

There are currently three modes. If constructed as above, the renderer will render multiple columns if needed, with a maximum width and height as specified. The columns will break on any legend element.

If the overflow property is set to 'group', the columns will break on legend boundaries only, leaving the rest of the column empty if starting on a new legend.

If the maxColumnHeight property is not set, the renderer will render just one column with all the legends, thus ignoring the size parameter for the height.

Development

If you want to contribute, you can build the project like this:

  • git clone https://github.com/geostyler/geostyler-legend
  • cd geostyler-legend
  • npm i

and then

  • npm run build

in order to get a production build.

Funding & financial sponsorship

Maintenance and further development of this code can be funded through the GeoStyler Open Collective. All contributions and expenses can transparently be reviewed by anyone; you see what we use the donated money for. Thank you for any financial support you give the GeoStyler project 💞

FAQs

Last updated on 25 Jun 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc