Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.
This repository was archived by the owner on May 6, 2021. It is now read-only.

Small fix for the ResourceSatus plugin  #415

@tdipisa

Description

@tdipisa

The ResourceStatus tree node checks should be fixed. In more details:

  if(node.isLeaf()){
     var layerNode = this.treeRoot.findChild("name", node.attributes.layer.params.LAYERS, true);

     if(layerNode){ 
         layerNode.getUI().toggleCheck(node.attributes.checked);
     }
  }

This check fails in very particular cases when 'params' is undefined (like for the OL empty background):

  {
    "source": "ol",
    "group": "background",
    "fixed": true,
    "type": "OpenLayers.Layer",
    "visibility": false,
    "args": [
        "None", {"visibility": false}
    ]
  }

In this case, without the fix, the configuration below should be used:

        {
             "source": "ol",
             "title": "Vuoto",
             "group": "background",
             "fixed": true,
             "type": "OpenLayers.Layer",
             "visibility": false,
             "args": [
                     "None", {"visibility": false, "params":{"LAYERS": "Vuoto"}}
              ]
        } 

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions