File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/BootstrapBlazor/Components/Watermark Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ const createWatermark = watermark => {
8484 const div = document . createElement ( 'div' ) ;
8585 const { base64, styleSize } = bg ;
8686 div . style . backgroundImage = `url(${ base64 } )` ;
87- div . style . backgroundSize = `${ styleSize . toFixed ( 3 ) } px ${ styleSize . toFixed ( 3 ) } px` ;
87+ div . style . backgroundSize = `${ styleSize . toFixed ( 2 ) } px ${ styleSize . toFixed ( 2 ) } px` ;
8888 div . style . backgroundRepeat = 'repeat' ;
8989 div . style . pointerEvents = 'none' ;
9090 div . style . opacity = '1' ;
@@ -158,7 +158,9 @@ const monitor = watermark => {
158158 clearWatermark ( watermark ) ;
159159 return ;
160160 }
161- if ( backgroundSize !== `${ options . bg . styleSize . toFixed ( 3 ) } px ${ options . bg . styleSize . toFixed ( 3 ) } px` ) {
161+
162+ const size = parseFloat ( backgroundSize ) ;
163+ if ( Math . abs ( size - options . bg . styleSize ) > 1 ) {
162164 clearWatermark ( watermark ) ;
163165 return ;
164166 }
You can’t perform that action at this time.
0 commit comments