Also,

        To see the below imageobject.js in action,
http://www.keyout.com/keyout/test.cfm, this dynapi.document uses this for
all images, and a ton of event listeners.. Which I found to be a good way to
keep the code in order. Plus the load manager for the navigation... With a
line of code to alter the data that you load in. To include the drageevent
issue, when the layer is inside a smaller layer.. 

...please let me know your thoughts...

Brian Hayes 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Brian Hayes
Sent: Tuesday, September 30, 2003 8:56 AM
To: [EMAIL PROTECTED]
Subject: RE: [Dynapi-Help] Setting the scale for one object based on
another.

Raymond,

        This is not a LayoutManager, but it does offer a way to embed an
image into a layer, and allows the image to react to changes to that layer..
Example, if you resize your layer, your image will resize as well.. Plus, I
added your slideTo function, and created a GrowTo function that slides and
grows similar to the slideTo function and a simpler Grow function that just
grows the layer/Image accourdingly.... Please let me know your thoughts...
[EMAIL PROTECTED] 

http://www.keyout.com/keyout/lib/js/dynapi3x/src/fx/zoomMX/imageobject.js
<for everyone who has help me, thank you!>

As to the below, I am working on this, and I do have a working model, but it
is not where I want it to be... What I belive to be a good way of doing this
is to pass another object into the imageobject.js, and have them react to
each other based on their sizes.. So, if one layer grows, have the other
layer shrink or grow, it on layer moves, have the other move in the same
direction or oposite direction, etc... What do you think? Something like,

Var Lyr1 = new ImageObject(null,0,0,100,100,null,{ImageSrc:'/img1.jpg'});
Var Lry2 = new ImageObject(null,0,0,400,400,null,{ImageSrc:'/img2.jpg'});

Lry2.setReactTo(Lry1,{react:false,ratio:1.5}); //When Lry1
moves,grows,shrinks react to it, in the same direaction by default..
Lry1.setReactTo(Lry2,{react:false,ratio:1.5}); //When Lry2
moves,grows,shrinks react to it, in the same direaction by default..

// {react:false} //causes the two layers to react opposite of each other..
/ratio:1.5 //is the factor in wich to react to each other..

What do you think?


Thanks,

        Brian Hayes

 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Raymond Irving
Sent: Monday, September 29, 2003 10:05 AM
To: [EMAIL PROTECTED]
Subject: Re: [Dynapi-Help] Setting the scale for one object based on
another.


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




-------------------------------------------------------
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




-------------------------------------------------------
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