dennis-learningpool / adapt-slidingPuzzle

An html5 sliding puzzle component
GNU General Public License v3.0
1 stars 1 forks source link

Stop draggability of image. #2

Closed imjosecampos-zz closed 8 years ago

imjosecampos-zz commented 8 years ago

Most users are lazy and generally know what to do with a sliding puzzle which is, as the name says, to slide which right now causes the whole image to be dragged which looks bad, this can be fixed by adding:

img.attr('draggable', 'false');

After line 53 of adapt-slidingPuzzle.js

imjosecampos-zz commented 8 years ago

Also to improve the sliding part of this component the call to attemptMove can be changed to mouse down by changing line 103 to:

'mousedown .slidingPuzzle-puzzle': 'attemptMove',

dennis-learningpool commented 8 years ago

Hi @jscampos - thanks for the suggestions! If you submit these changes as a pull request, I'll happily review and merge.

imjosecampos-zz commented 8 years ago

Done.