Use _pe.data.getData(elm, 'wet-boew') to retrieve an object from the data-wet-boew attribute. See src/js/workers/share.js and src/js/workers/sessiontimeout.js for examples of the new code. Also optimizes retrieval of global overrides (wet_boew_geomap).

From: Nick Schonning [mailto:notifications@github.com]
Sent: Friday, March 15, 2013 06:26 PM Eastern Standard Time
To: wet-boew/wet-boew <wet-boew@noreply.github.com>
Cc: Jackson, Paul
Subject: Re: [wet-boew] Feature geomap (#1539)


In src/js/workers/geomap.js:

> +                             useLegend: false,
> +                             useTab: false
> +                     };
> +
> +                     // Class-based overrides - use undefined where no override of defaults or settings.js should occur
> +                     overrides = {
> +                             useScaleLine: elm.hasClass('scaleline') ? true : undefined,
> +                             useMousePosition: elm.hasClass('position') ? true : undefined,
> +                             debug: elm.hasClass('debug') ? true : false,
> +                             useLegend: elm.hasClass('legend') ? true : false,
> +                             useTab: elm.hasClass('tab') ? true : false
> +                     };
> +
> +                     // Extend the defaults with settings passed through settings.js (wet_boew_geomap), class-based overrides and the data-wet-boew attribute
> +                     // Only needed if there are configurable options (has 'metadata' dependency)
> +                     $.metadata.setType("attr", "data-wet-boew");


The metadata plugin has been removed from most of the plugins now
@pjackson28<https://github.com/pjackson28> what is your new alternate to this?

—
Reply to this email directly or view it on GitHub<https://github.com/wet-boew/wet-boew/pull/1539/files#r3400696>.