0.0.2 • Published 9 years ago

pinboard-grid v0.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
9 years ago

SVG Grid

This library renders a grid in SVG. This might be helpful if you want to share or build blueprints for hardware in the browser.

The SVG library does not use an advanced library for DOM manipulation, but rather the native DOM API such as document.createElementNS (see https://developer.mozilla.org/en-US/docs/Web/API/document.createElementNS )

Demo

You can either run:

  • bundle.js: Use this to generate a grid from a script

  • bundle-require.js: Use this to generate the grid interactively from the Node shell

For this demo, load bundle-require.js and run in the browser console:

> Grid = require('grid');
> s = document.getElementsByTagName('svg');
> g = new Grid(s[0]);
> g.render()

License

MIT, 2014 (c) Patrick Mulder