AntonLV 13 лет назад
Родитель
Сommit
c23cb5fcc5
2 измененных файлов с 11 добавлено и 3 удалено
  1. 10 2
      modules/boonex/timeline/js/main.js
  2. 1 1
      modules/boonex/timeline/js/view.js

+ 10 - 2
modules/boonex/timeline/js/main.js

@@ -32,12 +32,20 @@ BxTimelineMain.prototype.destroyMasonry = function() {
 };
 
 BxTimelineMain.prototype.appendMasonry = function(oItems) {
-	var oItems = $(oItems);        			
+	var $this = this;
+	var oItems = $(oItems);
+	oItems.find('img.bx-tl-item-image').load(function() {
+		$this.reloadMasonry();
+	});
 	$(this.sIdView + ' .bx-tl-items').append(oItems).masonry('appended', oItems);
 };
 
 BxTimelineMain.prototype.prependMasonry = function(oItems) {
-	var oItems = $(oItems);        			
+	var $this = this;
+	var oItems = $(oItems);
+	oItems.find('img.bx-tl-item-image').load(function() {
+		$this.reloadMasonry();
+	});
 	$(this.sIdView + ' .bx-tl-items').prepend(oItems).masonry('prepended', oItems);
 };
 

+ 1 - 1
modules/boonex/timeline/js/view.js

@@ -12,7 +12,7 @@ function BxTimelineView(oOptions) {
     	$('.bx-tl-item').resize(function() {
     		$this.reloadMasonry();
     	});
-    	$('.bx-tl-item-image').load(function() {
+    	$('img.bx-tl-item-image').load(function() {
     		$this.reloadMasonry();
     	});
     });