View previous topic :: View next topic |
Author |
Message |
houdain_lemagicien Newbie
Joined: 20 Nov 2005 Posts: 2
|
Posted: Tue Nov 22, 2005 8:29 pm Post subject: can't do exactly what i want |
|
|
Hi,
I've put what is it about on theis page
http://assogtr.free.fr
First picture : (what i did)
I've put the resizable sqare scalable in the SET_DHTML.
I would like to be allowed to resize 'theCrop' (name in my javascript code) whith the mouse (not with Shift) and let appear a little square on the right bottom (like it is on second picture)
Please have a look to the source code of the page.
the file transbg.png ('theCrop' definition) is never loaded. Why ?
I also would like 'theCrop' to be at least of 80px*100px. How could I fix it ?
Thanks for your help |
|
Back to top |
|
 |
amnuts Site Admin

Joined: 01 Sep 2002 Posts: 662 Location: East Sussex, England
|
Posted: Wed Nov 23, 2005 9:14 am Post subject: Re: can't do exactly what i want |
|
|
Hi, and welcome to the board!
houdain_lemagicien wrote: | I would like to be allowed to resize 'theCrop' (name in my javascript code) whith the mouse (not with Shift) and let appear a little square on the right bottom (like it is on second picture) |
The best resource for this would probably be Waltern Zorn's page. He's the creator of the drag/drag javascript library which I use and has many examples on his site on how to do this with his javascript.
http://www.walterzorn.com/dragdrop/dragdrop_e.htm
http://www.walterzorn.com/dragdrop/demos/sizegrip.htm
That second link might specifically interest you.
houdain_lemagicien wrote: | Please have a look to the source code of the page. the file transbg.png ('theCrop' definition) is never loaded. Why ? |
A couple reasons, perhaps... 1) The tansbg.png file seems to be corrupted, as I get this message when trying to view the file directly:
Quote: | The image ?http://assogtr.free.fr/transbg.png? cannot be displayed, because it contains errors. |
2) Even though I'm viewing on Firefox, the Microsoft PNG transparency hack is still being rendered in the HTML, which shouldn't happen. This might cause problems in the disply of the PNG if you're using a non-IE browser.
houdain_lemagicien wrote: | I also would like 'theCrop' to be at least of 80px*100px. How could I fix it ? |
Use the setCropDefaultSize and setCropMinSize methods to set the absolute minimum size the crop area could be (80x100) and the default size of the crop (which if not set is a proportion of the image size).
Andy |
|
Back to top |
|
 |
houdain_lemagicien Newbie
Joined: 20 Nov 2005 Posts: 2
|
Posted: Wed Nov 23, 2005 11:05 pm Post subject: Can't do it by myself |
|
|
Hi,
thanks for your help,
I've tried several times to adapt my code with what i found here http://www.walterzorn.com/dragdrop/demos/sizegrip.htm
But it's not working. I've uploaded on the adress http://assogtr.free.fr
what i've down.
Now i can resize theCrop with shift (scalable) or the resizehandle (resizable) but i can't force the resizehandle to be on the bottom right of the crop. And i didn't found how to do to force the resize to be scalable when i resize with the resizehandle
I've tried several times.
I also found this pixel (http://assogtr.free.fr/transparentpixel.gif
for the transparency, but it's not working neither. That's weird cause i've adapted the code of this page where the .png file works fine.
http://php.amnuts.com/demos/crop-canvas/interactive.php
I hope you can help me with this, I suck at javascript
Thanks |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|