ashu patel ashu patel -3 years ago 189
HTML Question

Using jcrop jcrop-tracker's, the width and height are not a same as my image size

here is one of the small problem in using a Jcrop for crop image.
my image size is 870px * 340px but the Jcrop-tracker size is not as same as
my image size.

Below is my crop js:

window.cover_uploaded = (event) ->
if ($('.cover-preview').data('Jcrop'))
JcropAPI = $('.cover-preview').data('Jcrop')
JcropAPI.setSelect([0, 0, 498, 180])

$('.cover-preview').attr("src", event.fpfile.url + "/convert?quality=100")
$('p.hint').css("display", "block")

aspectRatio: 498/180,
boxWidth: 485,
setSelect: [150, 0, 150, 200],
onSelect: getCoordsE,
onChange: getCoordsE

i hope any one can help me out :)

Answer Source

ashvin great question u need to only change Set Select value like below.

setSelect: [0, 0, 870, 340]
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download