A sketch like ruler in javascript
npm install --save mb-sketch-ruler
import React, { PureComponent } from "react";
import ReactRuler from "mb-sketch-ruler";
class Example extends PureComponent {
render() {
return (
<ReactRuler
thick={thick}
scale={scale}
width={582}
height={482}
startX={startX}
startY={startY}
shadow={shadow}
horLineArr={h}
verLineArr={v}
handleLine={this.handleLine}
cornerActive={false}
onCornerClick={this.handleCornerClick}
// 右键菜单props
isOpenMenuFeature={true}
handleShowRuler={this.handleShowRuler}
isShowReferLine={isShowReferLine}
handleShowReferLine={this.handleShowReferLine}
/>
);
}
}
MIT © MockingBot
###© 2016 MockingBot