Changeset 5690 for cowsclient


Ignore:
Timestamp:
07/09/09 12:56:06 (10 years ago)
Author:
pnorton
Message:

Added a minor fix to the layerDisplayOptions to allow default boolean values to be passed as javascript bools rather than strings.

Also made a couple of other minor changes.

Location:
cowsclient/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • cowsclient/trunk/cowsclient/public/js/layerDisplayOptions.js

    r5626 r5690  
    206206             
    207207            var defaultVal = this._getDefaultValue(opt); 
    208             if (defaultVal.toUpperCase() == "TRUE") { 
     208            if (String(defaultVal).toUpperCase() == "TRUE") { 
    209209                input.checked = true; 
    210210            } 
  • cowsclient/trunk/cowsclient/public/js/mapControl.js

    r5626 r5690  
    102102        this.subselControl.switchModeTo('zoombox'); 
    103103         
     104        this._divId = div; 
     105         
     106        var link = document.getElementById('debug_link') 
     107        addHTMLEventListener(link, 'click', this._logLocation, this); 
     108         
     109    }, 
     110     
     111    _logLocation: function() { 
     112        WMSC.log("map div location = " + findPos(document.getElementById(this._divId))); 
     113        WMSC.log("dims location= " + findPos(document.getElementById('dims'))); 
    104114    }, 
    105115     
  • cowsclient/trunk/cowsclient/public/js/utils.js

    r5671 r5690  
    304304    return params; 
    305305} 
     306 
     307findPos = function (obj) { 
     308    var curleft = 0; 
     309    var curtop = 0; 
     310    if (obj.offsetParent) { 
     311        do { 
     312            curleft += obj.offsetLeft; 
     313            curtop += obj.offsetTop; 
     314            WMSC.log(" obj, height, width , left, top= " + obj + "," + obj.offsetHeight + "," + obj.offsetWidth +","+ obj.offsetLeft + "," + obj.offsetTop); 
     315        } while (obj = obj.offsetParent); 
     316         
     317        return [curleft,curtop]; 
     318    } 
     319} 
     320 
  • cowsclient/trunk/cowsclient/public/layout/ddc_vis.css

    r5685 r5690  
    22DIV#visBody { 
    33  margin: 4px; 
     4  width: 100%; 
    45} 
    56 
  • cowsclient/trunk/cowsclient/public/layout/layer_properties.css

    r5626 r5690  
    1717.displayOptionItem label, 
    1818.layerDimItem label { 
    19         width:45%; 
     19        width:35%; 
    2020        line-height:25px; 
    2121        display:inline-block; 
  • cowsclient/trunk/cowsclient/templates/wmsviz.html

    r5685 r5690  
    381381         
    382382 
    383      
     383    <a id='debug_link' href='#'>debug</a> 
    384384 
    385385 
  • cowsclient/trunk/endpoints.txt

    r5685 r5690  
    88http://localhost:5000/coastwms 
    99http://localhost:5000/globalpop/wms 
     10http://localhost:5000/modis/wms 
     11http://localhost:5000/islscp_soil/wms 
    1012http://localhost:5000/landtype/wms3 
    1113http://labs.metacarta.com/wms/vmap0 
Note: See TracChangeset for help on using the changeset viewer.