- Change
speed
prop to strengthMultiplier
- Adds a hard dependency on using
react-dnd
which was theoretically
optional before.
- Fix double dispatch of
onDragOver
prop
- Default strength functions always return 0 if the point is anywhere
outside the box.
- Use
prop-types
package instead of deprecated React.PropTypes
- Export a higher order component instead of a component.
- Set displayName on component
- Hoist non-react static properties
import Scrollzone from 'react-dnd-scrollzone';
const zone = <Scrollzone />;
import withScrolling from 'react-dnd-scrollzone';
const Scrollzone = withScrolling('div');
const zone = <Scrollzone />;
- Remove
buffer
prop.
- Add
horizontalStrength
and verticalStrength
props.
- Add
createVerticalStrength
and createHorizontalStrength
exports.
- Fix bug with strength calculations and large buffers.
- Fix bug with scrolling not always stopping when drop targets are nested.
import Scrollzone from 'react-dnd-scrollzone';
const zone = <Scrollzone buffer={300} />;
import Scrollzone, { createVerticalStrength, createHorizontalStrength } from 'react-dnd-scrollzone';
const vStrength = createVerticalStrength(300);
const hStrength = createHorizontalStrength(300);
const zone = <Scrollzone verticalStrength={vStrength} horizontalStrength={hStrength} />;