isotope.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. (function (global, factory) {
  2. if (typeof define === "function" && define.amd) {
  3. define("/Plugin/isotope", ["exports", "jquery", "Plugin"], factory);
  4. } else if (typeof exports !== "undefined") {
  5. factory(exports, require("jquery"), require("Plugin"));
  6. } else {
  7. var mod = {
  8. exports: {}
  9. };
  10. factory(mod.exports, global.jQuery, global.Plugin);
  11. global.PluginIsotope = mod.exports;
  12. }
  13. })(this, function (_exports, _jquery, _Plugin2) {
  14. "use strict";
  15. Object.defineProperty(_exports, "__esModule", {
  16. value: true
  17. });
  18. _exports.default = void 0;
  19. _jquery = babelHelpers.interopRequireDefault(_jquery);
  20. _Plugin2 = babelHelpers.interopRequireDefault(_Plugin2);
  21. var NAME = 'isotope';
  22. var Isotope =
  23. /*#__PURE__*/
  24. function (_Plugin) {
  25. babelHelpers.inherits(Isotope, _Plugin);
  26. function Isotope() {
  27. babelHelpers.classCallCheck(this, Isotope);
  28. return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(Isotope).apply(this, arguments));
  29. }
  30. babelHelpers.createClass(Isotope, [{
  31. key: "getName",
  32. value: function getName() {
  33. return NAME;
  34. }
  35. }, {
  36. key: "render",
  37. value: function render() {
  38. var _this = this;
  39. if (typeof _jquery.default.fn.isotope === 'undefined') {
  40. return;
  41. }
  42. var callback = function callback() {
  43. var $el = _this.$el;
  44. $el.isotope(_this.options);
  45. };
  46. if (this !== document) {
  47. callback();
  48. } else {
  49. (0, _jquery.default)(window).on('load', function () {
  50. callback();
  51. });
  52. }
  53. }
  54. }], [{
  55. key: "getDefaults",
  56. value: function getDefaults() {
  57. return {};
  58. }
  59. }]);
  60. return Isotope;
  61. }(_Plugin2.default);
  62. _Plugin2.default.register(NAME, Isotope);
  63. var _default = Isotope;
  64. _exports.default = _default;
  65. });