File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed
Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -346,20 +346,10 @@ const deepClone = (host) => {
346346 tagName == "IMG" ||
347347 tagName == "SVG"
348348 ) {
349- var height = 0 ;
350- if ( node . style . boxSizing === "border-box" ) {
351- height =
352- node . height +
353- node . marginTop +
354- node . marginBottom +
355- node . bordorTop +
356- node . borderBottom ;
357- } else {
358- height = node . height ;
359- }
360-
349+ const boundingRect = node . getBoundingClientRect ( ) ;
361350 clone . setAttribute ( "bb-element" , true ) ;
362- clone . setAttribute ( "bb-height" , height ) ;
351+ clone . setAttribute ( "bb-height" , boundingRect . height ) ;
352+ clone . setAttribute ( "bb-width" , boundingRect . width ) ;
363353 }
364354
365355 if ( tagName == "DIV" && ( node . scrollTop > 0 || node . scrollLeft > 0 ) ) {
@@ -463,7 +453,7 @@ const prepareScreenshotData = (remote) => {
463453 const bbElems = clone . querySelectorAll ( "[bb-element=true]" ) ;
464454 for ( var i = 0 ; i < bbElems . length ; ++ i ) {
465455 if ( bbElems [ i ] ) {
466- bbElems [ i ] . style . height = bbElems [ i ] . getAttribute ( "bb-height" ) ;
456+ bbElems [ i ] . style . height = bbElems [ i ] . getAttribute ( "bb-height" ) + "px" ;
467457 }
468458 }
469459
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export class ScreenDrawer {
55 strPath ;
66 strokeWidth = 12 ;
77 strokeWidthRect = 6 ;
8- bufferSize = 8 ;
8+ bufferSize = 4 ;
99 buffer = [ ] ;
1010 startPoint = null ;
1111 tool = "pen" ;
You can’t perform that action at this time.
0 commit comments