From: Kevin <ke...@ke...> - 2003-04-03 23:50:56
|
See my comments below: "Benoit Marchant" <mar...@ma...> wrote: > Hi > > In a test I've been doing, I used not a class="", but I declare a style > in a <style></style> for each of the layers using their ID > like > > <style> > #layer1 {position:absolute; width: ....} > .blueBg {background-color:blue;} > </style> > > and <div id= layer1> Some html </div> > > As far as I understand it class is meant to control the style of > multiple objects. So for example, if you wanted a set of layers to all > have a blue background, you would add class=blueBg Yes but the css would cascade from the object to the class definition. So class background-color would override object background-color. - Kevin > So both are different. I think we need a way to tell dynlayers not to > generate an inline style, when one would exists for it's ID. Now should > we on top of that be able to generate something like <DIV ID=myLayer > style="AStyle"></DIV>, probably,and of course be able to set a class="" > As three options are valid ways of doing it, I think we should handled > them. > > Benoit > > On Thursday, April 3, 2003, at 02:57 PM, Raymond Irving wrote: > > > Sounds ok to me, but how about the following: > > > > lyr.setClass(name,noPreStyle); > > > > When noPreStyle is set to true the api will completely > > remove the style="..." string from <divs> and will > > ignore bgcolor, width, height, left, top, etc for > > <layers> and <ilayers>. The end result is that layers > > will be created much faster. > > > > lyr.setClass('blue_style,box_style',true); > > > > This would require the user to specify all the values > > (e.g. left,top width,etc) of the layer inside the css > > class. > > > > To give the user greater flexibility we could then > > allow them to pass the value 'basic' to the setClass() > > function to have the api only generate the left, top, > > width and heigth values for the style object. > > > > lyr.setClass('blue_style','basic'); > > > > What do you think? > > > > -- > > Raymond Irving > > > > > > --- Kevin <ke...@ke...> wrote: > >> Hello, > >> > >> I've heard Raymond may be doing something in the > >> area of > >> dynapi style objects? Sorry if I've got the wrong > >> idea. > >> > >> Could we have a simple starting point by just > >> passing a class > >> name to the DynLayer constructor or e.g. > >> lyr.setClass('note'). > >> > >> The string 'class="note"' would be inserted in the > >> div/layer/ilayer > >> tag before the big 'style="..."' string so we can > >> pick up a > >> prepared style sheet class from a <style>...</style> > >> section. > >> > >> - > >> Kevin > Dyn...@li... > http://www.mail-archive.com/dyn...@li.../ |