Problems with resizing picture script~

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
nones
Forum Newbie
Posts: 1
Joined: Sun Apr 13, 2008 9:14 am

Problems with resizing picture script~

Post by nones »

Hi, I am having problems with a picture resizing script. I am using a drag-resize method, and was hoping to limit the range to only proportionate measures (ex: Picture is 2x4. Would like to limit the range to something like 4x8. Something proportionate. At the moment, it can be 1x8, etc, making the photo either extremely slim, fat, etc)

I gave up, and the so the current script im using is:

form_.style.width = (Event.pointerX(e)+fX-eX)+'px';
form_.style.height = (Event.pointerY(e)+fY-eY)+'px';

I have tried other methods, but nothing seems to work. Sorry if its confusing. Your help would be most appreciated if possible. Thanks in advance.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Problems with resizing picture script~

Post by onion2k »

Moved to clientside.
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Re: Problems with resizing picture script~

Post by JellyFish »

I have some questions about your code.

What is form_, Event.pointerX(), Event.pointerY(), fX and eX? I've never came across any of the pointerX/pointerY methods for the Event object before, are these self-defined?

Could we maybe see some more code?
Post Reply