@@ -566,9 +566,24 @@ export function Edit(props) {
566566 const maskPositionArray = iterations > 1 ? range ( 0 , 100.1 , 100 / ( iterations - 1 ) ) : [ 0 ] ;
567567 const maskPositionString = ( maskPositionArray . join ( '%,' ) + '%' ) . replace ( / ( ^ , ) | ( , $ ) / g, '' ) ;
568568 const maskAspectRatioString = iterations + '/1' ;
569- const maskHeightString = progressWidth ? progressWidth * 11.5 + 'px' : '80px' ;
570- const maskHeightStringTablet = progressWidthTablet ? progressWidthTablet * 11.5 + 'px' : '' ;
571- const maskHeightStringMobile = progressWidthMobile ? progressWidthMobile * 11.5 + 'px' : '' ;
569+ const maskHeight = progressWidth ? progressWidth * 11.5 : 80 ;
570+ const maskHeightTablet = progressWidthTablet ? progressWidthTablet * 11.5 : 0 ;
571+ const maskHeightMobile = progressWidthMobile ? progressWidthMobile * 11.5 : 0 ;
572+ const maskHeightString = maskHeight ? maskHeight + 'px' : '80px' ;
573+ const maskHeightStringTablet = maskHeightTablet ? maskHeightTablet + 'px' : '' ;
574+ const maskHeightStringMobile = maskHeightMobile ? maskHeightMobile + 'px' : '' ;
575+ const maskWidth = maskHeight * iterations ;
576+ const maskWidthTablet = maskHeightTablet ? maskHeightTablet * iterations : 0 ;
577+ const maskWidthMobile = maskHeightMobile ? maskHeightMobile * iterations : 0 ;
578+ const maskWidthString = maskWidth + 'px' ;
579+ const maskWidthStringTablet = maskWidthTablet ? maskWidthTablet + 'px' : '' ;
580+ const maskWidthStringMobile = maskWidthMobile ? maskWidthMobile + 'px' : '' ;
581+ const previewMaskWidthString = getPreviewSize (
582+ previewDevice ,
583+ maskWidthString ,
584+ maskWidthStringTablet ,
585+ maskWidthStringMobile
586+ ) ;
572587 const previewMaskHeightString = getPreviewSize (
573588 previewDevice ,
574589 maskHeightString ,
@@ -594,6 +609,8 @@ export function Edit(props) {
594609 aspect-ratio: ${ maskAspectRatioString } ;
595610
596611 height: ${ previewMaskHeightString } ;
612+ width: ${ previewMaskWidthString } ;
613+ max-width: 100%;
597614 }
598615 ` ;
599616 }
0 commit comments