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 58
58
<item name =" modal" xsi : type =" string" >configurableModal</item >
59
59
<item name =" dataScope" xsi : type =" string" >productFormConfigurable</item >
60
60
</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 >
62
62
</arguments >
63
63
</block >
64
64
<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');
771
771
"component": "Magento_ConfigurableProduct/js/variations/steps/bulk",
772
772
"appendTo": "<?= /* @noEscape */ $ block ->getParentComponentName () ?> ",
773
773
"noImage": "<?= /* @noEscape */ $ block ->getNoImageUrl () ?> ",
774
- "variationsComponent": "<?= /* @noEscape */ $ block ->getData ('config/form ' ) ?> .configurableVariations",
774
+ "variationsComponent": "<?= /* @noEscape */ $ block ->getData ('config/form ' )
775
+ ?> .configurableVariations",
775
776
"isResizeEnabled": <?= /* @noEscape */ $ viewModel ->isResizeEnabled () ?> ,
776
777
"maxWidth": <?= /* @noEscape */ $ viewModel ->getMaxWidth () ?> ,
777
778
"maxHeight": <?= /* @noEscape */ $ viewModel ->getMaxHeight () ?>
Original file line number Diff line number Diff line change @@ -463,19 +463,19 @@ define([
463
463
// initialize Uppy upload
464
464
uppy . use ( Uppy . Dashboard , options ) ;
465
465
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
+ }
479
479
480
480
// drop area for file upload
481
481
uppy . use ( Uppy . DropTarget , {
You can’t perform that action at this time.
0 commit comments