javascript - How to prevent a save without having cropped an image with imgAreaSelect -



javascript - How to prevent a save without having cropped an image with imgAreaSelect -

i'm using imgareaselect plugin allow users crop image. prevent user hits save button without having cropped image. i'm looking solutation in javascript instead of checking server side if image has been cropped.

from samples in imgareaselect api:

$('img#photo').imgareaselect({ onselectend: function (img, selection) { alert('width: ' + selection.width + '; height: ' + selection.height); } });

just check if selection.width , selection.height > 0

javascript jquery

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -