andy's php projects
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Script and site usage:
All of the scripts on this site are provided free for non-commerical, personal or non-profit use. If you find these scripts useful to you, appreciate the free support, or are just an all round nice person, then why not donate a little dosh? If you wish to use any of these in a commercial system, please refer to the payment plan.


interactive crop box misaligned in SAFARI

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> Crop Canvas
View previous topic :: View next topic  
Author Message
gdtrfb
Newbie


Joined: 14 Oct 2004
Posts: 4

PostPosted: Thu Oct 14, 2004 8:37 am    Post subject: interactive crop box misaligned in SAFARI Reply with quote

Hey All,

First, WOW! what a great set of classes and tools for working with images. Thanks.

Next the problem...the crop box is misaligned in SAFARI. It sits up and to the left approx 6 or 7 pixels. This misalignment is carried through when doing a crop. That is, the crop location is off by the same 6 or 7 pixels to the right and down.

You can see this by opening the demo page at http://php.amnuts.com/demos/crop-canvas/interactive.php with Safari.

This happens with safari v 1.0 under Jaguar, as well as v 1.2.3 in Panther (10.3.5). Anyone else seeing this? Anyone have any ideas why?

Thanks,
--Mark
Back to top
View user's profile Send private message
gdtrfb
Newbie


Joined: 14 Oct 2004
Posts: 4

PostPosted: Thu Oct 14, 2004 9:05 am    Post subject: followup Reply with quote

Just to followup with a clarification on the symptom listed above...

The problem is further illustrated by attempting to drag the crop box all the way to the right and bottom of the image. Don't resize the box, just drag it all the way over and down. You should notice that the crop box stops a few pixels before the edge of the image.
Back to top
View user's profile Send private message
gdtrfb
Newbie


Joined: 14 Oct 2004
Posts: 4

PostPosted: Thu Oct 14, 2004 6:03 pm    Post subject: Reply with quote

So I tried a couple things and found that the issue seems to be something with the was safari deals with divs and imgs on top of one another. If I switch the crop area from a div as defined in the class to an img that is just the transbg.png file with an appropriate width and height and give it the name = "theCrop" and get rid of theCrop div tag altogether it works fine in Safari and other browsers, except i.e. Now the problem is the layout of the page since Safari wants to make room for an actual image that is the crop box before it gets moved ontop of the image to be cropped.

There must be an easier way...I'm just not as good at the DHTML/Javascript stuff as I should be.
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Fri Oct 15, 2004 10:47 am    Post subject: Reply with quote

Hi, and welcome to the board!

Hmm.. It might have something to do with the borders and cellspacing. If you count up the borders in pixels and cellspacing in pixels it amounts to what the cropping area looks out of place by.

As an experiment, in the code set the borders and cellspacing to 0. Does that help out any?

andy

By the way; if anyone out there wants to buy me a nice new iMac so that I can make sure all my scripts work on a Mac, then I wouldn't kick you outta bed for eatin' cookies, if ya know what I mean? Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
gdtrfb
Newbie


Joined: 14 Oct 2004
Posts: 4

PostPosted: Mon Oct 18, 2004 3:03 pm    Post subject: Reply with quote

Setting borders to 0 didn't help.

Removing everything except the crop area, image, and submit button didn't help.

What did help was adding a margin:0px;padding:0px style to the main <body> tag on the page. Then it all worked. No way to override those page-level settings, though, as far as I can see. Setting margin and padding values anywhere else in the table, div, td, etc just broke it again.

Hmmm....
Back to top
View user's profile Send private message
amnuts
Site Admin


Joined: 01 Sep 2002
Posts: 662
Location: East Sussex, England

PostPosted: Wed Oct 20, 2004 3:17 am    Post subject: Reply with quote

Hmm.. I'll investigate this when I get back to England... On holiday right now in Budapest! Smile (not that you needed to know that, but I enjoy telling everyone! Wink )

I have Safari at work so will be able to test a few things out in a week or so.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    php.amnuts.com Forum Index -> Crop Canvas All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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