|
-
April 18th, 2010, 02:03 AM
#1
Looking for help with Drag and Drop script
Hello!
I'm using Walter Zorn's Drag & Drop script on my page: http://www.accentironwork.com/railings%20design.html
The script works just fine. But there is a problem when the visitors are trying to print out their design. All "draggble" elements are getting shifted in relation to the rest of the page (try to move "draggble" elements, and then go to Print Preview to see what happens).
The page layout is centered on the screen:
#maincontainer{margin: 0 auto; /*Center container on page*/}
Drag & Drop script recalculates positions of elements from the Top Left corner.
If I change margin to left, than everything prints out just fine, without shifting.
I'd like to keep my page layout centered on the screen and I know nothing about Java programming. How to make necessary changes to the Drag & Drop script to achieve proper page printing?
Drag & Drop script path:
http://www.accentironwork.com/Drag-Drop/wz_dragdrop.js
CCS path:
http://www.accentironwork.com/css/globalstyles.css
Thanks in advance!
-
April 18th, 2010, 07:25 AM
#2
Re: Looking for help with Drag and Drop script
Remember that a printer cannot just print the same resolution as a large monitor. So, if you make your page width dimensions smaller, you won't have the problem.
To see what I mean...shrink the width of the window just before printing. You'll have to grab the rails before doing so, since you've statically placed them. Notice that it stays in the right rung.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
April 18th, 2010, 03:32 PM
#3
Re: Looking for help with Drag and Drop script
I know that... Changing the printing scale will do the same effect. The simpler way is to use Print Screen button. But it still doesn't solve my problem. From the visitors view point the site has to be print friendly. They should be able to print out what they see on the screen with out any brain damage.
And the only way to do it is to modify Drag and Drop script, so it will calculate position of the elements from the center of the page, so it will match CSS page layout. That way all coordinates will be taken from the same origin, and user's screen resolution or print setting will not shift one element in relation from another.
Can any body help me with that?
Thanks.
Last edited by yuritnt; April 18th, 2010 at 03:45 PM.
-
April 18th, 2010, 04:00 PM
#4
Re: Looking for help with Drag and Drop script
 Originally Posted by yuritnt
From the visitors view point the site has to be print friendly.
Which is why you need a version that is not as wide. Just create a printer-friendly URL like all major sites do.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|