From 8e81e4248325085d8c9832f1e9c34cf29219e097 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 16 Dec 2017 09:43:34 -0500 Subject: use holderjs to set error placeholder dimensions correctly #528 --- www/index.html | 1 + www/js/app.js | 25 ++++++++++++++++++++++++- www/templates/montage-history.html | 4 ++-- www/templates/montage.html | 9 +++------ 4 files changed, 30 insertions(+), 9 deletions(-) (limited to 'www') diff --git a/www/index.html b/www/index.html index bc79ad6d..c820a97e 100644 --- a/www/index.html +++ b/www/index.html @@ -61,6 +61,7 @@ + diff --git a/www/js/app.js b/www/js/app.js index 018d020a..b126230d 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -488,9 +488,32 @@ angular.module('zmApp', [ var url = 'img/novideo.png'; + + + var w = $attributes.imgSpinnerW; + var h = $attributes.imgSpinnerH; + + /* $element.css({ + //width: w+'px', + // height: h+'px', + display: ($attributes.imgSpinnerW && $attributes.imgSpinnerH? 'inline-block' : null), + background:'red', + objectFit: 'fill' + });*/ + + + console.log ("**********"+w+"X"+h); // var hurl = "holder.js/2000x$2000?auto=yes&theme=sky&text=..."; - $element.prop('src', url); + $attributes.$set('data-src', 'holder.js/'+w+'x'+h+'?auto=yes&theme=industrial&text=...'); + Holder.run({images:$element[0], nocss:false}); + + // $element.prop ('width', w+'px'); + // $element.prop ('height', h+'px'); + + + // $element.css({backgroundImage: 'url("' + url + '")'}); + //$attributes.$set('src', url); // $element.prop('data-src', hurl); imageLoadingDataShare.set(0); diff --git a/www/templates/montage-history.html b/www/templates/montage-history.html index 785a348d..2bbd799c 100644 --- a/www/templates/montage-history.html +++ b/www/templates/montage-history.html @@ -24,7 +24,7 @@ or we lose the handle for cleanup forever!-->
- +   @@ -41,7 +41,7 @@
- +   diff --git a/www/templates/montage.html b/www/templates/montage.html index 5036c820..3f6dcb5d 100644 --- a/www/templates/montage.html +++ b/www/templates/montage.html @@ -104,18 +104,15 @@
-
- - - - +
+
- +