You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(83) |
Nov
(319) |
Dec
(441) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(617) |
Feb
(784) |
Mar
(426) |
Apr
(363) |
May
(489) |
Jun
(396) |
Jul
(405) |
Aug
(146) |
Sep
(97) |
Oct
(146) |
Nov
(348) |
Dec
(99) |
2002 |
Jan
(69) |
Feb
(92) |
Mar
(58) |
Apr
(33) |
May
(29) |
Jun
(45) |
Jul
(72) |
Aug
(71) |
Sep
(47) |
Oct
(19) |
Nov
(48) |
Dec
(55) |
2003 |
Jan
(23) |
Feb
(73) |
Mar
(42) |
Apr
(52) |
May
(64) |
Jun
(155) |
Jul
(169) |
Aug
(103) |
Sep
(113) |
Oct
(118) |
Nov
(46) |
Dec
(30) |
2004 |
Jan
(19) |
Feb
(24) |
Mar
(40) |
Apr
(13) |
May
(35) |
Jun
(1) |
Jul
(23) |
Aug
(3) |
Sep
(31) |
Oct
(31) |
Nov
(26) |
Dec
|
2005 |
Jan
(5) |
Feb
(4) |
Mar
(3) |
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(23) |
Sep
(9) |
Oct
(5) |
Nov
(2) |
Dec
(1) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Brian H. <bg...@ke...> - 2003-10-01 01:25:21
|
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: dyn...@li... [mailto:dyn...@li...] On Behalf Of Brian Hayes Sent: Tuesday, September 30, 2003 8:56 AM To: dyn...@li... 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... bg...@ke... 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: dyn...@li... [mailto:dyn...@li...] On Behalf Of Raymond Irving Sent: Monday, September 29, 2003 10:05 AM To: dyn...@li... 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 <bg...@ke...> 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 Dyn...@li... 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 Dyn...@li... https://lists.sourceforge.net/lists/listinfo/dynapi-help |
From: Raymond I. <xw...@ya...> - 2003-09-30 21:00:41
|
What's the code to stop context menu, but still allow capturing of right click? -- Raymond Irving --- Doug Melvin <do...@cr...> wrote: > Okay.. I should check all message before ranting.. > :-) > See this: > http://www.faqts.com/knowledge_base/view.phtml/aid/5693/fid/126 > > **Note to developers** > in Dynapi 2.x we had built in function to stop > context menu, but still allow > capturing of right click.. > Can we add that back in for 3.x? > > > ----- Original Message ----- > From: "Brian Pedersen" <bas...@ya...> > To: <dyn...@li...> > Sent: Tuesday, September 30, 2003 2:04 PM > Subject: Re: [Dynapi-Help] Rightclick events: bug > noted > > > > Hi Doug > > > > Thanks anyhow, you got me on the right track. > > Implementing your listener with a different > condition works perfect, at > least in > > MSIE 5.5: > > > > ondragstart:function(e){ > > if(event.button==2||event.button==3){ > > e.cancelDrag(); > > } > > } > > > > As my fix probably aint browsersafe, Im still > looking forward to the > bugfix > > though. > > > > For now I just need to figure out how to avoid the > default browser > contextmenu. > > > > Regards > > Brian Pedersen > > > > --- Doug Melvin <do...@cr...> > skrev: > the following > _should_ > > work but does not under IE 6. > > > > > > lyr.addEventListener({ > > > ondragstart:function(e){ > > > status=e.getButton(); > > > if(e.getButton() == "right"){ > > > e.cancelDrag(); > > > } > > > } > > > }); > > > > > > when in the ondragstart event, in the > mouse_ie.js:MouseEvent.getButton() > > > returns left always. > > > Through debugging I noteied the the error > condition on line: 26 "if > > > (!this._mouseEvent) return "ouch";" (I added the > "ouch") > > > always returns "ouch" > > > > > > Works normally inside of a onclick event. > (returns left, middle or > right) > > > > > > Same deal in NS 4x, works correctly in onclick > event, but executes error > > > code in ondragstart event at: > > > line 26 in mouse_ns4.js:getButton() "if > (!this._browserEvent) return > > > "ouch";" (i added the ouch) > > > > > > Mozilla 1.x: Same deal again.. > > > > > > It seems obvious to me that this is a bug in the > common base of the > > > dragevents scheme.. > > > > > > I am at work right now, and have no intoernet at > home. > > > Someone else will have to fix this if we want it > fixed in the near > future. > > > ----- Original Message ----- > > > From: "Brian Hayes" <bg...@ke...> > > > To: <dyn...@li...> > > > Sent: Tuesday, September 30, 2003 5:49 AM > > > Subject: RE: [Dynapi-Help] Rightclick events > > > > > > > > > > Here is what I did, but there may be a better > way.. > > > > > > > > onclick : function(e) { > > > > if(e.getButton() == 'left'){ //Netscape fix, > > > > onclick to make sure only the left button > > > > //Do Something.. > > > > } > > > > }, > > > > > > > > Brian Hayes > > > > > > > > Hi > > > > > > > > First let me say that I am crazy about the > eventmodel in the dynapi, > > > > attaching > > > > eventlisteners to a DynLayer instead of making > global eventlistener > makes > > > > everything so much easyer. > > > > > > > > I do have one problem, though: > > > > I have a DHTML applikation resempling a > windows desktop with movable > > > icons. > > > > Rigthclicking these icons should bring up a > contextmenu. > > > > > > > > My problem is that rightclicking the icon > makes it dragable, which is > not > > > my > > > > intention, only when leftclicking should it > become dragable. > > > > > > > > I would also like to ensure that the default > browser contextmenu never > > > > appears, > > > > this is usually done in a traditional > eventlistener by returning > false: > > > > > > > > document.onmousedown=function(){ > eventListener(event);return false; } > > > > function eventListener(e){ > > > > if(event.button==2||event.button==3) { > > > > alert('Contextmenu activated'); > > > > } > > > > return false; > > > > } > > > > > > > > How can I ensure that the layer only becomes > dragable when > leftclicking > > > and > > > > how > > > > can I disable the default browser contextmenu > ? > > > > > > > > This is my code: > > > > <html> > > > > <head> > > > > <title>Simple test</title> > > > > <script language="JavaScript" > src="js/dynapi/dynapi.js"></script> > > > > <script language="Javascript"> > > > > dynapi.library.setPath('js/dynapi/'); > > > > dynapi.library.include('dynapi.api'); > > > > > dynapi.library.include('dynapi.api.ext.DragEvent'); > > > > dynapi.library.include('dynapi.fx.MotionX'); > > > > dynapi.library.include('FocusManager'); > > > > dynapi.library.include('BorderManager'); > > > > </script> > > > > <script language="Javascript"> > > > > > > > > var icon1=new > DynLayer(null,25,25,32,32,null,'images/icon1.gif'); > > > > > > > > icon1.setID("icon1"); > > > > icon1.makeSolid(); > > > > icon1.setFocus('auto',true,'hover'); > > > > DragEvent.enableDragEvents(icon1); > > > > > > > > icon1.addEventListener({ > > > > onmousedown:function(e){ > > > > var o=e.getSource(); > > > > if(event.button==2||event.button==3){ > > > > alert('Contextmenu activated'); > > > > } > > > > }, > > > > onmouseover:function(e){ > > > > var o=e.getSource(); > > > > o.setInnerBorder(1); > > > > }, > > > > onmouseout:function(e){ > > > > var o=e.getSource(); > > > > o.setInnerBorder(0); > > > > } > > > > }); > > > > > > > > dynapi.document.addChild(icon1); > === message truncated === __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
From: <bas...@ya...> - 2003-09-30 18:23:37
|
Hi Doug No offence but my mail starts with 'Hi Brian' and was in reply to a mail from Brian Hayes. I have also sent a reply to you in which I thank you for your reply and aknowledge the quality of the content. So as you hopefully might have noticed, I have read the code :) Thanks again Brian Pedersen --- Doug Melvin <do...@cr...> skrev: > there is a bug in the mouse events that makes my code not work. > the idea is whena drag starts (ondragstart) check if the user is clicking > the left button (you wanted drag on left button no?) > it the user is NOt using the left buttont hen cancel the drag (prevents > dragging). > > If you want drag on right and not left the yes, change "left" to "right".. > > but again.. While I know that my code does not fix your problem, this is due > only to a bug. > > I mainly posted the code and info so that other developers will know of the > bug and maybe fix it.. > > > At any rate.. you may also try putting my code in a onmousedown event > instead of dragstart. > > And as always.. READ THE CODE.. > It's not too hard to open up the mouse_x.js or the dragevent.js code and see > how it works.. > > ----- Original Message ----- > From: "Brian Pedersen" <bas...@ya...> > To: <dyn...@li...> > Sent: Tuesday, September 30, 2003 1:51 PM > Subject: RE: [Dynapi-Help] Rightclick events > > > > Hi Brian > > > > I appreciate your answer, but i am not quite sure as how to interpret it: > > > > Inserting your code appearently does not solve any of the two problems > described. > > > > > > As leftclicking is allready handled by DragEvent.enableDragEvents(icon1) I > would > > have to change 'left' in your code to 'right', which should have the same > effect > > as my onmousedown handler, but actually does not work at all. > > > > Did I miss something ? > > > > Regards > > Brian Pedersen > > > > > > --- Brian Hayes <bg...@ke...> skrev: > Here is what I did, but > there may > > be a better way.. > > > > > > onclick : function(e) { > > > if(e.getButton() == 'left'){ //Netscape fix, > > > onclick to make sure only the left button > > > //Do Something.. > > > } > > > }, > > > > > > Brian Hayes > > > > > > Hi > > > > > > First let me say that I am crazy about the eventmodel in the dynapi, > > > attaching > > > eventlisteners to a DynLayer instead of making global eventlistener > makes > > > everything so much easyer. > > > > > > I do have one problem, though: > > > I have a DHTML applikation resempling a windows desktop with movable > icons. > > > Rigthclicking these icons should bring up a contextmenu. > > > > > > My problem is that rightclicking the icon makes it dragable, which is > not my > > > intention, only when leftclicking should it become dragable. > > > > > > I would also like to ensure that the default browser contextmenu never > > > appears, > > > this is usually done in a traditional eventlistener by returning false: > > > > > > document.onmousedown=function(){ eventListener(event);return false; } > > > function eventListener(e){ > > > if(event.button==2||event.button==3) { > > > alert('Contextmenu activated'); > > > } > > > return false; > > > } > > > > > > How can I ensure that the layer only becomes dragable when leftclicking > and > > > how > > > can I disable the default browser contextmenu ? > > > > > > This is my code: > > > <html> > > > <head> > > > <title>Simple test</title> > > > <script language="JavaScript" src="js/dynapi/dynapi.js"></script> > > > <script language="Javascript"> > > > dynapi.library.setPath('js/dynapi/'); > > > dynapi.library.include('dynapi.api'); > > > dynapi.library.include('dynapi.api.ext.DragEvent'); > > > dynapi.library.include('dynapi.fx.MotionX'); > > > dynapi.library.include('FocusManager'); > > > dynapi.library.include('BorderManager'); > > > </script> > > > <script language="Javascript"> > > > > > > var icon1=new DynLayer(null,25,25,32,32,null,'images/icon1.gif'); > > > > > > icon1.setID("icon1"); > > > icon1.makeSolid(); > > > icon1.setFocus('auto',true,'hover'); > > > DragEvent.enableDragEvents(icon1); > > > > > > icon1.addEventListener({ > > > onmousedown:function(e){ > > > var o=e.getSource(); > > > if(event.button==2||event.button==3){ > > > alert('Contextmenu activated'); > > > } > > > }, > > > onmouseover:function(e){ > > > var o=e.getSource(); > > > o.setInnerBorder(1); > > > }, > > > onmouseout:function(e){ > > > var o=e.getSource(); > > > o.setInnerBorder(0); > > > } > > > }); > > > > > > dynapi.document.addChild(icon1); > > > </script> > > > </head> > > > <body> > > > <script> > > > dynapi.document.insertAllChildren(); > > > </script> > > > </body> > > > </html> > > > > > > Regards > > > Brian Pedersen > > > > > > Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, > spamfilter > > > og virusscan > > > > > > > > > ------------------------------------------------------- > > > This sf.net email is sponsored by:ThinkGeek > > > Welcome to geek heaven. > > > http://thinkgeek.com/sf > > > _______________________________________________ > > > Dynapi-Help mailing list > > > Dyn...@li... > > > 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 > > > Dyn...@li... > > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, > spamfilter og virusscan > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, spamfilter og virusscan |
From: Doug M. <do...@cr...> - 2003-09-30 18:20:06
|
Okay.. I should check all message before ranting.. :-) See this: http://www.faqts.com/knowledge_base/view.phtml/aid/5693/fid/126 **Note to developers** in Dynapi 2.x we had built in function to stop context menu, but still allow capturing of right click.. Can we add that back in for 3.x? ----- Original Message ----- From: "Brian Pedersen" <bas...@ya...> To: <dyn...@li...> Sent: Tuesday, September 30, 2003 2:04 PM Subject: Re: [Dynapi-Help] Rightclick events: bug noted > Hi Doug > > Thanks anyhow, you got me on the right track. > Implementing your listener with a different condition works perfect, at least in > MSIE 5.5: > > ondragstart:function(e){ > if(event.button==2||event.button==3){ > e.cancelDrag(); > } > } > > As my fix probably aint browsersafe, Im still looking forward to the bugfix > though. > > For now I just need to figure out how to avoid the default browser contextmenu. > > Regards > Brian Pedersen > > --- Doug Melvin <do...@cr...> skrev: > the following _should_ > work but does not under IE 6. > > > > lyr.addEventListener({ > > ondragstart:function(e){ > > status=e.getButton(); > > if(e.getButton() == "right"){ > > e.cancelDrag(); > > } > > } > > }); > > > > when in the ondragstart event, in the mouse_ie.js:MouseEvent.getButton() > > returns left always. > > Through debugging I noteied the the error condition on line: 26 "if > > (!this._mouseEvent) return "ouch";" (I added the "ouch") > > always returns "ouch" > > > > Works normally inside of a onclick event. (returns left, middle or right) > > > > Same deal in NS 4x, works correctly in onclick event, but executes error > > code in ondragstart event at: > > line 26 in mouse_ns4.js:getButton() "if (!this._browserEvent) return > > "ouch";" (i added the ouch) > > > > Mozilla 1.x: Same deal again.. > > > > It seems obvious to me that this is a bug in the common base of the > > dragevents scheme.. > > > > I am at work right now, and have no intoernet at home. > > Someone else will have to fix this if we want it fixed in the near future. > > ----- Original Message ----- > > From: "Brian Hayes" <bg...@ke...> > > To: <dyn...@li...> > > Sent: Tuesday, September 30, 2003 5:49 AM > > Subject: RE: [Dynapi-Help] Rightclick events > > > > > > > Here is what I did, but there may be a better way.. > > > > > > onclick : function(e) { > > > if(e.getButton() == 'left'){ //Netscape fix, > > > onclick to make sure only the left button > > > //Do Something.. > > > } > > > }, > > > > > > Brian Hayes > > > > > > Hi > > > > > > First let me say that I am crazy about the eventmodel in the dynapi, > > > attaching > > > eventlisteners to a DynLayer instead of making global eventlistener makes > > > everything so much easyer. > > > > > > I do have one problem, though: > > > I have a DHTML applikation resempling a windows desktop with movable > > icons. > > > Rigthclicking these icons should bring up a contextmenu. > > > > > > My problem is that rightclicking the icon makes it dragable, which is not > > my > > > intention, only when leftclicking should it become dragable. > > > > > > I would also like to ensure that the default browser contextmenu never > > > appears, > > > this is usually done in a traditional eventlistener by returning false: > > > > > > document.onmousedown=function(){ eventListener(event);return false; } > > > function eventListener(e){ > > > if(event.button==2||event.button==3) { > > > alert('Contextmenu activated'); > > > } > > > return false; > > > } > > > > > > How can I ensure that the layer only becomes dragable when leftclicking > > and > > > how > > > can I disable the default browser contextmenu ? > > > > > > This is my code: > > > <html> > > > <head> > > > <title>Simple test</title> > > > <script language="JavaScript" src="js/dynapi/dynapi.js"></script> > > > <script language="Javascript"> > > > dynapi.library.setPath('js/dynapi/'); > > > dynapi.library.include('dynapi.api'); > > > dynapi.library.include('dynapi.api.ext.DragEvent'); > > > dynapi.library.include('dynapi.fx.MotionX'); > > > dynapi.library.include('FocusManager'); > > > dynapi.library.include('BorderManager'); > > > </script> > > > <script language="Javascript"> > > > > > > var icon1=new DynLayer(null,25,25,32,32,null,'images/icon1.gif'); > > > > > > icon1.setID("icon1"); > > > icon1.makeSolid(); > > > icon1.setFocus('auto',true,'hover'); > > > DragEvent.enableDragEvents(icon1); > > > > > > icon1.addEventListener({ > > > onmousedown:function(e){ > > > var o=e.getSource(); > > > if(event.button==2||event.button==3){ > > > alert('Contextmenu activated'); > > > } > > > }, > > > onmouseover:function(e){ > > > var o=e.getSource(); > > > o.setInnerBorder(1); > > > }, > > > onmouseout:function(e){ > > > var o=e.getSource(); > > > o.setInnerBorder(0); > > > } > > > }); > > > > > > dynapi.document.addChild(icon1); > > > </script> > > > </head> > > > <body> > > > <script> > > > dynapi.document.insertAllChildren(); > > > </script> > > > </body> > > > </html> > > > > > > Regards > > > Brian Pedersen > > > > > > Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, > > spamfilter > > > og virusscan > > > > > > > > > ------------------------------------------------------- > > > This sf.net email is sponsored by:ThinkGeek > > > Welcome to geek heaven. > > > http://thinkgeek.com/sf > > > _______________________________________________ > > > Dynapi-Help mailing list > > > Dyn...@li... > > > 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 > > > Dyn...@li... > > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, spamfilter og virusscan > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 |
From: Doug M. <do...@cr...> - 2003-09-30 18:16:11
|
there is a bug in the mouse events that makes my code not work. the idea is whena drag starts (ondragstart) check if the user is clicking the left button (you wanted drag on left button no?) it the user is NOt using the left buttont hen cancel the drag (prevents dragging). If you want drag on right and not left the yes, change "left" to "right".. but again.. While I know that my code does not fix your problem, this is due only to a bug. I mainly posted the code and info so that other developers will know of the bug and maybe fix it.. At any rate.. you may also try putting my code in a onmousedown event instead of dragstart. And as always.. READ THE CODE.. It's not too hard to open up the mouse_x.js or the dragevent.js code and see how it works.. ----- Original Message ----- From: "Brian Pedersen" <bas...@ya...> To: <dyn...@li...> Sent: Tuesday, September 30, 2003 1:51 PM Subject: RE: [Dynapi-Help] Rightclick events > Hi Brian > > I appreciate your answer, but i am not quite sure as how to interpret it: > > Inserting your code appearently does not solve any of the two problems described. > > > As leftclicking is allready handled by DragEvent.enableDragEvents(icon1) I would > have to change 'left' in your code to 'right', which should have the same effect > as my onmousedown handler, but actually does not work at all. > > Did I miss something ? > > Regards > Brian Pedersen > > > --- Brian Hayes <bg...@ke...> skrev: > Here is what I did, but there may > be a better way.. > > > > onclick : function(e) { > > if(e.getButton() == 'left'){ //Netscape fix, > > onclick to make sure only the left button > > //Do Something.. > > } > > }, > > > > Brian Hayes > > > > Hi > > > > First let me say that I am crazy about the eventmodel in the dynapi, > > attaching > > eventlisteners to a DynLayer instead of making global eventlistener makes > > everything so much easyer. > > > > I do have one problem, though: > > I have a DHTML applikation resempling a windows desktop with movable icons. > > Rigthclicking these icons should bring up a contextmenu. > > > > My problem is that rightclicking the icon makes it dragable, which is not my > > intention, only when leftclicking should it become dragable. > > > > I would also like to ensure that the default browser contextmenu never > > appears, > > this is usually done in a traditional eventlistener by returning false: > > > > document.onmousedown=function(){ eventListener(event);return false; } > > function eventListener(e){ > > if(event.button==2||event.button==3) { > > alert('Contextmenu activated'); > > } > > return false; > > } > > > > How can I ensure that the layer only becomes dragable when leftclicking and > > how > > can I disable the default browser contextmenu ? > > > > This is my code: > > <html> > > <head> > > <title>Simple test</title> > > <script language="JavaScript" src="js/dynapi/dynapi.js"></script> > > <script language="Javascript"> > > dynapi.library.setPath('js/dynapi/'); > > dynapi.library.include('dynapi.api'); > > dynapi.library.include('dynapi.api.ext.DragEvent'); > > dynapi.library.include('dynapi.fx.MotionX'); > > dynapi.library.include('FocusManager'); > > dynapi.library.include('BorderManager'); > > </script> > > <script language="Javascript"> > > > > var icon1=new DynLayer(null,25,25,32,32,null,'images/icon1.gif'); > > > > icon1.setID("icon1"); > > icon1.makeSolid(); > > icon1.setFocus('auto',true,'hover'); > > DragEvent.enableDragEvents(icon1); > > > > icon1.addEventListener({ > > onmousedown:function(e){ > > var o=e.getSource(); > > if(event.button==2||event.button==3){ > > alert('Contextmenu activated'); > > } > > }, > > onmouseover:function(e){ > > var o=e.getSource(); > > o.setInnerBorder(1); > > }, > > onmouseout:function(e){ > > var o=e.getSource(); > > o.setInnerBorder(0); > > } > > }); > > > > dynapi.document.addChild(icon1); > > </script> > > </head> > > <body> > > <script> > > dynapi.document.insertAllChildren(); > > </script> > > </body> > > </html> > > > > Regards > > Brian Pedersen > > > > Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, spamfilter > > og virusscan > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > 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 > > Dyn...@li... > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, spamfilter og virusscan > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 |
From: <bas...@ya...> - 2003-09-30 18:05:14
|
Hi Doug Thanks anyhow, you got me on the right track. Implementing your listener with a different condition works perfect, at least in MSIE 5.5: ondragstart:function(e){ if(event.button==2||event.button==3){ e.cancelDrag(); } } As my fix probably aint browsersafe, Im still looking forward to the bugfix though. For now I just need to figure out how to avoid the default browser contextmenu. Regards Brian Pedersen --- Doug Melvin <do...@cr...> skrev: > the following _should_ work but does not under IE 6. > > lyr.addEventListener({ > ondragstart:function(e){ > status=e.getButton(); > if(e.getButton() == "right"){ > e.cancelDrag(); > } > } > }); > > when in the ondragstart event, in the mouse_ie.js:MouseEvent.getButton() > returns left always. > Through debugging I noteied the the error condition on line: 26 "if > (!this._mouseEvent) return "ouch";" (I added the "ouch") > always returns "ouch" > > Works normally inside of a onclick event. (returns left, middle or right) > > Same deal in NS 4x, works correctly in onclick event, but executes error > code in ondragstart event at: > line 26 in mouse_ns4.js:getButton() "if (!this._browserEvent) return > "ouch";" (i added the ouch) > > Mozilla 1.x: Same deal again.. > > It seems obvious to me that this is a bug in the common base of the > dragevents scheme.. > > I am at work right now, and have no intoernet at home. > Someone else will have to fix this if we want it fixed in the near future. > ----- Original Message ----- > From: "Brian Hayes" <bg...@ke...> > To: <dyn...@li...> > Sent: Tuesday, September 30, 2003 5:49 AM > Subject: RE: [Dynapi-Help] Rightclick events > > > > Here is what I did, but there may be a better way.. > > > > onclick : function(e) { > > if(e.getButton() == 'left'){ //Netscape fix, > > onclick to make sure only the left button > > //Do Something.. > > } > > }, > > > > Brian Hayes > > > > Hi > > > > First let me say that I am crazy about the eventmodel in the dynapi, > > attaching > > eventlisteners to a DynLayer instead of making global eventlistener makes > > everything so much easyer. > > > > I do have one problem, though: > > I have a DHTML applikation resempling a windows desktop with movable > icons. > > Rigthclicking these icons should bring up a contextmenu. > > > > My problem is that rightclicking the icon makes it dragable, which is not > my > > intention, only when leftclicking should it become dragable. > > > > I would also like to ensure that the default browser contextmenu never > > appears, > > this is usually done in a traditional eventlistener by returning false: > > > > document.onmousedown=function(){ eventListener(event);return false; } > > function eventListener(e){ > > if(event.button==2||event.button==3) { > > alert('Contextmenu activated'); > > } > > return false; > > } > > > > How can I ensure that the layer only becomes dragable when leftclicking > and > > how > > can I disable the default browser contextmenu ? > > > > This is my code: > > <html> > > <head> > > <title>Simple test</title> > > <script language="JavaScript" src="js/dynapi/dynapi.js"></script> > > <script language="Javascript"> > > dynapi.library.setPath('js/dynapi/'); > > dynapi.library.include('dynapi.api'); > > dynapi.library.include('dynapi.api.ext.DragEvent'); > > dynapi.library.include('dynapi.fx.MotionX'); > > dynapi.library.include('FocusManager'); > > dynapi.library.include('BorderManager'); > > </script> > > <script language="Javascript"> > > > > var icon1=new DynLayer(null,25,25,32,32,null,'images/icon1.gif'); > > > > icon1.setID("icon1"); > > icon1.makeSolid(); > > icon1.setFocus('auto',true,'hover'); > > DragEvent.enableDragEvents(icon1); > > > > icon1.addEventListener({ > > onmousedown:function(e){ > > var o=e.getSource(); > > if(event.button==2||event.button==3){ > > alert('Contextmenu activated'); > > } > > }, > > onmouseover:function(e){ > > var o=e.getSource(); > > o.setInnerBorder(1); > > }, > > onmouseout:function(e){ > > var o=e.getSource(); > > o.setInnerBorder(0); > > } > > }); > > > > dynapi.document.addChild(icon1); > > </script> > > </head> > > <body> > > <script> > > dynapi.document.insertAllChildren(); > > </script> > > </body> > > </html> > > > > Regards > > Brian Pedersen > > > > Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, > spamfilter > > og virusscan > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > 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 > > Dyn...@li... > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, spamfilter og virusscan |
From: <bas...@ya...> - 2003-09-30 17:52:19
|
Hi Brian I appreciate your answer, but i am not quite sure as how to interpret it: Inserting your code appearently does not solve any of the two problems described. As leftclicking is allready handled by DragEvent.enableDragEvents(icon1) I would have to change 'left' in your code to 'right', which should have the same effect as my onmousedown handler, but actually does not work at all. Did I miss something ? Regards Brian Pedersen --- Brian Hayes <bg...@ke...> skrev: > Here is what I did, but there may be a better way.. > > onclick : function(e) { > if(e.getButton() == 'left'){ //Netscape fix, > onclick to make sure only the left button > //Do Something.. > } > }, > > Brian Hayes > > Hi > > First let me say that I am crazy about the eventmodel in the dynapi, > attaching > eventlisteners to a DynLayer instead of making global eventlistener makes > everything so much easyer. > > I do have one problem, though: > I have a DHTML applikation resempling a windows desktop with movable icons. > Rigthclicking these icons should bring up a contextmenu. > > My problem is that rightclicking the icon makes it dragable, which is not my > intention, only when leftclicking should it become dragable. > > I would also like to ensure that the default browser contextmenu never > appears, > this is usually done in a traditional eventlistener by returning false: > > document.onmousedown=function(){ eventListener(event);return false; } > function eventListener(e){ > if(event.button==2||event.button==3) { > alert('Contextmenu activated'); > } > return false; > } > > How can I ensure that the layer only becomes dragable when leftclicking and > how > can I disable the default browser contextmenu ? > > This is my code: > <html> > <head> > <title>Simple test</title> > <script language="JavaScript" src="js/dynapi/dynapi.js"></script> > <script language="Javascript"> > dynapi.library.setPath('js/dynapi/'); > dynapi.library.include('dynapi.api'); > dynapi.library.include('dynapi.api.ext.DragEvent'); > dynapi.library.include('dynapi.fx.MotionX'); > dynapi.library.include('FocusManager'); > dynapi.library.include('BorderManager'); > </script> > <script language="Javascript"> > > var icon1=new DynLayer(null,25,25,32,32,null,'images/icon1.gif'); > > icon1.setID("icon1"); > icon1.makeSolid(); > icon1.setFocus('auto',true,'hover'); > DragEvent.enableDragEvents(icon1); > > icon1.addEventListener({ > onmousedown:function(e){ > var o=e.getSource(); > if(event.button==2||event.button==3){ > alert('Contextmenu activated'); > } > }, > onmouseover:function(e){ > var o=e.getSource(); > o.setInnerBorder(1); > }, > onmouseout:function(e){ > var o=e.getSource(); > o.setInnerBorder(0); > } > }); > > dynapi.document.addChild(icon1); > </script> > </head> > <body> > <script> > dynapi.document.insertAllChildren(); > </script> > </body> > </html> > > Regards > Brian Pedersen > > Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, spamfilter > og virusscan > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > 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 > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, spamfilter og virusscan |
From: Doug M. <do...@cr...> - 2003-09-30 17:23:48
|
the following _should_ work but does not under IE 6. lyr.addEventListener({ ondragstart:function(e){ status=e.getButton(); if(e.getButton() == "right"){ e.cancelDrag(); } } }); when in the ondragstart event, in the mouse_ie.js:MouseEvent.getButton() returns left always. Through debugging I noteied the the error condition on line: 26 "if (!this._mouseEvent) return "ouch";" (I added the "ouch") always returns "ouch" Works normally inside of a onclick event. (returns left, middle or right) Same deal in NS 4x, works correctly in onclick event, but executes error code in ondragstart event at: line 26 in mouse_ns4.js:getButton() "if (!this._browserEvent) return "ouch";" (i added the ouch) Mozilla 1.x: Same deal again.. It seems obvious to me that this is a bug in the common base of the dragevents scheme.. I am at work right now, and have no intoernet at home. Someone else will have to fix this if we want it fixed in the near future. ----- Original Message ----- From: "Brian Hayes" <bg...@ke...> To: <dyn...@li...> Sent: Tuesday, September 30, 2003 5:49 AM Subject: RE: [Dynapi-Help] Rightclick events > Here is what I did, but there may be a better way.. > > onclick : function(e) { > if(e.getButton() == 'left'){ //Netscape fix, > onclick to make sure only the left button > //Do Something.. > } > }, > > Brian Hayes > > Hi > > First let me say that I am crazy about the eventmodel in the dynapi, > attaching > eventlisteners to a DynLayer instead of making global eventlistener makes > everything so much easyer. > > I do have one problem, though: > I have a DHTML applikation resempling a windows desktop with movable icons. > Rigthclicking these icons should bring up a contextmenu. > > My problem is that rightclicking the icon makes it dragable, which is not my > intention, only when leftclicking should it become dragable. > > I would also like to ensure that the default browser contextmenu never > appears, > this is usually done in a traditional eventlistener by returning false: > > document.onmousedown=function(){ eventListener(event);return false; } > function eventListener(e){ > if(event.button==2||event.button==3) { > alert('Contextmenu activated'); > } > return false; > } > > How can I ensure that the layer only becomes dragable when leftclicking and > how > can I disable the default browser contextmenu ? > > This is my code: > <html> > <head> > <title>Simple test</title> > <script language="JavaScript" src="js/dynapi/dynapi.js"></script> > <script language="Javascript"> > dynapi.library.setPath('js/dynapi/'); > dynapi.library.include('dynapi.api'); > dynapi.library.include('dynapi.api.ext.DragEvent'); > dynapi.library.include('dynapi.fx.MotionX'); > dynapi.library.include('FocusManager'); > dynapi.library.include('BorderManager'); > </script> > <script language="Javascript"> > > var icon1=new DynLayer(null,25,25,32,32,null,'images/icon1.gif'); > > icon1.setID("icon1"); > icon1.makeSolid(); > icon1.setFocus('auto',true,'hover'); > DragEvent.enableDragEvents(icon1); > > icon1.addEventListener({ > onmousedown:function(e){ > var o=e.getSource(); > if(event.button==2||event.button==3){ > alert('Contextmenu activated'); > } > }, > onmouseover:function(e){ > var o=e.getSource(); > o.setInnerBorder(1); > }, > onmouseout:function(e){ > var o=e.getSource(); > o.setInnerBorder(0); > } > }); > > dynapi.document.addChild(icon1); > </script> > </head> > <body> > <script> > dynapi.document.insertAllChildren(); > </script> > </body> > </html> > > Regards > Brian Pedersen > > Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, spamfilter > og virusscan > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > 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 > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 |
From: Doug M. <do...@cr...> - 2003-09-30 16:53:30
|
There are many ASP ports for Apache. Apache if a free cross-platform Web server. Several of the ASP ports are also free (and open-source). So you could, technically speacking, "do things on your own ". :-) And yes, ASP is round-about.. but when you start to get into the un-documented aspeects of the language you start to find that it is more powerfull then you thought (not that it compares to JSP of course). Help in VB, I have only learned recently that there is an "Extends" keyword.. go figure.. ----- Original Message ----- From: "Leif W" <war...@us...> To: <dyn...@li...> Sent: Monday, September 29, 2003 5:58 PM Subject: Re: [Dynapi-Help] Note on ASP environment > Cool, I'll definitely look into it, thanks for the tip. Always nice to > learn other languages so I can port them apps to PHP. ^^ It'll be good for > me to test out the existing ASP code, and see how it works, try and break > it, then duplicate it in PHP. It's harder going "blind" translation, > without a working demo, or double-blind, without a real grasp of the other > language. ;-) But VBScript and JScript seem fairly straightforward (in a > roundabout sort of way). ;-) It's just frustrating when I can do all this > stuff for free with the free software tools, but can't do it myself with the > ASP side and have to go outside for help, even if the service IS free. I > like to cI guess. Also frustrating on technical levels > when I can do things with one or two lines of PHP code that require 3rd > party DLLs, 40 lines of script code, etc. > > Leif > > P.S. The URL to your site doesn't seem to be working? > http://a.domaindlx.com/DouglasMelvin/ > > ----- Original Message ----- > From: Doug Melvin > To: dyn...@li... ; dyn...@li... > Sent: Monday, September 29, 2003 5:32 PM > Subject: [Dynapi-Help] Note on ASP environment > > > For those who have no asp envirnoment, but would like one: > www.domaindlx.com > > 100% Free asp hosting. > 100 megs of space > NO BANNERS!!! > NO POPUPS!!! > Database functionality included. > > Not too slow either: http://a.domaindlx.com/DouglasMelvin/ > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 |
From: Brian H. <bg...@ke...> - 2003-09-30 12:58:56
|
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... bg...@ke... 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: dyn...@li... [mailto:dyn...@li...] On Behalf Of Raymond Irving Sent: Monday, September 29, 2003 10:05 AM To: dyn...@li... 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 <bg...@ke...> 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 Dyn...@li... https://lists.sourceforge.net/lists/listinfo/dynapi-help |
From: <ant...@it...> - 2003-09-30 11:12:59
|
Hello everyone, Is it possible to put the new Explorer Widget inside an inline layer? The solution that I'm seeking is to have the explorer inside a <table> </table> Tag=92s. Regards, Ant=F3nio Silva |
From: Brian H. <bg...@ke...> - 2003-09-30 09:52:39
|
Here is what I did, but there may be a better way.. onclick : function(e) { if(e.getButton() == 'left'){ //Netscape fix, onclick to make sure only the left button //Do Something.. } }, Brian Hayes Hi First let me say that I am crazy about the eventmodel in the dynapi, attaching eventlisteners to a DynLayer instead of making global eventlistener makes everything so much easyer. I do have one problem, though: I have a DHTML applikation resempling a windows desktop with movable icons. Rigthclicking these icons should bring up a contextmenu. My problem is that rightclicking the icon makes it dragable, which is not my intention, only when leftclicking should it become dragable. I would also like to ensure that the default browser contextmenu never appears, this is usually done in a traditional eventlistener by returning false: document.onmousedown=function(){ eventListener(event);return false; } function eventListener(e){ if(event.button==2||event.button==3) { alert('Contextmenu activated'); } return false; } How can I ensure that the layer only becomes dragable when leftclicking and how can I disable the default browser contextmenu ? This is my code: <html> <head> <title>Simple test</title> <script language="JavaScript" src="js/dynapi/dynapi.js"></script> <script language="Javascript"> dynapi.library.setPath('js/dynapi/'); dynapi.library.include('dynapi.api'); dynapi.library.include('dynapi.api.ext.DragEvent'); dynapi.library.include('dynapi.fx.MotionX'); dynapi.library.include('FocusManager'); dynapi.library.include('BorderManager'); </script> <script language="Javascript"> var icon1=new DynLayer(null,25,25,32,32,null,'images/icon1.gif'); icon1.setID("icon1"); icon1.makeSolid(); icon1.setFocus('auto',true,'hover'); DragEvent.enableDragEvents(icon1); icon1.addEventListener({ onmousedown:function(e){ var o=e.getSource(); if(event.button==2||event.button==3){ alert('Contextmenu activated'); } }, onmouseover:function(e){ var o=e.getSource(); o.setInnerBorder(1); }, onmouseout:function(e){ var o=e.getSource(); o.setInnerBorder(0); } }); dynapi.document.addChild(icon1); </script> </head> <body> <script> dynapi.document.insertAllChildren(); </script> </body> </html> Regards Brian Pedersen Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, spamfilter og virusscan ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dynapi-Help mailing list Dyn...@li... https://lists.sourceforge.net/lists/listinfo/dynapi-help |
From: <bas...@ya...> - 2003-09-30 07:02:33
|
Hi First let me say that I am crazy about the eventmodel in the dynapi, attaching eventlisteners to a DynLayer instead of making global eventlistener makes everything so much easyer. I do have one problem, though: I have a DHTML applikation resempling a windows desktop with movable icons. Rigthclicking these icons should bring up a contextmenu. My problem is that rightclicking the icon makes it dragable, which is not my intention, only when leftclicking should it become dragable. I would also like to ensure that the default browser contextmenu never appears, this is usually done in a traditional eventlistener by returning false: document.onmousedown=function(){ eventListener(event);return false; } function eventListener(e){ if(event.button==2||event.button==3) { alert('Contextmenu activated'); } return false; } How can I ensure that the layer only becomes dragable when leftclicking and how can I disable the default browser contextmenu ? This is my code: <html> <head> <title>Simple test</title> <script language="JavaScript" src="js/dynapi/dynapi.js"></script> <script language="Javascript"> dynapi.library.setPath('js/dynapi/'); dynapi.library.include('dynapi.api'); dynapi.library.include('dynapi.api.ext.DragEvent'); dynapi.library.include('dynapi.fx.MotionX'); dynapi.library.include('FocusManager'); dynapi.library.include('BorderManager'); </script> <script language="Javascript"> var icon1=new DynLayer(null,25,25,32,32,null,'images/icon1.gif'); icon1.setID("icon1"); icon1.makeSolid(); icon1.setFocus('auto',true,'hover'); DragEvent.enableDragEvents(icon1); icon1.addEventListener({ onmousedown:function(e){ var o=e.getSource(); if(event.button==2||event.button==3){ alert('Contextmenu activated'); } }, onmouseover:function(e){ var o=e.getSource(); o.setInnerBorder(1); }, onmouseout:function(e){ var o=e.getSource(); o.setInnerBorder(0); } }); dynapi.document.addChild(icon1); </script> </head> <body> <script> dynapi.document.insertAllChildren(); </script> </body> </html> Regards Brian Pedersen Yahoo! Mail (http://dk.mail.yahoo.com) - Gratis: 6 MB lagerplads, spamfilter og virusscan |
From: Leif W <war...@us...> - 2003-09-29 21:57:25
|
Cool, I'll definitely look into it, thanks for the tip. Always nice to learn other languages so I can port them apps to PHP. ^^ It'll be good for me to test out the existing ASP code, and see how it works, try and break it, then duplicate it in PHP. It's harder going "blind" translation, without a working demo, or double-blind, without a real grasp of the other language. ;-) But VBScript and JScript seem fairly straightforward (in a roundabout sort of way). ;-) It's just frustrating when I can do all this stuff for free with the free software tools, but can't do it myself with the ASP side and have to go outside for help, even if the service IS free. I like to do things on my own I guess. Also frustrating on technical levels when I can do things with one or two lines of PHP code that require 3rd party DLLs, 40 lines of script code, etc. Leif P.S. The URL to your site doesn't seem to be working? http://a.domaindlx.com/DouglasMelvin/ ----- Original Message ----- From: Doug Melvin To: dyn...@li... ; dyn...@li... Sent: Monday, September 29, 2003 5:32 PM Subject: [Dynapi-Help] Note on ASP environment For those who have no asp envirnoment, but would like one: www.domaindlx.com 100% Free asp hosting. 100 megs of space NO BANNERS!!! NO POPUPS!!! Database functionality included. Not too slow either: http://a.domaindlx.com/DouglasMelvin/ --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 |
From: Doug M. <do...@cr...> - 2003-09-29 21:31:09
|
For those who have no asp envirnoment, but would like one: www.domaindlx.com 100% Free asp hosting. 100 megs of space NO BANNERS!!! NO POPUPS!!! Database functionality included. Not too slow either: http://a.domaindlx.com/DouglasMelvin/ --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 |
From: Doug M. <do...@cr...> - 2003-09-29 21:25:31
|
Note: Mozilla has a problem with getting width of content.. setAutosize may not function under certain circumstances. ----- Original Message ----- From: "Raymond Irving" <xw...@ya...> To: <dyn...@li...> Sent: Monday, September 29, 2003 3:36 PM Subject: Re: [Dynapi-Help] How to add eventListener to a DynLayer? > > --- Yanglong Zhu <yz...@ou...> wrote: > > > > I have another question now. > > How do you make a imgage visible when it is wider > > than the window size > > in Mozilla (1.5b, maybe the same in other versions). > > I have a very big imgage in a DynLayer like this: > > > > var lyrmaster = dynapi.document.addChild(new > > DynLayer('<img > > > src="./insertion_embed.png">',50,150,null,null,'silver')); > > > > However, only the left part of the image that fits > > in the window is > > visible, the rest of it seem to be sensed by the > > blowser judging by the > > scroll bar, but when you scroll to the right no > > image is visible there. > > The invisible part is the page's background color, > > not even the > > background of the layer (silver) is displayed. If I > > put the image naked > > on the page,like this: > > > > <img src="./insertion_embed.png"> > > > > The whole image is visible (scroll right all the way > > to the end). > > > > Is this a known problem? Or there is way to fix it? > > You can try changing the overflow property of the > layer from hidden to default by using: > > lyr.setOverflow('default'); > > or you can try using the setAutoSize(true,true) > or manualy set the lyr's width and height. > > I suspect that you need to pre-load the image. you can > do this using the dynapi.functions.getImage() > > -- > Raymond Irving > > > > Thanks. > > > > Yanglong > > > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > __________________________________ > 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 > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 |
From: Doug M. <do...@cr...> - 2003-09-29 21:13:04
|
This message is somewhat old, but no solution was posted: The image tag has an onload event. You may try somthing with that img src="" onload="this.src='whatever'" ----- Original Message ----- From: "Leif Wessman" <lei...@ho...> To: <dyn...@li...> Cc: <da...@tr...> Sent: Tuesday, September 23, 2003 4:15 AM Subject: [Dynapi-Help] How to change the src of an image in a layer before the document is loaded? > > Hi, > > How do I change the src of an image in a DynLayer (with javascript) - before > the document is loaded? It seems as if DynAPI.document is not accessible. Is > there a way to make it accessible or how should I do it??? > > Please not that It's not possible for me to wait until the page is fully > loaded. I have to change the image before... > > Thank you for your help!! > > This is my code: > > <html> > <head> > <script language="JavaScript" src="/js/dynapi.js" > type="text/javascript"></script> > <script language="JavaScript" type="text/javascript"> > <!-- > DynAPI.setLibraryPath('/js/lib/'); > DynAPI.include('dynapi.api.*'); > DynAPI.include('dynapi.ext.inline.js'); > //--> > </script> > </head> > <div id="mylayer" style="position:absolute"> > <img name="myimage" src="/box.empty.gif"> > </div> > <script language="JavaScript" type="text/javascript"> > <!-- > // it seems as if the DynAPI.document does not exist > DynAPI.findLayers(DynAPI.document); > > // and that's the reason that I can't change the image in the layer > DynAPI.document.all["mylayer"].images['myimage'].src = '/box.check.gif'; > //--> > </script> > </html> > > Leif > > _________________________________________________________________ > Lättare att hitta drömresan med MSN Resor http://www.msn.se/resor/ > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 |
From: Doug M. <do...@cr...> - 2003-09-29 21:05:07
|
still cleaing out my in box.. Comment: check your time zone.. I was noticing a time lag in all my msgs until I notieced I had wrong time zone set.. ----- Original Message ----- From: "Leif W" <war...@us...> To: <dyn...@li...> Sent: Tuesday, September 09, 2003 7:38 PM Subject: Re: [Dynapi-Help] The New DynAPI Components are Here! Check out CVS > If you notice the difference between the timestamp on this message (1442) > and the time it arrives (1925), you'll see there's nearly a 5 hour lag time > between when I sent it and when it arrived. Must be a problem with my ISP > again. Well at least it's still better than snailmail, right? > > Leif > > P.S. Since there seems to be so much problems with SF public CVS server (and > the lag time of one day before it's a zip archive), I'll volunteer to put a > zip up either on my home or on my ISP's webspace (MUCH faster connection) > for those who can't wait. > > P.P.S. I'll also look into automating this process, but don't hold your > breath. :o (could set up a cron job in Linux to run cvs update, zip the > snapshot, and run an ftp session if I put the zip elsewhere). > > P.P.P.S. On second thought, automating this by doing frequent CVS updates > (i.e. every 15 min) might be a bad idea, overworking their servers and > possibly clobbering any of my ongoing work. But I can still put up a zip > within the first minutes to be used for the first few days until SF's CVS > catches up. > > ----- Original Message ----- > From: "Leif W" <war...@us...> > To: <dyn...@li...> > Sent: Tuesday, September 09, 2003 2:42 PM > Subject: Re: [Dynapi-Help] The New DynAPI Components are Here! Check out CVS > > > > Gavin, I keep a personal coy of the CVS which I update manually every few > > days. I just made sure I had a clean CVS after updating, and made a zip > > archive with date and time in the filename. If your need is great and the > > SourceForge site isn't working for you for some reason (although it just > > worked for me as a developer), you can try and get my copy. I've got a > > virus scanner running, so I am at least 99.9% sure the code won't be > > contaminated. URL: http://dynapi.kicks-ass.net/ The site may go down at > > any moment, as I am in the process of working out some hardware issues > with > > my firewall (at least 1 stick of bad RAM, but which stick, and how many if > > more than one?). But everything is up most of the time otherwise. > > > > Leif > > > > ----- Original Message ----- > > From: "Gavin O' Gorman" <gav...@ma...> > > To: <dyn...@li...> > > Sent: Tuesday, September 09, 2003 12:07 PM > > Subject: RE: [Dynapi-Help] The New DynAPI Components are Here! Check out > CVS > > > > > > > > -----Original Message----- > > > > From: dyn...@li... > > > > [mailto:dyn...@li...]On Behalf Of Raymond > > > > Irving > > > > Sent: 09 September 2003 16:40 > > > > To: DynAPI-Dev; DynApi-Help > > > > Subject: [Dynapi-Help] The New DynAPI Components are Here! Check out > CVS > > > > > > > > > > > > Hello Everyone, > > > > > > > > I've managed to finally upload the components that I > > > > have been working on. They're currently in the alpha > > > > stage so don't expect them to work flawlessly accross > > > > browsers. > > > > > > Great, > > > > > > I'm eager to test them out. I'm unable to log in via anonymous cvs > > however. > > > Anyone else having any trouble ? The snapshot won't update til later. > > (When > > > I'm home without internet access !) > > > > > > --[gavin]@:{~} > > >cvs -d:pserver:ano...@cv...:/cvsroot/dynapi > > > login > > 16:59:11 > > > Tue 9 > > > Logging in to :pserver:ano...@cv...:2401/cvsroot/dynapi > > > CVS password: > > > cvs [login aborted]: connect to cvs.sourceforge.net(66.35.250.207):2401 > > > failed: Connection refused > > > -- > > > > > > Cheers, > > > Gav > > > > > > > > > > > > ------------------------------------------------------- > > > This sf.net email is sponsored by:ThinkGeek > > > Welcome to geek heaven. > > > http://thinkgeek.com/sf > > > _______________________________________________ > > > Dynapi-Help mailing list > > > Dyn...@li... > > > 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 > > Dyn...@li... > > 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 > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.522 / Virus Database: 320 - Release Date: 9/29/03 |
From: Raymond I. <xw...@ya...> - 2003-09-29 19:36:44
|
--- Yanglong Zhu <yz...@ou...> wrote: > > I have another question now. > How do you make a imgage visible when it is wider > than the window size > in Mozilla (1.5b, maybe the same in other versions). > I have a very big imgage in a DynLayer like this: > > var lyrmaster = dynapi.document.addChild(new > DynLayer('<img > src="./insertion_embed.png">',50,150,null,null,'silver')); > > However, only the left part of the image that fits > in the window is > visible, the rest of it seem to be sensed by the > blowser judging by the > scroll bar, but when you scroll to the right no > image is visible there. > The invisible part is the page's background color, > not even the > background of the layer (silver) is displayed. If I > put the image naked > on the page,like this: > > <img src="./insertion_embed.png"> > > The whole image is visible (scroll right all the way > to the end). > > Is this a known problem? Or there is way to fix it? You can try changing the overflow property of the layer from hidden to default by using: lyr.setOverflow('default'); or you can try using the setAutoSize(true,true) or manualy set the lyr's width and height. I suspect that you need to pre-load the image. you can do this using the dynapi.functions.getImage() -- Raymond Irving > Thanks. > > Yanglong > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
From: Doug M. <do...@cr...> - 2003-09-29 19:30:02
|
Assuming you are using DynAPI 3x var arrObjects =3D dynapi.document.getChildren(); for (var i =3D 0 to arrObjects.length()){ arrObjects[i].invokeEvent("myEvent"); } ----- Original Message -----=20 From: Brian Hayes=20 To: dyn...@li...=20 Sent: Friday, September 26, 2003 8:19 PM Subject: [Dynapi-Help] How do you trigger an event that all objects = can see? Hello, I have come a long way with my project, and I know this would = not be a reality without dynapi....( I am a spokes person) however, the = learning curve is somewhat on the uphill side.. With that said, it there = a way to make an invokeEvent('someevent'), global? or, send the event to = all objects loaded on the page? I ask because I read some where that = widgets should not have eventhandlers embedded in them, but the only way = I have been able to get my objects to see the event is through the = e.getSource().parent.envokEvent('somevent').. However, this only work on = child deep.. And when I attempt to change everything over to the other = recommended way var o=3Dtjhis; and reference o.someFunction(); it seams = to break NS6 and 7.. Example: WidgetA this.addEventListener({onpathrun: function(e){ = if(e.getSource().parent){ = e.getSource().parent.invokeEvent('onpathrun',null)}}); This is inside every singe widget that is a child of another widget, = until I get to the main widget that needs the event. Any advice would be appreciated. Thanks, Brian Hayes --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/03 |
From: Yanglong Z. <yz...@ou...> - 2003-09-29 19:20:20
|
Raymond Irving wrote: >Hi, > >For more information on events see: > >docs/changelog.html >docs/docs/quickref.dynevent.html >docs/docs/quickref.eventobject.html > >functions like e.getOrigin() should return the target >layer (or element) > > This is exactly right. I looked at this method in the changeLog, but was not sure about the relavance. Since you pointed at it as the solution, then I actually tried it out. It solved my puzzle. Thanks. >-- >Raymond Irving > > > I have another question now. How do you make a imgage visible when it is wider than the window size in Mozilla (1.5b, maybe the same in other versions). I have a very big imgage in a DynLayer like this: var lyrmaster = dynapi.document.addChild(new DynLayer('<img src="./insertion_embed.png">',50,150,null,null,'silver')); However, only the left part of the image that fits in the window is visible, the rest of it seem to be sensed by the blowser judging by the scroll bar, but when you scroll to the right no image is visible there. The invisible part is the page's background color, not even the background of the layer (silver) is displayed. If I put the image naked on the page,like this: <img src="./insertion_embed.png"> The whole image is visible (scroll right all the way to the end). Is this a known problem? Or there is way to fix it? Thanks. Yanglong |
From: Brian H. <bg...@ke...> - 2003-09-29 16:15:05
|
Thanks for the information, and after reading a lot of code... I came up with the answer... I guess I did not explain myself clearly, but here it the code. Ugly but works... Does, anyone know of a cleaner way of doing the below? // Sets the Smaller' ScaleViewerContainer' =100 (Scalled Down) layer, based on // the 'ViewWin' = 300 larger (Original Size) Layer. // Each time the Larger 'ViewLyr' a child of 'ViewWin' layer is resized, moved, draged, etc.. I call this funtion. // and change to change the size of 'ScaleViewer' a child of ScaleViewerContainer. // function setViewWindow does the same thing but for setting the ViewLry v.setScaleViewer = function(lyrid){ if(this.ViewLyr[lyrid]){ this.rh = this.ViewLyr[lyrid].getHeight()/this.ScaleViewerContainer.getHeight(); //ratio Height this.rw = this.ViewLyr[lyrid].getWidth()/this.ScaleViewerContainer.getWidth(); //ratio Width this.sw =this.ViewWin.getWidth()/this.rw; this.sh =this.ViewWin.getHeight()/this.rh; this.rx = (this.ViewLyr[lyrid].getX()*-1)/this.rw; this.ry = (this.ViewLyr[lyrid].getY()*-1)/this.rh; this.ScaleViewer.setSize(this.sw,this.sh); this.ScaleViewer.setLocation(this.rx,this.ry); // //this.ScaleViewer.setHTML("<font color=white>"+this.rx+" : "+this.ry+"<br>"+this.rh+" : "+this.rw+"</font>"); //alert(this.nw); } }; v.setViewWindow = function(lyrid){ if(this.ViewLyr[lyrid]){ this.rh = this.ViewWin.getHeight()/this.ScaleViewer.getHeight(); //ratio Height this.rw = this.ViewWin.getWidth()/this.ScaleViewer.getWidth(); //ratio Width this.sw =this.ScaleViewerContainer.getWidth()*this.rw; this.sh =this.ScaleViewerContainer.getHeight()*this.rh; this.rx = this.ScaleViewer.getX()*this.rw; this.ry = this.ScaleViewer.getY()*this.rh; this.ViewLyr[lyrid].setSize(this.sw,this.sh); this.ViewLyr[lyrid].setLocation(this.rx*-1,this.ry*-1); } }; -----Original Message----- From: dyn...@li... [mailto:dyn...@li...] On Behalf Of Raymond Irving Sent: Monday, September 29, 2003 10:05 AM To: dyn...@li... 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 <bg...@ke...> 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 Dyn...@li... https://lists.sourceforge.net/lists/listinfo/dynapi-help |
From: Daniel T. <de...@ti...> - 2003-09-29 14:35:04
|
Hi Brian! I am currently working on a "stacker" that reacts on layer resizing. Its a function that works with the x,y,h,w of the layers added. If you have layer 1 and layer2 and they are exacltly 5 pixels space between them, if you resize layer 1 so the space is say 15 pixels between them, layers 2 will be moved so its still 5 pixels between them. But with movement this one is not the option, this is just for sizing, however you should have a look at the groupmanager example who deals with positions, i dont know if thats the thing you are looking for but it might help you out. Regards Daniel -----Original Message----- From: dyn...@li... [mailto:dyn...@li...] On Behalf Of Brian Hayes Sent: den 28 september 2003 16:54 To: dyn...@li... Subject: [Dynapi-Help] Setting the scale for one object based on another. 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 |
From: Raymond I. <xw...@ya...> - 2003-09-29 14:06:19
|
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 <bg...@ke...> 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 |
From: Raymond I. <xw...@ya...> - 2003-09-28 13:43:23
|
Hi, For more information on events see: docs/changelog.html docs/docs/quickref.dynevent.html docs/docs/quickref.eventobject.html functions like e.getOrigin() should return the target layer (or element) -- Raymond Irving --- Yanglong Zhu <yz...@ou...> wrote: > Thanks Raymond Irving, > > and Brian Heys > > (I got you two's email at the same time and I have > the same response as > well) > > Here we go. I haven't tried your codes yet. But by > looking at them, I > believe they probably just trigger a new layer pop > up, instead of > capture the target element's content for an > interactive editing session. > Here I have to stress INTERACTIVE EDITING. Not just > pop up another layer > (for editing or not). The poped-up layer has to > carry the information of > the target element: Including the text and > attributes (when neccessary > --manipulated behind the screen) for a collabolative > web site. After the > target is edited, the user will save the new info to > the server and > refreshed on the users screen instantly. That new > info will become > available to all other users immediately. By looking > at the examples in > the downloaded package, I think the loadPanel is a > very good tool as > part of this thing I'm building. And I still don't > know how to graft > that into my codes. But I believe eventually, with > your help, all these > features will fit in nicely. > > I love people on this mailing list. You guys are > fabulous in responding > quickly. Thanks. > > Raymond Irving wrote: > > >I don't think you need the <div id="target"> tag. > Try > >rewritting your code to reflect the following: > > > >var lyrmaster = dynapi.document.addChild(new > >DynLayer('<img > >src="./insertion_embed.png">',50,150,null,null,'silver')); > >// Note: w & h can only be null or integer values > > > >var lyr1 = lyrmaster.addChild(new DynLayer('I > >want this layer to respond to clicking, and pop up > >lyr3', 50, 50, 200, 100, 'red')); > > > >// setup event listener > >var el = { > > onclick : function(e){ > > lyr2.set.Visible(true); > > } > >}; > >// add event listener to layer > >lyr1.addEventListener(el); > > > >var lyr2 = ... > >var lyr3 = ... > > > > > >-- > >Raymond Irving > > > >--- Yanglong Zhu <yz...@ou...> wrote: > > > > > >>Hi everyone, > >> > >>I'm new here. > >>I just started trying DynAPI out. I have had some > >>successes. But I have > >>lots of questions as well. So far, I can combine > my > >>own code with > >>DynLayer to generate interactive editing features > in > >>Mozilla , however > >>IE is very stubbon to be reigned in. My question > is: > >>How do you add > >>eventListener() to a element generated in > >>DynLayer()? > >> > >>var lyrmaster = dynapi.document.addChild(new > >>DynLayer('<img > >> > >> > >> > >src="./insertion_embed.png">',50,150,'auto','auto','silver')); > > > > > >>var lyr1 = lyrmaster.addChild(new DynLayer('<div > >>id="target" > >>onmouseover="lyr2.set.Visible(true);return > false;">I > >>want this div to > >>respond to clicking, and pop up lyr3</div> ', 50, > >>50, 200, 100, 'red')); > >>var lyr2 = ... > >>var lyr3 = ... > >> > >>The key part I am trying to get working is how to > >>add an eventListener > >>to the element id="target", and pops up lyr3. I > use > >>my own code can > >>make it work in Mozilla. However it does not work > in > >>IE. Besides I > >>believe DynAPI must have a nicer way to do this in > >>IE and Mozilla than > >>what I have come up with. > >> > >>Thanks. > >> > >>Yanglong > >> > >> > >> > >> > >> > >> > >> > >------------------------------------------------------- > > > > > >>This sf.net email is sponsored by:ThinkGeek > >>Welcome to geek heaven. > >>http://thinkgeek.com/sf > >>_______________________________________________ > >>Dynapi-Help mailing list > >>Dyn...@li... > >> > >> > >> > >https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > > >__________________________________ > >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 > >Dyn...@li... > >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 > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |