Skip to content

Commit 57aed74

Browse files
authored
Merge pull request #3470 from paulkaplan/fix-dragging-tiles
Fix dragging tiles
2 parents 133a86a + f6b5253 commit 57aed74

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/components/sprite-selector-item/sprite-selector-item.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const SpriteSelectorItem = props => (
3939
{props.costumeURL ? (
4040
<img
4141
className={styles.spriteImage}
42+
draggable={false}
4243
src={props.costumeURL}
4344
/>
4445
) : null}

src/containers/sprite-selector-item.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class SpriteSelectorItem extends React.Component {
7171
const dy = currentOffset.y - this.initialOffset.y;
7272
if (Math.sqrt((dx * dx) + (dy * dy)) > dragThreshold) {
7373
this.props.onDrag({
74-
img: this.getCostumeUrl(),
74+
img: this.getCostumeData(),
7575
currentOffset: currentOffset,
7676
dragging: true,
7777
dragType: this.props.dragType,

test/unit/components/__snapshots__/sprite-selector-item.test.jsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ exports[`SpriteSelectorItemComponent matches snapshot when given a number and de
3232
</div>
3333
<img
3434
className={undefined}
35+
draggable={false}
3536
src="https://scratch.mit.edu/foo/bar/pony"
3637
/>
3738
<div
@@ -108,6 +109,7 @@ exports[`SpriteSelectorItemComponent matches snapshot when selected 1`] = `
108109
</div>
109110
<img
110111
className={undefined}
112+
draggable={false}
111113
src="https://scratch.mit.edu/foo/bar/pony"
112114
/>
113115
<div

0 commit comments

Comments
 (0)