scottgwald / wear-connect

wear connect
1 stars 1 forks source link

fix image cropping coordinates #1

Closed minakhan01 closed 10 years ago

minakhan01 commented 10 years ago

See cropper.js in mobile_touch_fixed branch. I think that we have to fix the coordinates for image cropping in line 454. @scottgwald , could you give me some suggestions for the coordinates? I have tried a couple and none of the seem to work. you can see the coordinates I have tried in lines 455-458 that I have commented out. Thanks :)

minakhan01 commented 10 years ago

I spent almost three days on the code to figure out what was wrong and it turns out that the problem was because the size of the image (in pixel) was hard-coded in the code. When we used a test image with a different size, functions like actualToPixelPos() were getting messed up. Tagging coordinates now work fin on tablet and cell phone as long as image size (in pixels, i.e. variables pixelImageWidth & pixelImageHeight in cropper.js) have the right values.