File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
app/code/Magento/Catalog/Block/Product/View Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ public function getOptionsJson()
105105 $ optionItems ['thumbmargin ' ] = (int )$ this ->escapeHtml ($ this ->getVar ("gallery/thumbmargin " ));
106106 }
107107
108+ if ($ this ->getVar ("product_image_white_borders " )) {
109+ $ optionItems ['whiteBorders ' ] =
110+ (int )$ this ->escapeHtml ($ this ->getVar ("product_image_white_borders " ));
111+ }
112+
108113 return $ this ->jsonSerializer ->serialize ($ optionItems );
109114 }
110115
@@ -151,6 +156,11 @@ public function getFSOptionsJson()
151156 (int )$ this ->escapeHtml ($ this ->getVar ("gallery/fullscreen/thumbmargin " ));
152157 }
153158
159+ if ($ this ->getVar ("product_image_white_borders " )) {
160+ $ fsOptionItems ['whiteBorders ' ] =
161+ (int )$ this ->escapeHtml ($ this ->getVar ("product_image_white_borders " ));
162+ }
163+
154164 return $ this ->jsonSerializer ->serialize ($ fsOptionItems );
155165 }
156166}
Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ define([
115115 config . options . thumbwidth = _toNumber ( config . options . thumbwidth ) ;
116116 config . options . thumbheight = _toNumber ( config . options . thumbheight ) ;
117117
118+ config . options . whiteBorders = _toNumber ( config . options . whiteBorders ) ;
119+
118120 config . options . swipe = true ;
119121 this . config = config ;
120122
@@ -132,7 +134,10 @@ define([
132134 data : _ . clone ( config . data )
133135 } ;
134136 config . options . ratio = config . options . width / config . options . height ;
135- config . options . height = $ ( element ) . height ( ) ;
137+ config . options . height = null ;
138+ if ( ! config . options . whiteBorders ) {
139+ config . options . height = $ ( element ) . height ( ) ;
140+ }
136141
137142 $ . extend ( true , this . startConfig , config ) ;
138143
You can’t perform that action at this time.
0 commit comments