Skip to content

Commit

Permalink
Fix some more names in draft-js-dnd-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Kniffler committed Mar 31, 2016
1 parent ccd9523 commit 76f769a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions draft-js-dnd-plugin/src/components/block-alignment-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const getDisplayName = (WrappedComponent) => (
);

// Export
export default function WrapComponent(C) {
export default function WrapComponent(WrappedComponent) {
return class Wrapper extends Component {
static displayName = `Decorated(${getDisplayName(C)})`;
static displayName = `Decorated(${getDisplayName(WrappedComponent)})`;
static defaultProps = {
draggable: true,
readOnly: false,
Expand All @@ -26,7 +26,7 @@ export default function WrapComponent(C) {
render() {
const { blockProps } = this.props;
return (
<C {...this.props}
<WrappedComponent {...this.props}
alignment={blockProps.alignment}
align={this.align}
/>
Expand Down
5 changes: 2 additions & 3 deletions draft-js-dnd-plugin/src/components/block-draggable-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ export default function WrapComponent(component, options) {
};

// Handle start-drag and setData with blockKey
startDrag(e) {
const event = e;
startDrag(event) {
const allow = this.props.draggable && !this.props.readOnly;
if (!allow) return;

event.dataTransfer.dropEffect = 'move';
event.dataTransfer.dropEffect = 'move'; // eslint-disable-line no-param-reassign

// Declare data and give info that its an existing key and a block needs to be moved
event.dataTransfer.setData('text', `${DRAFTJS_BLOCK_KEY}:${this.props.block.key}`);
Expand Down
4 changes: 2 additions & 2 deletions draft-js-dnd-plugin/src/components/dnd-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ export default function WrapComponent(WrappedComponent, plugin) {
this.setState({ isDragging: false });
};

onProgress = (e) => {
this.setState({ progress: e, isDragging: false });
onProgress = (event) => {
this.setState({ progress: event, isDragging: false });
};

render() {
Expand Down

0 comments on commit 76f769a

Please sign in to comment.