Skip to content

Commit

Permalink
Remove dead JS.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed Jun 23, 2020
1 parent 3e26108 commit bac44fd
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions packages/components/src/draggable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { withSafeTimeout } from '@wordpress/compose';

const dragImageClass = 'components-draggable__invisible-drag-image';
const cloneWrapperClass = 'components-draggable__clone';
const cloneHeightTransformationBreakpoint = 700;
const clonePadding = 0;

class Draggable extends Component {
Expand Down Expand Up @@ -116,22 +115,11 @@ class Draggable extends Component {
elementRect.width + clonePadding * 2
}px`;

if ( elementRect.height > cloneHeightTransformationBreakpoint ) {
// Scale down clone if original element is larger than 700px.
this.cloneWrapper.style.transform = 'scale(0.5)';
this.cloneWrapper.style.transformOrigin = 'top left';
// Position clone near the cursor.
this.cloneWrapper.style.top = `${ event.clientY - 100 }px`;
this.cloneWrapper.style.left = `${ event.clientX }px`;
} else {
// Position clone right over the original element (20px padding).
this.cloneWrapper.style.top = `${
elementTopOffset - clonePadding
}px`;
this.cloneWrapper.style.left = `${
elementLeftOffset - clonePadding
}px`;
}
// Position clone right over the original element (20px padding).
this.cloneWrapper.style.top = `${ elementTopOffset - clonePadding }px`;
this.cloneWrapper.style.left = `${
elementLeftOffset - clonePadding
}px`;

/*
* __experimentalDragComponent
Expand Down

0 comments on commit bac44fd

Please sign in to comment.