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

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

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