setSelect bug when calling setOptions

39 views
Skip to first unread message

Richard

unread,
Oct 20, 2010, 7:20:38 PM10/20/10
to Jcrop Development Discussion
Greetings,

I'm working on a project that uses Jcrop 0.9.8 and I (think) I found a
bug in the api function setOptions when specifying a setSelect array.
Calling "jcropAPIobj.setOptions({ setSelect: <array of size 4 built
from onChange coords object> })" results in the following error on
line 1030: "TypeError: Cannot read property '0' of undefined"

I traced through the Jcrop code and I seem to have found the culprit:
in the unminified version, Line 1110, instead of it being
"setSelect(opt.setSelect)", it should be
"setSelect(options.setSelect)".

Doing the above change made setSelect behave normally.

Just figured I'd post here at let y'all know. Didn't see a previous
post mentioning this, so I figured I'd post it in case anyone else was
having this problem.

Thanks.
Reply all
Reply to author
Forward
0 new messages