Sha256: f6a108a4e3b1071c9b7da09376cb456a769cddd25bddbb99951610f919ad34a3

Contents?: true

Size: 949 Bytes

Versions: 14

Compression:

Stored size: 949 Bytes

Contents

//= require leaflet
//= require native.history

!function(global) {
  'use strict';

  /**
   * Convert bounding box string to Leaflet LatLngBounds.
   * @param {String} bbox Space-separated string of sw-lng sw-lat ne-lng ne-lat
   * @return {L.LatLngBounds} Converted Leaflet LatLngBounds object
   */
  L.bboxToBounds = function(bbox) {
    bbox = bbox.split(' ');
    if (bbox.length === 4) {
      return L.latLngBounds([[bbox[1], bbox[0]], [bbox[3], bbox[2]]]);
    } else {
      return null;
    }
  };

  var GeoBlacklight = L.Class.extend({
    statics: {
      __version__: '0.0.1',

      debounce: function(fn, delay) {
        var timeout = null;
        return function() {
          var args = arguments, _this = this;
          clearTimeout(timeout);
          timeout = setTimeout(function() {
            fn.apply(_this, args);
          }, delay);
        };
      }
    }
  });

  global.GeoBlacklight = GeoBlacklight;

}(this);

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
geoblacklight-0.12.1 app/assets/javascripts/geoblacklight/geoblacklight.js
geoblacklight-0.12.0 app/assets/javascripts/geoblacklight/geoblacklight.js
geoblacklight-0.11.1 app/assets/javascripts/geoblacklight/geoblacklight.js
geoblacklight-0.11.0 app/assets/javascripts/geoblacklight/geoblacklight.js
geoblacklight-0.10.2 app/assets/javascripts/geoblacklight/geoblacklight.js
geoblacklight-0.10.1 app/assets/javascripts/geoblacklight/geoblacklight.js
geoblacklight-0.10.0 app/assets/javascripts/geoblacklight/geoblacklight.js
geoblacklight-0.9.2 app/assets/javascripts/geoblacklight/geoblacklight.js
geoblacklight-0.9.1 app/assets/javascripts/geoblacklight/geoblacklight.js
geoblacklight-0.9.0 app/assets/javascripts/geoblacklight/geoblacklight.js
geoblacklight-0.8.0 app/assets/javascripts/geoblacklight/geoblacklight.js
geoblacklight-0.7.1 app/assets/javascripts/geoblacklight/geoblacklight.js
geoblacklight-0.7.0 app/assets/javascripts/geoblacklight/geoblacklight.js
geoblacklight-0.6.2 app/assets/javascripts/geoblacklight/geoblacklight.js