[Chameleon] sample css problems

Paul Spencer pspencer at dmsolutions.ca
Thu Dec 2 15:19:04 EST 2004


Ken,

the samples are kinda broken in this respect, they are not really there 
to demonstrate good application design ... just some decent widget examples.

The (dhtml) layer positioning code was hacked in to keep things aligned 
when the map size changes, unfortunately it doesn't really work very well.

You can probably just remove any calls to LayerSetSizeInit and do 
relative or absolute positioning as you see fit ...

We'll probably redesign the sample templates at some point to clean up 
some cruft, but for now your best bet might be to start from scratch and 
copy/paste over what you need.

Cheers,

Paul

Ken Sanderson wrote:
> Ok sorta moved the question along further. The problem isnt in my CSS or 
> the HTML, its in the sample.js file. What is the purpose of this section 
> of the function: LayerSetSizeInit()
> 
>     // ReferenceLayer (w+20, h+22)
>     var oLayer = CWCDHTML_GetLayer( 'ReferenceLayer' );
>     oLayer.top = 160 + imgHeight;
>     oLayer.width = imgWidth + 20;
> 
> If I comment this out my CSS works fine. Also I can adjust the 
> oLayer.top '160' to something more appropriate. However I didnt want to 
> do either of these without understanding what other things it might effect?
> 
> Thanks,
> 
> Ken
> 
> Ken Sanderson wrote:
> 
>> I have been adjusting the sample CSS file to fit a project I am 
>> working on. One of the changes I made was adjusting the MainMapLayer 
>> and the PanArrowsLayer div's upwards to better fit with the project 
>> design. This works just as it should, however a problem I am having is 
>> moving the reference layer up to match.
>>
>> It draws as it should, up until the map image is dropped into the 
>> MainMapLayer, then you can see the ReferenceLayer get adjusted 
>> downwards  to an improper position. Same holds true for a change I 
>> made the legend/other tools div's where they extend to the bottom of 
>> the page. Works fine up till the map image gets drawn, then it pulls 
>> back up to a shorter height. If I remove the CWC tag that draws the 
>> map the page draws exactly as I want it to.
>>
>> Anyone experience this or have thoughts on what might be going on. I 
>> have looked at the source output and I dont see any problems.
>>
>> Ken
>>
>> _______________________________________________
>> Chameleon mailing list
>> Chameleon at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/chameleon
>>
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

-- 
+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+


More information about the Chameleon mailing list