You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `isResizable` property is used to set the resizable permission of a resizable component.
132
+
133
+
The permission of `top`, `right`, `bottom`, `left`, `topRight`, `bottomRight`, `bottomLeft`, `topLeft` direction resizing.
134
+
If omitted, all resizer are enabled.
135
+
If you want to permit only right direction resizing, set `{ top:false, right:true, bottom:false, left:false, topRight:false, bottomRight:false, bottomLeft:false, topLeft:false }`.
136
+
137
+
138
+
#### `onClick`: PropTypes.func
139
+
140
+
141
+
Calls when resizable component clicked.
106
142
107
-
The direction of allowed movement (dragging) allowed ('x','y','both','none').
108
143
109
-
#### onClick {func}
144
+
#### `onTouchStart`: PropTypes.func
110
145
111
-
Callback called on component clicked.
112
146
113
-
#### onTouchStart {func}
147
+
Calls when resizable component touched.
148
+
149
+
150
+
#### `onDoubleClick`: PropTypes.func
151
+
152
+
153
+
Calls when resizable component double clicked.
114
154
115
-
Callback called on component touched.
116
155
117
156
#### `onResizeStart`: PropTypes.func
118
157
158
+
119
159
Calls when resizable component resize starts.
120
-
Calls back with (`direction: string`, `event: object`)
160
+
Calls back with (`direction: string`, `styleSize: object`, `clientSize: object`, `event: object`)
- this argument is {width, height} of getComputedStyle.
133
179
- clientSize: `{ width`, height }`
134
180
- this argument is `clientWidth` and `clientHeight`.
181
+
- delta: `{ width`, height }`
182
+
- this delta width and height by resize.
135
183
136
-
For example, when `<Resizable width={100} height={200} style={{ padding: '20px'}} onResize={...} />` mounted and resize 'x', this callback is called with `('x', { width: 100, height: 200 }, { width: 140, height: 240 })`
184
+
For example, when `<Resizable width={100} height={200} style={{ padding: '20px'}} onResize={...} />` mounted and resize 'right' 20px, this callback is called with `('right', { width: 120, height: 200 }, { width: 160, height: 240 }, {width: 20, height: 0})`
185
+
137
186
138
187
#### `onResizeStop`: PropTypes.func
139
188
140
-
Calls back with (`direction: string`, `styleSize: object`, `clientSize: object`)
141
189
142
-
- direction: `x` or `y` or `xy`
143
-
- getComputedStyleSize: `{ width, height }`
190
+
Calls back with (`direction: string`, `styleSize: object`, `clientSize: object`, `delta: object`)
- this argument is {width, height} of getComputedStyle.
145
195
- clientSize: `{ width`, height }`
146
196
- this argument is `clientWidth` and `clientHeight`.
197
+
- delta: `{ width`, height }`
198
+
- this delta width and height by resize.
147
199
148
-
For example, when `<Resizable width={100} height={200} style={{ padding: '20px'}} onResize={...} />` mounted and resize 'x', this callback is called with `('x', { width: 100, height: 200 }, { width: 140, height: 240 })`
200
+
For example, when `<Resizable width={100} height={200} style={{ padding: '20px'}} onResize={...} />` mounted and resize 'right' 20px, this callback is called with `('right', { width: 120, height: 200 }, { width: 160, height: 240 }, {width: 20, height: 0})`
201
+
149
202
150
-
#### onDrageStart {func}
203
+
#### `moveAxis`: PropTypes.string
204
+
205
+
The direction of allowed movement (dragging) allowed ('x','y','both','none').
206
+
207
+
#### `onDrageStart`: PropTypes.func
151
208
152
209
Callback called on dragging start.
153
210
154
-
#### onDrage {func}
211
+
#### `onDrage`: PropTypes.func
155
212
156
213
Callback called on resizing.
157
214
`onDrag` called with the following parameters:
158
215
159
216
160
-
161
217
```javascript
162
218
(
163
219
event:Event,
@@ -172,13 +228,12 @@ Callback called on resizing.
172
228
)
173
229
```
174
230
175
-
#### onDrageStop {func}
231
+
#### `onDrageStop`: PropTypes.func
176
232
177
233
Callback called on dragging stop.
178
234
`onDragStop` called with the following parameters:
179
235
180
236
181
-
182
237
```javascript
183
238
(
184
239
event:Event,
@@ -193,17 +248,7 @@ Callback called on dragging stop.
193
248
)
194
249
```
195
250
196
-
#### initAsResizing {object}
197
-
198
-
The component begins as if a resize event occurred.
199
-
This is useful if you would like to click and drag to create a box (e.g. click and drag out a selection window).
200
-
If omitted, component does not call resize when created.
201
-
202
-
Accepted Value: `{enable:true, direction: 'both', event:event}` where direction can be 'x', 'y' or 'xy' and event is the current mouse event
203
-
204
-
Note that `event.persist()` must be called so the mouse event can be passed to ResizableAndMovable
0 commit comments