Sha256: c8baa9ba668efe283747363c3a4b9e939ccad99fd45f5d16bca9ae7cb707067b

Contents?: true

Size: 479 Bytes

Versions: 4

Compression:

Stored size: 479 Bytes

Contents

Spotlight.onLoad(function() {
  $('[data-behavior="iiif-cropper"]').croppable();
});


/*
  IIIF image cropping plugin
  Add iiif-crop data-attributes to file input (with data-behavior='iiif-cropper') to instantiate.
*/

(function($) {
  $.fn.croppable = function() {
    var croppables = this;

    var Crop = require('spotlight/crop');
    $(croppables).each(function() {
      var cropElement = $(this);
      new Crop(cropElement);
    });

    return this;
  };
})(jQuery);

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
blacklight-spotlight-0.33.3 app/assets/javascripts/spotlight/croppable.js
blacklight-spotlight-0.33.2 app/assets/javascripts/spotlight/croppable.js
blacklight-spotlight-0.33.1 app/assets/javascripts/spotlight/croppable.js
blacklight-spotlight-0.33.0 app/assets/javascripts/spotlight/croppable.js