From b5adce46061c4dc46136621405d734e66694c7e0 Mon Sep 17 00:00:00 2001 From: Tunghsiao Liu Date: Thu, 10 Mar 2016 21:34:54 +0800 Subject: [PATCH] fix(script): update default image styles reset --- _app/assets/themes/curtana/_js/lightense.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/_app/assets/themes/curtana/_js/lightense.js b/_app/assets/themes/curtana/_js/lightense.js index cee211677..b31a573aa 100644 --- a/_app/assets/themes/curtana/_js/lightense.js +++ b/_app/assets/themes/curtana/_js/lightense.js @@ -39,11 +39,9 @@ var Lightense = (function() { } function track (element) { - // Apply zoom-in cursor for target images - element.style.cursor = 'zoom-in'; - // Element needs a src at minumun if (element.getAttribute('data-image') || element.src) { + element.style.cursor = 'zoom-in'; element.addEventListener('click', function () { init(this); }, false); @@ -91,8 +89,12 @@ var Lightense = (function() { var imageProperties = { 'display': 'block', + 'width': 'auto', + 'height': 'auto', 'maxWidth': '100%', 'maxHeight': '100%', + 'minWidth': '0', + 'minHeight': '0', 'padding': '0', 'margin': '0 auto' };