vendor/assets/javascripts/uikit/core/grid.js in uikit2-rails-0.1.7 vs vendor/assets/javascripts/uikit/core/grid.js in uikit2-rails-0.1.8
- old
+ new
@@ -1,6 +1,6 @@
-/*! UIkit 2.26.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
+/*! UIkit 2.26.2 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
(function(UI) {
"use strict";
var grids = [];
@@ -8,11 +8,12 @@
UI.component('gridMatchHeight', {
defaults: {
"target" : false,
"row" : true,
- "ignorestacked" : false
+ "ignorestacked" : false,
+ "observe" : false
},
boot: function() {
// init code
@@ -38,22 +39,23 @@
if (!this.columns.length) return;
UI.$win.on('load resize orientationchange', (function() {
var fn = function() {
- $this.match();
+ if ($this.element.is(":visible")) $this.match();
};
UI.$(function() { fn(); });
return UI.Utils.debounce(fn, 50);
})());
- UI.$html.on("changed.uk.dom", function(e) {
- $this.columns = $this.element.children();
- $this.elements = $this.options.target ? $this.find($this.options.target) : $this.columns;
- $this.match();
- });
+ if (this.options.observe) {
+
+ UI.domObserve(this.element, function(e) {
+ if ($this.element.is(":visible")) $this.match();
+ });
+ }
this.on("display.uk.check", function(e) {
if(this.element.is(":visible")) this.match();
}.bind(this));