diff --git a/webroot/rsrc/css/aphront/lightbox-attachment.css b/webroot/rsrc/css/aphront/lightbox-attachment.css index ed2235997a..517ec6e6b2 100644 --- a/webroot/rsrc/css/aphront/lightbox-attachment.css +++ b/webroot/rsrc/css/aphront/lightbox-attachment.css @@ -19,7 +19,9 @@ } .lightbox-attachment img { - margin: 50px auto 0; + margin: 3% auto 0; + max-height: 90%; + max-width: 90%; } .lightbox-attachment .loading { diff --git a/webroot/rsrc/js/application/core/behavior-lightbox-attachments.js b/webroot/rsrc/js/application/core/behavior-lightbox-attachments.js index 9e3de0b488..c526289b61 100644 --- a/webroot/rsrc/js/application/core/behavior-lightbox-attachments.js +++ b/webroot/rsrc/js/application/core/behavior-lightbox-attachments.js @@ -4,7 +4,6 @@ * javelin-stratcom * javelin-dom * javelin-mask - * javelin-vector * javelin-util */ @@ -233,37 +232,7 @@ JX.behavior('lightbox-attachments', function (config) { return; } var img = JX.DOM.find(lightbox, 'img'); - var d = JX.Vector.getDim(img); - JX.Stratcom.addData(img, { x : d.x, y : d.y } ); - - return resizeLightBox(e); - } - - function resizeLightBox(e) { - if (!lightbox) { - return; - } - var img = JX.DOM.find(lightbox, 'img'); - var v = JX.Vector.getViewport(); - var d = JX.Stratcom.getData(img); - - var w = d.x; - var h = d.y; - var scale = 0; - if (w > (v.x - x_margin)) { - scale = (v.x - x_margin) / w; - w = w * scale; - h = h * scale; - } - if (h > (v.y - y_margin)) { - scale = (v.y - y_margin) / h; - w = w * scale; - h = h * scale; - } - JX.DOM.alterClass(img, 'loading', false); - JX.$V(w, h).setDim(img); - JX.Vector.getViewport().setDim(lightbox); } JX.Stratcom.listen( @@ -272,12 +241,6 @@ JX.behavior('lightbox-attachments', function (config) { loadLightBox ); - JX.Stratcom.listen( - 'resize', - null, - resizeLightBox - ); - JX.Stratcom.listen( 'keydown', null,