2.2.5 • Published 8 months ago

react-resize-zoom v2.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months 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

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