Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 1.24 KB

README.MD

File metadata and controls

55 lines (42 loc) · 1.24 KB

mb-sketch-ruler

A sketch like ruler in javascript

NPM JavaScript Style Guide

Live Demo

Click here

Install

npm install --save mb-sketch-ruler

Usage

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={true}
        onCornerClick={this.handleCornerClick}

        // 右键菜单props
        isOpenMenuFeature={true}
        handleShowRuler={this.handleShowRuler}
        isShowReferLine={isShowReferLine}
        handleShowReferLine={this.handleShowReferLine}
      />
    )
  }
}

License

MIT © MockingBot

###© 2016 MockingBot