# react-svg-marker

> ## About React mark component based on SVG, support for drawing lines , polygon , arrow and other graphics.

Latest version **1.1.0** (published 2020-11-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-svg-marker
pnpm add react-svg-marker
yarn add react-svg-marker
bun add react-svg-marker
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2020-11-24 |
| First published | 2020-11-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | weizy |
| Maintainers | weizy |

## Links

- npm: https://www.npmjs.com/package/react-svg-marker
- Repository: https://github.com/weidapao/react-svg-marker
- Homepage: https://weidapao.github.io/react-svg-marker
- Issues: https://github.com/weidapao/react-svg-marker/issues
- npm.io page: https://npm.io/package/react-svg-marker

## Recent versions

- 1.1.0 (latest) — 2020-11-24
- 1.0.2 — 2020-11-20
- 1.0.1 — 2020-11-20
- 1.0.0 — 2020-11-20

## README

# react-svg-marker

## About
React mark component based on SVG, support for drawing lines , polygon , arrow and other graphics.

## Installation
npm install -S react-svg-marker

## Demo
```
import LabelPanel from '../index'
const [list, setList] = useState([{
  type: 'polyline',
  point: [
    { x: 100, y: 200 },
  ],
  color: 'blue',
  selected: true,
  end: false,
}])
const cal = useRef(null)

const drawShap = (shapType, color) => {
  if (cal.current !== null) {
    cal.current.drawShap(shapType, color)
  }
}

<LabelPanel
  ref={cal}
  imgUrl={imgUrl}
  data={list}
  onChange={(e) => {
    setList(e)
  }}
/>
```

## Options and Defaults

shapType: 'polyline' | 'polygon' | 'arrow'

Point : { x: number; y: number }

data: {
  type: shapType
  point: Point[]
  color: string
  selected: boolean
  end: boolean
}

imgUrl: string

width?: number

height?: number

---
_Source: https://npm.io/package/react-svg-marker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
