a whiteboard scale controller
本项目技术选型为:React
Typescript
打包工具为: rollup
npm install --save @netless/react-scale-controller"
或者
yarn add @netless/react-scale-controller"
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
zoomScale | 缩放比例 | number | |
zoomChange | 缩放变换回调 | (scale: number) => void | |
style? | 样式 | (React.CSSProperties |
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}/>
)
}
}
-
获取源码
git clone git@github.com:netless-io/netless-react-scale-controller.git
-
进入项目并安装库文件依赖
cd netless-react-scale-controller yarn
-
启动库文件项目
yarn start
-
进入项目并安装
example
文件依赖cd example yarn
-
启动
example
项目yarn start
MIT © alwaysmavs