@@ -121,7 +121,7 @@ define([
121
121
'background' : 'url("' + thumb + '") no-repeat center' , //Background case
122
122
'background-size' : 'initial' ,
123
123
'width' : width + 'px' ,
124
- 'height' : height + 'px'
124
+ 'height' : height + 'px'
125
125
} ) ;
126
126
$image . show ( ) ;
127
127
} else if ( type === 1 ) {
@@ -516,8 +516,8 @@ define([
516
516
type = parseInt ( optionConfig [ id ] . type , 10 ) ;
517
517
value = optionConfig [ id ] . hasOwnProperty ( 'value' ) ? optionConfig [ id ] . value : '' ;
518
518
thumb = optionConfig [ id ] . hasOwnProperty ( 'thumb' ) ? optionConfig [ id ] . thumb : '' ;
519
- width = sizeConfig . swatch_thumb . width ;
520
- height = sizeConfig . swatch_thumb . height ;
519
+ width = _ . has ( sizeConfig , 'swatchThumb' ) ? sizeConfig . swatchThumb . width : 110 ;
520
+ height = _ . has ( sizeConfig , 'swatchThumb' ) ? sizeConfig . swatchThumb . height : 90 ;
521
521
label = this . label ? this . label : '' ;
522
522
attr =
523
523
' id="' + controlId + '-item-' + id + '"' +
@@ -551,8 +551,8 @@ define([
551
551
} else if ( type === 2 ) {
552
552
// Image
553
553
html += '<div class="' + optionClass + ' image" ' + attr +
554
- ' style="background: url(' + value + ') no-repeat center; background-size: initial;width:'
555
- + sizeConfig . swatch_image . width + 'px; height:' + sizeConfig . swatch_image . height + 'px">' + '' +
554
+ ' style="background: url(' + value + ') no-repeat center; background-size: initial;width:' +
555
+ sizeConfig . swatchImage . width + 'px; height:' + sizeConfig . swatchImage . height + 'px">' + '' +
556
556
'</div>' ;
557
557
} else if ( type === 3 ) {
558
558
// Clear
0 commit comments