473,466 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Pic and Viewport design question

I'd like to have a pic (.jpg - think Map) on a page
and a 'viewport' onto that pic, either of whose sizes
I could alter by appropriately dragging the element
(using, for example, code from the excellent site
http://www.walterzorn.com/dragdrop/dragdrop_e.htm)

My question is: What is the best design structure
for this? Is it an image (in a div), and a second
div which will be the viewport (where the div is
transparent) AND

(idea A) The div's borders are opaque, extending to
the edges of the page/frame or ...

(idea B) The div doesn't have fat borders but there
are 4 (two vertical strips, and a top and bottom
stub) opaque divs outside it which readjust their
size whenever the viewport div changes size or
position. (Seems like this is easier to program)

Or some whole other approach?

Thanks for any tips,
Csaba Gabor from Vienna
Jul 23 '05 #1
12 1409
Csaba Gabor wrote:
I'd like to have a pic (.jpg - think Map) on a page
and a 'viewport' onto that pic, either of whose sizes
I could alter by appropriately dragging the element
(using, for example, code from the excellent site
http://www.walterzorn.com/dragdrop/dragdrop_e.htm)


Let me understand -- you want the item to have
drag-and-resize-and-drop
AND an image map that also resizes?


Jul 23 '05 #2
mbstevens wrote:
Csaba Gabor wrote:
I'd like to have a pic (.jpg - think Map) on a page
and a 'viewport' onto that pic, either of whose sizes
I could alter by appropriately dragging the element


Let me understand -- you want the item to have drag-and-resize-and-drop
AND an image map that also resizes?


I'm not interested in the drop part (don't want to drop
objects onto other items). I do want to be able to
resize each independently and to place (drag) them
independently. The way I'm intending this is to
have a control panel for when size/placement is being
set. One could either put in numbers there (or select
'Fit to window', etc.) or go directly to the
image/viewports and adjust them visually.

Csaba
Jul 23 '05 #3
mbstevens wrote:
Csaba Gabor wrote:
I'd like to have a pic (.jpg - think Map) on a page
and a 'viewport' onto that pic, either of whose sizes
I could alter by appropriately dragging the element


AND an image map that also resizes?

Oops, forgot to add that they're not image maps. The
..jpg/.png pics are of traditional (the kind they had
before computers) maps.
Jul 23 '05 #4
Csaba Gabor wrote:
mbstevens wrote:
Csaba Gabor wrote:
I'd like to have a pic (.jpg - think Map) on a page
and a 'viewport' onto that pic, either of whose sizes
I could alter by appropriately dragging the element


AND an image map that also resizes?

Oops, forgot to add that they're not image maps. The
.jpg/.png pics are of traditional (the kind they had
before computers) maps.


Seems you should just download the library and make
modifications a few lines at a time until you have
exactly what you want.

"Experiment with it!"
Dr. Von Frankenstein, 1878

If the pages are to be used for anything other than their
limited entertainment value you should avoid this kind of
DHTML; it's not accessible to anyone without javascript
turned on. Your time would be better spent learning
server side languages like Perl or PHP.
Jul 23 '05 #5
mbstevens wrote:
mbstevens wrote:
Csaba Gabor wrote:

I'd like to have a pic (.jpg - think Map) on a page
and a 'viewport' onto that pic, either of whose sizes
I could alter by appropriately dragging the element

Seems you should just download the library and make
modifications a few lines at a time until you have
exactly what you want.


I've already written the control panel, but I have
it with tables (this allowed a quick and easy way to
align the image/viewport left, right, center, top, middle,
bottom on the first coding pass) and would prefer to
redo this without the tables. Method B that I mentioned
in my first post (surrounding the viewport with 4 divs)
seems to be the simplest way to go, but this is where
all the purists (and anyone else who wants) get to have
their say in my initial design - specifically, the
architecture. I'm not so worried about puzzling out the
actual mechanics.
If the pages are to be used for anything other than their
limited entertainment value you should avoid this kind of
DHTML; it's not accessible to anyone without javascript
turned on. Your time would be better spent learning
server side languages like Perl or PHP.


Everything can be accomplished from the control panel.
All that dragging about and resizing will update the
control panel's values, and that is what gets submitted.
The PHP end is well covered, too.
Jul 23 '05 #6
Csaba Gabor wrote:
I've already written the ..........


Post the prototype and let everyone look at it.
Can't tell what you're talking about without it.
Jul 23 '05 #7
mbstevens wrote:
Csaba Gabor wrote:
I've already written the ..........


Post the prototype and let everyone look at it.
Can't tell what you're talking about without it.


I should have said, post a *link* to the working
prototype.

Jul 23 '05 #8
Csaba Gabor wrote:
http://www.walterzorn.com/dragdrop/dragdrop_e.htm


Now, that's quite nifty.

/me wonders if you could use the Javascript cookie stuff to save each
element's position and keep it there for the next visit...

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jul 23 '05 #9
Csaba Gabor wrote:
I'd like to have a pic (.jpg - think Map) on a page
and a 'viewport' onto that pic, either of whose sizes
I could alter by appropriately dragging the element
(using, for example, code from the excellent site
http://www.walterzorn.com/dragdrop/dragdrop_e.htm)

My question is: What is the best design structure
for this? Is it an image (in a div), and a second
div which will be the viewport (where the div is
transparent) AND

(idea A) The div's borders are opaque, extending to
the edges of the page/frame or ...

(idea B) The div doesn't have fat borders but there
are 4 (two vertical strips, and a top and bottom
stub) opaque divs outside it which readjust their
size whenever the viewport div changes size or
position. (Seems like this is easier to program)

Or some whole other approach?

Thanks for any tips,
Csaba Gabor from Vienna

Is this what you want? Large map but a small window is visible and you
drag the mouse around to see other parts of the map that are initially
hidden.

There is one free utility I've seen for viewing large images that lets
you zoom in and the new detail loads then only so you don't have to load
the whole thing in the beginning. Once zoomed, you can pan around. I
don't recall the name of it.

Lizardtech makes a similar product that requires their plugin to view so
it's less helpful.
Jul 23 '05 #10
paul wrote:
Csaba Gabor wrote:
I'd like to have a pic (.jpg - think Map) on a page
and a 'viewport' onto that pic, either of whose sizes
I could alter by appropriately dragging the element
(using, for example, code from the excellent site
http://www.walterzorn.com/dragdrop/dragdrop_e.htm)
Is this what you want? Large map but a small window is visible and you
drag the mouse around to see other parts of the map that are initially
hidden.


Yes, that is what I want to write. That will be one of its uses.
There is one free utility I've seen for viewing large images that lets
you zoom in and the new detail loads then only so you don't have to load
the whole thing in the beginning. Once zoomed, you can pan around. I
don't recall the name of it.


If you ever do, please drop a note.
Thanks,
Csaba

I have started to do the implementation, and earlier today posted
a rough draft of what the basic viewport mechanism would be (in
comp.lang.javascript, title: Viewport example). The code was quite
straightforward, even after fixing the IE bug that I mention in the post.
Jul 23 '05 #11


Csaba Gabor wrote:
paul wrote:
Csaba Gabor wrote:
I'd like to have a pic (.jpg - think Map) on a page
and a 'viewport' onto that pic, either of whose sizes
I could alter by appropriately dragging the element
(using, for example, code from the excellent site
http://www.walterzorn.com/dragdrop/dragdrop_e.htm)
Is this what you want? Large map but a small window is visible and you
drag the mouse around to see other parts of the map that are initially
hidden.

Yes, that is what I want to write. That will be one of its uses.
There is one free utility I've seen for viewing large images that lets
you zoom in and the new detail loads then only so you don't have to
load the whole thing in the beginning. Once zoomed, you can pan
around. I don't recall the name of it.

If you ever do, please drop a note.

I see a few options here:
<http://www.google.com/search?hl=en&lr=&q=large+image+pan+and+zoom+web+pa ge&btnG=Search>

Thanks,
Csaba

I have started to do the implementation, and earlier today posted
a rough draft of what the basic viewport mechanism would be (in
comp.lang.javascript, title: Viewport example). The code was quite
straightforward, even after fixing the IE bug that I mention in the post.

Jul 23 '05 #12
Csaba Gabor wrote:
paul wrote:
Csaba Gabor wrote:
I'd like to have a pic (.jpg - think Map) on a page
and a 'viewport' onto that pic, either of whose sizes
I could alter by appropriately dragging the element
(using, for example, code from the excellent site
http://www.walterzorn.com/dragdrop/dragdrop_e.htm)
Is this what you want? Large map but a small window is visible and you
drag the mouse around to see other parts of the map that are initially
hidden.

Yes, that is what I want to write. That will be one of its uses.
There is one free utility I've seen for viewing large images that lets
you zoom in and the new detail loads then only so you don't have to
load the whole thing in the beginning. Once zoomed, you can pan
around. I don't recall the name of it.

If you ever do, please drop a note.

Here you go:
http://www.haltadefinizione.com/photo.php

Zoomify is the utility:
http://www.zoomify.com
Thanks,
Csaba

I have started to do the implementation, and earlier today posted
a rough draft of what the basic viewport mechanism would be (in
comp.lang.javascript, title: Viewport example). The code was quite
straightforward, even after fixing the IE bug that I mention in the post.

Jul 23 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Warren Post | last post by:
Here's a problem I've never seen before. On <http://snow.prohosting.com/srcopan/anti/>, should the viewport width be less than the width of the page's header, then the right margin becomes stuck...
2
by: tomasio | last post by:
dear group, as nobody answered my recent posts (maybe they were too complicated) i just ask you to help me on a rather simple issue: how can i stretch divs to the full height of the viewport (in...
5
by: Tyler Carver | last post by:
I've tried to get CSS to give me a basic layout where I can place a footer at the bottom of the page and the top of the page I can use for content. I don't however want the footer to pull away...
2
by: Rob McKenna | last post by:
Greetings, This is my first foray into CSS and indeed my first website in general. My goal is to use a liquid(ish) design, no javascript and no tables for layout positioning. Rather foolishly I...
4
by: john | last post by:
Hi to All, I am new to html authoring, so sorry if my terminology is not correct or exact. I would like to position a footer div to the bottom of the browser window. As I research in the web...
1
by: Jake Barnes | last post by:
I searched comp.lang.javascript on Google Groups but I didn't find an answer when I searched for "viewport" or "viewport div" or any combination of words using "viewport" so now I think I'm...
6
by: 123shailesh | last post by:
Hello everyone, I need some help. I have been working on it for some time but havent been able to think of any solution. Even had thought of making do without it, even though it was a major part...
3
by: Joel Hedlund | last post by:
Hi! I've raised this issue on #pygtk and #gtk+ but with no luck. I haven't been able to solve this even with aid of google, the pygtk reference and the gtk C source, so pretty please help? ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.