Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new options: delimiter. This is delimiter area to outers #51

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
imgareaselect
=============

ImgAreaSelect is a jQuery plugin for selecting a rectangular area of an image. It allows web developers to easily implement image cropping functionality, as well as other user interface features, such as photo notes (like those on Flickr).

Basic Usage:
<type="text/javascript" >
$(document).ready(function() {
$('img#photo').imgAreaSelect({
handles: true;
onSelectEnd: alert("Selecionado!");
});
});
33 changes: 33 additions & 0 deletions demo/demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<html>
<head>
<link rel="stylesheet" type="text/css" href="../distfiles/css/imgareaselect-default.css" />
<script src="../distfiles/scripts/jquery.min.js"></script>
<script src="../distfiles/scripts/jquery.imgareaselect.js"></script>


<script type="text/javascript">

$(document).ready(function() {
var ias = $('#photo').imgAreaSelect({
instance:true,
handles: true,
delimiter: "#container-img",
onSelectEnd: function() {
//alert($('#photo').innerWidth() );
},
});
});

</script>
</head>
<body>

<div id="container-img" style="width: 300; height: 300; overflow: hidden; border: 2px dotted red;">
<img id="photo" src="photo.png" />
</div>



</body>

</html>
Binary file added demo/photo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading