# @netless/react-scale-controller

> a whiteboard scale controller

Latest version **1.0.2** (published 2019-05-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @netless/react-scale-controller
pnpm add @netless/react-scale-controller
yarn add @netless/react-scale-controller
bun add @netless/react-scale-controller
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-05-19 |
| First published | 2019-05-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 1 |
| Unpacked size | 876.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | alwaysmavs |
| Maintainers | netless-rick |

## Links

- npm: https://www.npmjs.com/package/@netless/react-scale-controller
- Repository: https://github.com/alwaysmavs/netless-scale-controller
- Homepage: https://github.com/alwaysmavs/netless-scale-controller#readme
- Issues: https://github.com/alwaysmavs/netless-scale-controller/issues
- npm.io page: https://npm.io/package/@netless/react-scale-controller

## Dependencies (1)

- [rc-tween-one](https://npm.io/package/rc-tween-one.md) ^2.4.1

## Recent versions

- 1.0.2 (latest) — 2019-05-19
- 1.0.1 — 2019-05-18
- 1.0.0 — 2019-05-08

## README

# netless-scale-controller

> a whiteboard scale controller

[![NPM](https://img.shields.io/npm/v/@netless/react-scale-controller".svg)](https://www.npmjs.com/package/@netless/react-scale-controller") [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## 1. 说明

本项目技术选型为：`React` `Typescript`
打包工具为： `rollup`  


## 2. 安装

```bash
npm install --save @netless/react-scale-controller"

或者

yarn add @netless/react-scale-controller"
```
## 3. 接口说明

| 参数                       | 说明               | 类型                                         | 默认值 |
| :------------------------- | :----------------- | :------------------------------------------- | :----: |
| zoomScale       | 缩放比例 | number                            |        |
| zoomChange   | 缩放变换回调 | (scale: number) => void |        |
| style? | 样式 | (React.CSSProperties |        |

## 4. 使用概览

```tsx
import * as React from "react";
import ScaleController from "@netless/react-scale-controller";

export default class ScaleControllerExample extends React.Component<{}, {}> 
  render () {
    return (
        <ScaleController
            zoomScale={room.state.zoomScale}
            zoomChange={this.zoomChange}/>
    )
  }
}
```

## 5. 启动项目

1. 获取源码

    ```bash
    git clone git@github.com:netless-io/netless-react-scale-controller.git
    ```

2. 进入项目并安装库文件依赖

    ```bash
    cd netless-react-scale-controller
    yarn
    ```

3. 启动库文件项目

    ```bash
        yarn start
    ```

4. 进入项目并安装 `example` 文件依赖

    ```bash
        cd example
        yarn
    ```

5. 启动 `example` 项目

    ```bash
        yarn start
    ```

## 5. 项目截图

![scale-1-2-3](https://ohuuyffq2.qnssl.com/scale-1-2-3.png)

## License

MIT © [alwaysmavs](https://github.com/alwaysmavs)

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