absolute layers stop overlap

R

ralphJake

hi :}
i have been looking for a script like this for a few weeks now, and i
am finally giving up and asking for help. everything i found involved
preventing overlap in dreamweaver, i want to prevent it in the output
on all of the browsers.
basically i have a page that has absolute layers (cannot be relative)
with the coordinates top/left in the db. but sometimes on certain
pages the layers overlap. I cannot set a static size for those layers.
so i was wondering if anyone has a script, that will check for any
overlapping of layers, and if it overlaps, to move the layer to the
right, or down, until it no-longer overlaps. i can modify anything
similar if you have it.
thank you all in advance for any help you provide.
 
J

Jonas Raoni

hi :}
i have been looking for a script like this for a few weeks now, and i
am finally giving up and asking for help. everything i found involved
preventing overlap in dreamweaver, i want to prevent it in the output
on all of the browsers.
basically i have a page that has absolute layers (cannot be relative)
with the coordinates top/left in the db. but sometimes on certain
pages the layers overlap. I cannot set a static size for those layers.
so i was wondering if anyone has a script, that will check for any
overlapping of layers, and if it overlaps, to move the layer to the
right, or down, until it no-longer overlaps. i can modify anything
similar if you have it.
thank you all in advance for any help you provide.

Take a look and extract some ideas
<URL:http://jsfromhell.com/geral/hittest>, if you have few layers it
will be ok, but if not =O

Depending of what you have, after moving a layer you'll have to re-check
the others too =/

I suggest you to keep a kind of grid layout, like:

layer | x | y
A | 0 | 0
B | 0 | 1

Then it will be easier and faster to do anything =)
 
R

ralphJake

ya the rechecking is what i dreading. i just keep feeling like there
is a better way than that. but that is what i dont know haha.
i originally tried the grid, but its very important that the
coordinates are exact, and a grid will mess that up.
thanks anyway though. if anyone else has any other ideas i would love
to hear them.
 
J

Jonas Raoni

ya the rechecking is what i dreading.

You can sort the layers from left to right/top to bottom, I mean you
should start moving the top items first and then you go down and down...
This will avoid refixing the position of a lot of items.
i originally tried the grid, but its very important that the
coordinates are exact, and a grid will mess that up.

That sounds strange, if the coordinates must be exact, this means you
can't move anything, so what are you doing?!

You should post an url, this is looking confused to me =S
 
R

ralphJake

haha i cant say yet. the project isnt live.
but the coordinates have to be dead-on exact. its a hinderance.
sorting it from left-right, then top-bottom, is probably what ill have
to do, but there is a chance of pushing something into something else,
and i just dont ever see that loop ending in certain circumstances.
The coordinates have to be exact, except in a situation of it
overlapping. and then it needs to keep a similar structure with maybe
+10px right or bottom, until it is no longer overlapping. There are
only like 10 layers i have to worry about, but since the user is
specifying the coordinates, i worry since it will be out of my hands..
to an extent. the auto-readjust of the layers when overlapping, will
almost just be a temporary protection until they go back and fix the
coordinates.
sorry i have to be so secretive, this whole project is under a
non-disclosure agreement.
thanks again :>
 
T

The Magpie

haha i cant say yet. the project isnt live... {snip]
sorry i have to be so secretive, this whole project is under a
non-disclosure agreement.
If that's true, then including suggestions given in a public forum may
breach your agreement, so be careful. You will also need to be sure that
any code you include is not already included in pages or code provided
under any of the GPL variants, since they (by definition) must be
publicly available - including code derived from them.
 
M

marnie8642

well i planned on modifying/rewriting any script i get. i was just
hoping someone else would have a better,more efficient way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top