GEOLYTIX / xyz

An open source javascript framework for spatial data and application interfaces.
MIT License
86 stars 25 forks source link

Reverse theme style assignment; Check for useridb flag in locale. #1353

Open dbauszus-glx opened 4 days ago

dbauszus-glx commented 4 days ago

The theme style assignment in the styleParser was the wrong way. The theme style should be spread into a structured clone of the default style before being assigned as theme style.

The default view script should check for a useridb flag in the locale in addition to the url parameter [hook] check.

If the theme style fillColor is blue, and the default fillColor is red, then blue must be assigned as the fillColor if the theme is current.

Storing styles will not work otherwise because no matter which property you change the default property would always be assigned on top of the theme style, not the other way around.

{
  style: {
    default: {
      fillColor: 'red'
    },
    theme: 
      style: {
        fillColor: 'blue'
      }
    }
  }
}