Skip to content

evenchange4/react-svg-drag-and-select

Repository files navigation

React-svg-drag-and-select

A SVG playground to drag and select shape elements.

Travis Codecov Status Github Tag node npm downloads npm

Dependency Status devDependency Status peerDependency Status Greenkeeper badge prettier license

Install

$ yarn add react-svg-drag-and-select

Usage

import SVGContainer from 'react-svg-drag-and-select';

<SVGContainer
  width={300}
  height={300}
  style={{ backgroundColor: 'aliceblue' }}
  onSelectChange={this.onSelectChange}
  onItemsChange={this.onItemsChange}
  items={items}
  isMovable={isMovable}
  isSelectable={!isMovable}
/>

Please see the story example file for more detail.

API

Demo

Technology Stacks

  • Storybook: 📓 Interactive development & testing environment for React, React-Native, Vue UI components.
  • PureScript: A strongly-typed functional programming language that compiles to JavaScript.
  • Travis: CI

Developer Guide

Requirements

  • node >= 8.6.0
  • npm >= 5.3.0
  • yarn >= 1.1.0
$ git clone https://github.com/evenchange4/react-svg-drag-and-select.git
$ npm install -g purescript pulp bower # For PureScript 
$ yarn install --pure-lockfile
$ ./node_modules/.bin/bower install

$ yarn start
$ yarn run build

Test

$ yarn run format
$ yarn run eslint
$ yarn run test:watch

Github release / NPM release

$ npm version patch
$ git push

CONTRIBUTING

  • ⇄ Pull requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.
  • Pull requests must be accompanied by passing automated tests ($ yarn run test).

MIT: http://michaelhsu.mit-license.org

About

[WIP] A SVG playground to drag and select shape elements.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors