Socket
Socket
Sign inDemoInstall

marvel-sitemap

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marvel-sitemap

marvel-sitemap draws network of the links in your marvel prototype


Version published
Maintainers
1
Created
Source

marvel-sitemap

Install:

npm install marvel-sitemap --save

Usage:

import Sitemap from 'marvel-sitemap'

const options = {
  canvasId : 'myCanvajs', // <canvas> element id
  id: '2aah1d9', // marvel vanity id
}

// initiate a sitemap component in a canvas element
const sitemap = new Sitemap(options);

// initiate the load of the sitemap
sitemap.load()
  .then(() => {
    console.log('Sitemap Loaded')
  })

// update a config property
sitemap.update({ scale: .4, lineColor: '#ccffbb' })

// config properties available:
{
  scale: 0.2,
  spacingX: 150,
  spacingY: 50,
  marginX: 30,
  marginY: 80,
  maxPerRow: 10,
  maxPerColumn: 6,
  lineWidth: 2,
  arrow: 3,
  radius: 5,
  corridorMargin: 20,
  useSingleColor: false,
  joinLines: false,
  lineColor: '#000000',
  hotspotColor: '#0087ff',
};

// when you are done...
sitemap.destroy()

Publish

npm run build
npm publish

FAQs

Package last updated on 13 Nov 2018

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc