2.2.5 • Published 2 years ago

react-resize-zoom v2.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-resize-zoom

English | 中文说明

Version

Introduction?

Element scaling without affecting the style of the wrapped element

featrues

  • Support for scaling the size of div elements, providing flexible API controls for scaling edges or corners
  • Other properties of the wrapped props.children (properties that are not draggResize related) are not affected by react-resize-zoom. It's still the same as not being wrapped

Matters

  1. The child element cannot be an inline element;
  2. props. Children limited to a single closed tag!

install

npm install --save react-resize-zoom
# or
yarn add react-resize-zoom

example

import DragResize from 'react-resize-zoom';

<DragResize>
    <div style={{ width: '50px', height: "50px", background: "red" }}>
        大小拖放
    </div>
</DragResize>

Attributes

nametypedefaultValuedescription
direction['e', 'w', 's', 'n', 'ne', 'nw', 'se', 'sw']-Allows control of drag edges or corners
forbidboolean-forbid scaling
widthnumber-width
heightnumber-height
offsetnumber10How far from the edge can be dragged
onResizeStartfunction-Drag scaling the start event;
onResizeMovingfunction-Drag scaling events
onResizeEndfunction-Drag scaling end the event
fixedbooleanIs the width and height fixed when it is an uncontrolled component
childPropsanyprops.childrenchildren's props
ref{current: HtmlElement}props.childrenThe ref of the child element
2.2.5

2 years ago

2.2.4

2 years ago

2.2.3

3 years ago

2.2.2

3 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.1.7

3 years ago

2.1.6

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.0.13

4 years ago

2.0.14

4 years ago

2.0.12

4 years ago

2.1.0

4 years ago

2.0.11

4 years ago

2.0.10

4 years ago

2.0.9

4 years ago

2.0.7

4 years ago

2.0.8

4 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago