0.8.3 • Published 3 years ago

react-tinymap v0.8.3

Weekly downloads
6
License
MIT
Repository
-
Last release
3 years ago

This is derived from a repo that has not been maintained for a long time and needs to be used in the project, so it has been implemented with hooks for long-term maintenance

Install

yarn install react-tinymap

Usage

<TinyMap placement='topRight' selector='.box' keepAspectRatio={false}>
  <Block className='box' style={{position: 'absolute', left: '400px', top: '100px'}}/>
  <Block className='box' style={{position: 'absolute', left: '800px', top: '100px'}}/>
</TinyMap>

example

Properties

propertytypedescriptiondefault
selectorstringcss selector to find the displayed nodeundefined
classNamestringwrapper class nameundefined
miniMapClassNamestringminimap view pointer box class nameundefined
keepAspectRatiobooleankeep aspect ratiofalse
renderChild({ left: number, top: number, width: number, height: number }) => FCrender blockundefined
renderViewPort({ left: number, top: number, width: number, height: number }) => FCrender view portundefined
widthnumberview port width200
heightnumberview port height200
placementtopLeft | topRight | bottomLeft | bottomRightview port placementbottomRight

Author

👤 波比小金刚

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator