JSFiddle - React, Tailwind, and code Playground

by fxi

HTML

<div id="test"></div>

CSS

html,
body {
  height: 100%;
  width: 100%;
}

#test {
  height: 100%;
  width: 100%;
}

JavaScript

var g1 = {
  "type": "FeatureCollection",
  "features": [{
    "type": "Feature",
    "properties": {},
    "geometry": {
      "type": "MultiPolygon",
      "coordinates": [
        [
          [
            [
              20.214843749999996, -0.5053645409602877
            ],
            [
              22.2802734375, -0.5053645409602877
            ],
            [
              22.2802734375,
              0.9008417889908868
            ],
            [
              20.214843749999996,
              0.9008417889908868
            ],
            [
              20.214843749999996, -0.5053645409602877
            ]
          ],
          [
            [
              21.3134765625,
              0.4174767746707514
            ],
            [
              20.80810546875,
              0.37353251022880474
            ],
            [
              20.85205078125, -0.21972602392080884
            ],
            [
              21.4013671875, -0.15380840901698828
            ],
            [
              21.3134765625,
              0.4174767746707514
            ]
          ]
        ]
      ]
    }
  }]
}

var elTest = document.getElementById("test");

var a = (function(root, factory) {

  'use strict';

  // Set up Smallworld for the appropriate environment. First AMD…
  if (typeof define === 'function' && define.amd) {

    define(['exports'], function(exports) {
      root.Smallworld = factory(root, exports);
    });

    // Next, for Node.js and CommonJS.
  } else if (typeof exports !== 'undefined') {

    factory(root, exports);

    // Finally, as a browser global
  } else {

    root.Smallworld = factory(root);

  }

}(this, function(root) {

  'use strict';

  // --------------------------------------------------------------------------
  // Helpers
  // --------------------------------------------------------------------------

  // Fills in empty values in the first argument with values
  // found in subsequent arguments
  function extend(obj) {
  ...