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 => {
84
84
const div = document . createElement ( 'div' ) ;
85
85
const { base64, styleSize } = bg ;
86
86
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` ;
88
88
div . style . backgroundRepeat = 'repeat' ;
89
89
div . style . pointerEvents = 'none' ;
90
90
div . style . opacity = '1' ;
@@ -158,7 +158,9 @@ const monitor = watermark => {
158
158
clearWatermark ( watermark ) ;
159
159
return ;
160
160
}
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 ) {
162
164
clearWatermark ( watermark ) ;
163
165
return ;
164
166
}
You can’t perform that action at this time.
0 commit comments