# sprite-mind

> sprite-mind

Latest version **0.0.2** (published 2019-11-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install sprite-mind
pnpm add sprite-mind
yarn add sprite-mind
bun add sprite-mind
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2019-11-26 |
| First published | 2019-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | yaotaiyang |
| Maintainers | yaotaiyang |
| Keywords | sprite, mind |

## Links

- npm: https://www.npmjs.com/package/sprite-mind
- Repository: https://github.com/yaotaiyang/sprite-mind
- Homepage: https://github.com/yaotaiyang/sprite-mind#readme
- Issues: https://github.com/yaotaiyang/sprite-mind/issues
- npm.io page: https://npm.io/package/sprite-mind

## Dependencies (2)

- [filter-clone](https://npm.io/package/filter-clone.md) ^0.0.11
- [sprite-nodes-links](https://npm.io/package/sprite-nodes-links.md) 0.0.20

## Recent versions

- 0.0.2 (latest) — 2019-11-26

## README

# sprite-mind

基于 spritejs 基础脑图库

```js
import { SpriteMind } from 'sprite-mind'

let data = {
  text: '脑图测试',
  fixed: true,
  draggable: false,
  mouseEvents: {
    contextmenu: function(e) {
      this.attr('text', '测试')
    }
  },
  attrs: { color: '#fff', bgcolor: '#708fbf', border: null },
  children: [
    {
      text: '二级脑图1',
      children: [{ text: '三级脑图' }, { text: '三级脑图2' }, { text: '三级脑图3' }, { text: '三级脑图4' }, { text: '三级脑图5' }],
      expand: function(unfold, data) {
        console.log(unfold, data)
      }
    },
    { text: '二级脑图12', children: [{ text: '三级脑图' }, { text: '三级脑图2' }, { text: '三级脑图3' }, { text: '三级脑图4' }, { text: '三级脑图5' }] },
    { text: '二级脑图22222', children: [{ text: '三级脑图', children: [{ text: '三级脑图4' }] }, { text: '三级脑图2' }, { text: '三级脑图3' }] }
  ]
}
let spriteMind = new SpriteMind(
  {
    selector: '#app',
    animation: false,
    size: [800, 600]
  },
  data
)
window.oncontextmenu = function(e) {
  //取消默认的浏器自带右键 很重要！览！
  e.preventDefault()
}
console.log(spriteMind)
```

![sprite-mind](/mind.png)

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