File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -775,10 +775,10 @@ function Highlighter(options = hhDefaultOptions) {
775775
776776 // Annotatable container resize (debounced)
777777 let computedStyle = window . getComputedStyle ( this . annotatableContainer ) ;
778- let previousWidth = this . annotatableContainer . clientWidth - parseInt ( computedStyle . getPropertyValue ( 'padding-left' ) ) - parseInt ( computedStyle . getPropertyValue ( 'padding-right' ) ) ;
778+ let previousWidth = Math . round ( this . annotatableContainer . clientWidth - parseInt ( computedStyle . getPropertyValue ( 'padding-left' ) ) - parseInt ( computedStyle . getPropertyValue ( 'padding-right' ) ) ) ;
779779 const resizeObserver = new ResizeObserver ( debounce ( ( entries ) => {
780780 for ( const entry of entries ) {
781- const width = entry . contentBoxSize [ 0 ] . inlineSize ;
781+ const width = Math . round ( entry . contentBoxSize [ 0 ] . inlineSize ) ;
782782 // Only respond if the annotatable content width changed
783783 if ( width !== previousWidth ) {
784784 if ( options . drawingMode === 'svg' ) this . drawHighlights ( ) ;
You can’t perform that action at this time.
0 commit comments