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()
105
105
$ optionItems ['thumbmargin ' ] = (int )$ this ->escapeHtml ($ this ->getVar ("gallery/thumbmargin " ));
106
106
}
107
107
108
+ if ($ this ->getVar ("product_image_white_borders " )) {
109
+ $ optionItems ['whiteBorders ' ] =
110
+ (int )$ this ->escapeHtml ($ this ->getVar ("product_image_white_borders " ));
111
+ }
112
+
108
113
return $ this ->jsonSerializer ->serialize ($ optionItems );
109
114
}
110
115
@@ -151,6 +156,11 @@ public function getFSOptionsJson()
151
156
(int )$ this ->escapeHtml ($ this ->getVar ("gallery/fullscreen/thumbmargin " ));
152
157
}
153
158
159
+ if ($ this ->getVar ("product_image_white_borders " )) {
160
+ $ fsOptionItems ['whiteBorders ' ] =
161
+ (int )$ this ->escapeHtml ($ this ->getVar ("product_image_white_borders " ));
162
+ }
163
+
154
164
return $ this ->jsonSerializer ->serialize ($ fsOptionItems );
155
165
}
156
166
}
Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ define([
115
115
config . options . thumbwidth = _toNumber ( config . options . thumbwidth ) ;
116
116
config . options . thumbheight = _toNumber ( config . options . thumbheight ) ;
117
117
118
+ config . options . whiteBorders = _toNumber ( config . options . whiteBorders ) ;
119
+
118
120
config . options . swipe = true ;
119
121
this . config = config ;
120
122
@@ -132,7 +134,10 @@ define([
132
134
data : _ . clone ( config . data )
133
135
} ;
134
136
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
+ }
136
141
137
142
$ . extend ( true , this . startConfig , config ) ;
138
143
You can’t perform that action at this time.
0 commit comments