File tree Expand file tree Collapse file tree 3 files changed +16
-15
lines changed
app/code/Magento/ConfigurableProduct/view/adminhtml
templates/catalog/product/edit/attribute/steps Expand file tree Collapse file tree 3 files changed +16
-15
lines changed Original file line number Diff line number Diff line change 5858 <item name =" modal" xsi : type =" string" >configurableModal</item >
5959 <item name =" dataScope" xsi : type =" string" >productFormConfigurable</item >
6060 </argument >
61- <argument name =" view_model" xsi : type =" object" >Magento\ConfigurableProduct\ViewModel\uploadResizeConfigValue </argument >
61+ <argument name =" view_model" xsi : type =" object" >Magento\ConfigurableProduct\ViewModel\UploadResizeConfigValue </argument >
6262 </arguments >
6363 </block >
6464 <block class =" Magento\ConfigurableProduct\Block\Adminhtml\Product\Steps\Summary" name =" step4" template =" Magento_ConfigurableProduct::catalog/product/edit/attribute/steps/summary.phtml" >
Original file line number Diff line number Diff line change @@ -771,7 +771,8 @@ $uploadUrl = $block->getUrl('catalog/product_gallery/upload');
771771 "component": "Magento_ConfigurableProduct/js/variations/steps/bulk",
772772 "appendTo": "<?= /* @noEscape */ $ block ->getParentComponentName () ?> ",
773773 "noImage": "<?= /* @noEscape */ $ block ->getNoImageUrl () ?> ",
774- "variationsComponent": "<?= /* @noEscape */ $ block ->getData ('config/form ' ) ?> .configurableVariations",
774+ "variationsComponent": "<?= /* @noEscape */ $ block ->getData ('config/form ' )
775+ ?> .configurableVariations",
775776 "isResizeEnabled": <?= /* @noEscape */ $ viewModel ->isResizeEnabled () ?> ,
776777 "maxWidth": <?= /* @noEscape */ $ viewModel ->getMaxWidth () ?> ,
777778 "maxHeight": <?= /* @noEscape */ $ viewModel ->getMaxHeight () ?>
Original file line number Diff line number Diff line change @@ -463,19 +463,19 @@ define([
463463 // initialize Uppy upload
464464 uppy . use ( Uppy . Dashboard , options ) ;
465465
466- // // Use 'self.options' to access component options
467- // if (self.options?.isResizeEnabled) {
468- // uppy.use(Uppy.Compressor, {
469- // maxWidth: self.options.maxWidth,
470- // maxHeight: self.options.maxHeight,
471- // quality: 0.92,
472- // beforeDraw() {
473- // if (!allowedResize) {
474- // this.abort();
475- // }
476- // }
477- // });
478- // }
466+ // Use 'self.options' to access component options
467+ if ( self . options ?. isResizeEnabled ) {
468+ uppy . use ( Uppy . Compressor , {
469+ maxWidth : self . options . maxWidth ,
470+ maxHeight : self . options . maxHeight ,
471+ quality : 0.92 ,
472+ beforeDraw ( ) {
473+ if ( ! allowedResize ) {
474+ this . abort ( ) ;
475+ }
476+ }
477+ } ) ;
478+ }
479479
480480 // drop area for file upload
481481 uppy . use ( Uppy . DropTarget , {
You can’t perform that action at this time.
0 commit comments