hide the selection-frame

6 views
Skip to first unread message

Damian Czichon

unread,
Mar 25, 2010, 6:22:23 AM3/25/10
to javascript-image-cropper-ui, vi...@gmx.de
Hello,

I use the image-cropper in my website too. It works well.

But now, I want to hide the Cropper-Selection-Frame for example, when
an user has clicked at a button.

Have you an idea?

That`s the sourcecode in my html-side:

<script language="javascript" type text="text/javascript">

/*<![CDATA[*/

Event.observe( window, 'load', function() {
new Cropper.Img(
'bilde',
{
ratioDim: {
x: 153,
y: 188
},
displayOnInit: true,
onEndCrop: onEndCrop
}
);
} );

function onEndCrop( coords, dimensions ) {
$( 'x1' ).value = coords.x1;
$( 'y1' ).value = coords.y1;
$( 'x2' ).value = coords.x2;
$( 'y2' ).value = coords.y2;
$( 'width' ).value = dimensions.width;
$( 'height' ).value = dimensions.height;
}
</script>

Greetings from Hanover - Germany
Damian

David Spurr

unread,
Mar 25, 2010, 6:51:10 AM3/25/10
to javascript-image-cropper-ui
Hi Damian,

Calling the cropper.remove() should just work, I'd take a look at the
examples that use that to see if it meets your needs.

-D

On Mar 25, 10:22 am, Damian Czichon <damian.czic...@googlemail.com>
wrote:

Damian Czichon

unread,
Apr 15, 2010, 2:06:02 PM4/15/10
to javascript-im...@googlegroups.com, vi...@gmx.de
Hi David,
 
I have tried to call the cropper.remove()-function, but it didn't work. 
IE says that the object does not exist.
 
The link to my html-page is:
 
There you can upload a picture and select a part of it by using the Cropper-Selection-Frame.
 
Now I want to hide the Cropper-Selection-Frame, when the user has clicked the button "Porträt erstellen".
 
You will find the javascript-code at the end of the sourcecode.
 
Have you an idea ?
 
Thanks a lot!
 
Damian
 
 
 

2010/3/25 David Spurr <david...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "javascript-image-cropper-ui" group.
To post to this group, send email to javascript-im...@googlegroups.com.
To unsubscribe from this group, send email to javascript-image-cr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascript-image-cropper-ui?hl=en.


Reply all
Reply to author
Forward
0 new messages