|
From: Raymond I. <xw...@ya...> - 2003-04-27 17:39:54
|
--- Kevin <ke...@ke...> wrote:
> Solution.
>
> 1) I like the way borders are done in dynapi for
> ns4. Layers for top,
> bottom, left and right. So if we implement this for
> all browsers and
> not mess with the style it would be consistent,
> though dynlayer width
> will include border.
That's true, but this would require us to us more
layers. The solution is ok for ns4 (as it's an old
browser) but css now available I think it's much more
efficient to use css.
> 2) If we mess with border style for dom browsers.
> For the
> dynlayer size to consistent with ns4 border
> implementation
> it''s the dynlayer width that should be set to the
> actual element
> width plus twice the size of the border.
If we set the actual elm size to be less than twice
the border size then it would be consistent with the
ns4 implementation:
lyr.w = 100
lyr.h = 100
lyr.css.width=(lyr.w-(lyr._border*2))
lyr.css.height=(lyr.h-(lyr._border*2))
In the above the dynLayer width/height will always be
100x100 although the actual elm size will be 98x98.
This IMO shouldn't be a problem as the content inside
the elm will either wrap or overflow. This will only
be true when borders are set for DynLayers on DOM
browsers.
Agree? Or should we use the NS4 design despite the
draw backs or having to use four additional layers?
--
Raymond Irving
> I have a setBorder method that fixes the bug and
> should
> work ok:
>
> p.setBorder=function(w,c,s) {
> var width=w||0;
> var bstyle=(typeof(s)=='string')?s:'solid';
> var bcolor=(typeof(c)=='string')?c:'black';
> this._border=width+'px '+bstyle+' '+bcolor;
> this._cssBorder='border:'+this._border+'; ';
> var s=this.css;
> if(s) {
> s.borderWidth=width+'px';
> s.borderStyle=bstyle;
> s.borderColor=bcolor;
> }
> };
>
> Just need to work out what the dynlayer w & h should
> be
> as the w & h of a dynlayer should be the same as
> when
> using a border (internal border layers) in ns4.
>
> -
> Kevin
>
>
> > > For example in dom browsers we would something
> like:
> > >
> > > p.setSize = function(w,h) {
> > > .....
> > > if (cw) this.css.width =
> > > (this.w-(this._border*2))||0;
> > > if (ch) this.css.height =
> > > (this.h-(this._border*2))||0;
> > > ....
> > > }
> > >
> > >
> > > What do you think? Any other suggestions? Can we
> do
> > > this?
> > >
> > >
> > > --
> > > Raymond Irving
> > >
> > >
> __________________________________________________
> > > Do you Yahoo!?
> > > The New Yahoo! Search - Faster. Easier. Bingo
> > > http://search.yahoo.com
> > >
> > >
> > >
>
-------------------------------------------------------
> > > This sf.net email is sponsored by:ThinkGeek
> > > Welcome to geek heaven.
> > > http://thinkgeek.com/sf
> > > _______________________________________________
> > > Dynapi-Dev mailing list
> > > Dyn...@li...
> > >
>
http://www.mail-archive.com/dyn...@li.../
> > --
> > Dan Willemsen <da...@wi...>
> >
> >
> >
> >
>
-------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Dynapi-Dev mailing list
> > Dyn...@li...
> >
>
http://www.mail-archive.com/dyn...@li.../
>
>
>
>
-------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Dynapi-Dev mailing list
> Dyn...@li...
>
http://www.mail-archive.com/dyn...@li.../
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
|