From c3ddec3d3817ccc814a369fee3b255692d932df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alvar=20Hyv=C3=B6nen?= Date: Thu, 16 Nov 2017 17:40:37 +0200 Subject: [PATCH] Made it possible to add non-grid items under the isotope element. --- dist/vue_isotope.js | 17 ++++++++--------- dist/vue_isotope.min.js | 2 +- src/vue_isotope.js | 9 +++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dist/vue_isotope.js b/dist/vue_isotope.js index b7d0af1..14a583f 100644 --- a/dist/vue_isotope.js +++ b/dist/vue_isotope.js @@ -38,25 +38,24 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr }; var isotopeComponent = { + name: 'isotope', + props: props, render: function render(h) { - var _this = this; - var map = {}; var prevChildren = this.prevChildren = this.children; var rawChildren = this.$slots.default || []; var children = this.children = []; var removedIndex = this.removedIndex = []; - rawChildren.forEach(function (elt) { - return addClass(elt, _this.itemSelector); - }); - for (var i = 0; i < rawChildren.length; i++) { var c = rawChildren[i]; if (c.tag) { if (c.key != null && String(c.key).indexOf('__vlist') !== 0) { + if (c.key !== '$ignore') { + addClass(c, this.itemSelector); + } children.push(c); map[c.key] = c; } else { @@ -94,12 +93,12 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr }; update(options.getSortData); update(options.getFilterData); + this._isotopeOptions = options; if (options.filter) { options.filter = this.buildFilterFunction(options.filter); } this.$nextTick(function () { - _this2._isotopeOptions = options; _this2.link(); _this2.listen(); var iso = new Isotope(_this2.$el, options); @@ -262,7 +261,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr return isotopeComponent; } - if (typeof exports == "object") { + if (typeof exports === "object") { var _ = require("lodash"), Isotope = require("isotope-layout"); module.exports = buildVueIsotope(_, Isotope); @@ -274,4 +273,4 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr var isotope = buildVueIsotope(window._, window.Isotope); Vue.component('isotope', isotope); } -})(); \ No newline at end of file +})(); diff --git a/dist/vue_isotope.min.js b/dist/vue_isotope.min.js index 2be67ac..5af11b6 100644 --- a/dist/vue_isotope.min.js +++ b/dist/vue_isotope.min.js @@ -1 +1 @@ -"use strict";function _toConsumableArray(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e")}}var h=this.displayChildren=[].concat(s);if(r)for(var d=0;d")}}var c=this.displayChildren=[].concat(o);if(n)for(var h=0;h addClass(elt, this.itemSelector)) - for (let i = 0; i < rawChildren.length; i++) { const c = rawChildren[i] if (c.tag) { if (c.key != null && String(c.key).indexOf('__vlist') !== 0) { - children.push(c) - map[c.key] = c + if (c.key !== '$ignore') { + addClass(c, _this.itemSelector) + } + children.push(c); + map[c.key] = c; } else { const opts = c.componentOptions const name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag