You might want to try using the onresize and
onlocationchange events to make the adjustments.

I believe a LayoutManager is in the making but it you
can create one then that would be cool.

--
Raymond Irving

--- Brian Hayes <[EMAIL PROTECTED]> wrote:
> Hello everyone, I have been at this for about (well
> all night) and I seem to
> be missing something... What am I trying?
>  
> Well, When one layer grows, I need another layer to
> shring accourdingly..
> Plus, if I move one layer I need to other layer to
> move accourdingly..
> Everything I have tried seems to be close, but not
> there... Not to mention
> looking at the code in scrollbar.js, but being a
> little week in math?? Well,
> lets say its not my cup of tee..
>  
> Please help...
>  
> example: 
>  
> ViewWin is my larger Window and ScaleViewerContainer
> is my smaller window..
> The two objects that need to interact are
> ViewLyr[lyrid] where lyrid is the
> layer in focus (larger) and ScaleViewer the smaller
> one.
> -Both of the obove are contained in there parent
> layers ViewWin ->
> ViewLyr[lyrid] and ScaleViewerContainer ->
> ScaleViewer..
>  
>   this.rh =
>
this.ViewWin.getHeight()/this.ScaleViewer.getHeight();
> //ratio
>   this.rw =
> this.ViewWin.getWidth()/this.ScaleViewer.getWidth();
>   this.sw =(this.ViewLyr[lyrid].getWidth() -
> (this.ScaleViewer.getWidth()/this.rw))/this.rw;
>   this.sh =(this.ViewLyr[lyrid].getHeight() -
> (this.ScaleViewer.getHeight()/this.rh))/this.rh;
>  
>   this.nh =  this.ScaleViewerContainer.getHeight() -
> (this.sh-this.ScaleViewer.getHeight());
>   this.nw =  this.ScaleViewerContainer.getWidth() -
> (this.sw-this.ScaleViewer.getWidth());
>   //this.rh =
> this.ViewWin.h/this.ScaleViewerContainer.h; //ratio
>   //this.rw =
> this.ViewWin.w/this.ScaleViewerContainer.w;
>   this.rx = (this.ViewLyr[lyrid].getX()*-1)/this.rw;
>   this.ry = (this.ViewLyr[lyrid].getY()*-1)/this.rh;
>  
> 
>   this.ScaleViewer.setSize(this.nw,this.nh);
>  
>
this.ScaleViewer.setLocation((this.rx/this.rw),(this.ry/this.rh));
>  
> Thanks, Brian Hayes
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to