Changes between Version 176 and Version 177 of Help/Styles/MapCSSImplementation


Ignore:
Timestamp:
2020-06-10T15:25:15+02:00 (6 years ago)
Author:
taylor.smock
Comment:

Update JOSM_pref documentation

Legend:

Unmodified
Added
Removed
Modified
  • Help/Styles/MapCSSImplementation

    v176 v177  
    12991299  prints a string representation of `o` to the command line, followed by a new line (for debugging) [''since 7237'']
    13001300 JOSM_pref(''key'', ''default'')::
    1301   Get value from the JOSM advanced preferences. This way you can offer certain options to the user and make the style customizable. It works with strings, numbers, colors and boolean values. [[br]][This function exists since version 3856, but with some restrictions. `JOSM_pref` always returns a string, but in version 7237 and earlier, the automatic conversion of string to boolean and color was not working. You can use the following workarounds for boolean values and color in version 7237 and earlier: `cond(JOSM_pref("myprefkey", "true")="true", "X", "O")` and `html2color(JOSM_pref("mycolor", "#FF345611"))`. These explicit conversions should be no longer necessary in version 7238 and later. Automatic conversion to a number works in any version.]
     1301  Get value from the JOSM advanced preferences. This way you can offer certain options to the user and make the style customizable. It works with strings, numbers, colors and boolean values. [[br]][This function exists since version 3856, but with some restrictions. `JOSM_pref` always returns a string, but in version 7237 and earlier, the automatic conversion of string to boolean and color was not working. You can use the following workarounds for boolean values and color in version 7237 and earlier: `cond(JOSM_pref("myprefkey", "true")="true", "X", "O")` and `html2color(JOSM_pref("mycolor", "#FF345611"))`. These explicit conversions should be no longer necessary in version 7238 and later. Automatic conversion to a number works in any version. Furthermore, in version r16590, it returns strings that can be used to set properties that are used to set colors. So `* { set_color: JOSM_pref("pref", #000000); } *{color: prop("set_color"); }` works now.]
    13021302 setting()::
    13031303  to use a [wikitr:/Help/Styles/MapCSSImplementation#Stylesettings style setting] [''since 7450'']