From bf09a5cf7326902bbf69157e5f8dfc8bbcf301b6 Mon Sep 17 00:00:00 2001 From: PliablePixels Date: Mon, 17 Aug 2015 20:10:17 -0400 Subject: shows icon if no video connection - hopefully also fixes android bouncing images --- www/js/app.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'www/js/app.js') diff --git a/www/js/app.js b/www/js/app.js index 5df0278b..b10536ec 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -126,17 +126,12 @@ angular.module('zmApp', [ // show an image-missing image FIXME: never seems to get called $element.bind('error',function () { -console.log ("***** IMAGE ELEMENT ERROR CALLED " + w + "x" + h); - var w = $element.width(); - var h = $element.height(); - - // using 20 here because it seems even a missing image will have ~18px width - // after this error function has been called - //if (w <= 20) { w = 100; } - //if (h <= 20) { h = 100; } + + loader.remove(); + imageLoadingDataShare.set(0); + var url = 'img/novideo.png'; $element.prop('src', url); - //$element.css('border', 'double 3px #cccccc'); }); function loadImage() { @@ -146,11 +141,7 @@ console.log ("***** IMAGE ELEMENT ERROR CALLED " + w + "x" + h); imageLoadingDataShare.set(0); } }); - //PP - $element.bind('error', function(){ - loader.remove(); - imageLoadingDataShare.set(0); - }); + -- cgit v1.2.3