# HG changeset patch # User Atul Varma # Date 1259384816 18000 # Node ID d56f9cc6f69984e172546916d9344fc47ec3d0b2 # Parent cd71f59b38f45341e054bc61e51f8979ed1235e4 added 'css' entry to cropper diff -r cd71f59b38f4 -r d56f9cc6f699 cropper.css --- a/cropper.css Fri Nov 27 23:39:25 2009 -0500 +++ b/cropper.css Sat Nov 28 00:06:56 2009 -0500 @@ -20,6 +20,8 @@ #thumbnails { float: left; + width: 100px; + height: 100px; } #pics { diff -r cd71f59b38f4 -r d56f9cc6f699 cropper.html --- a/cropper.html Fri Nov 27 23:39:25 2009 -0500 +++ b/cropper.html Sat Nov 28 00:06:56 2009 -0500 @@ -6,13 +6,15 @@ Picture Cropper -
 
url
json
- + +
css
+
+
 
@@ -33,6 +35,11 @@ iface.selectableImage.addObserver("selection-changed", function() { var selection = iface.selectableImage.getSelection(); $("#json").val(JSON.stringify(selection)); + var cssParts = [selection.top, + selection.left + selection.width, + selection.top + selection.height, + selection.left]; + $("#css").val("rect(" + cssParts.join(", ") + ")"); }); } @@ -44,7 +51,6 @@ iface.selectableImage.setSelection(sel); } - $("#thumbnails").width($("#form").height()); $("#form").submit(function(evt) { evt.preventDefault(); }); $("#url").change(newInterface); $("#json").change(newSelection);