2.2.5 • Published 8 months ago
react-resize-zoom v2.2.5
react-resize-zoom
English | 中文说明
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 notdraggResize
related) are not affected byreact-resize-zoom
. It's still the same as not being wrapped
Matters
- The child element cannot be an inline element;
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
name | type | defaultValue | description |
---|---|---|---|
direction | ['e', 'w', 's', 'n', 'ne', 'nw', 'se', 'sw'] | - | Allows control of drag edges or corners |
forbid | boolean | - | forbid scaling |
width | number | - | width |
height | number | - | height |
offset | number | 10 | How far from the edge can be dragged |
onResizeStart | function | - | Drag scaling the start event; |
onResizeMoving | function | - | Drag scaling events |
onResizeEnd | function | - | Drag scaling end the event |
fixed | boolean | Is the width and height fixed when it is an uncontrolled component | |
childProps | any | props.children | children's props |
ref | {current: HtmlElement} | props.children | The ref of the child element |
2.2.5
8 months ago
2.2.4
11 months ago
2.2.3
1 year ago
2.2.2
2 years ago
2.2.1
2 years ago
2.2.0
2 years ago
2.1.7
2 years ago
2.1.6
2 years ago
2.1.4
2 years ago
2.1.3
2 years ago
2.1.2
2 years ago
2.1.1
2 years ago
2.0.13
2 years ago
2.0.14
2 years ago
2.0.12
2 years ago
2.1.0
2 years ago
2.0.11
3 years ago
2.0.10
3 years ago
2.0.9
3 years ago
2.0.7
3 years ago
2.0.8
3 years ago
2.0.6
3 years ago
2.0.5
3 years ago
2.0.4
3 years ago
2.0.3
3 years ago
2.0.2
3 years ago
2.0.1
3 years ago
2.0.0
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago