|
@@ -277,7 +277,14 @@ function html2canvas( element ) {
|
|
|
|
|
|
if ( element.style.display === 'none' ) return;
|
|
|
|
|
|
- context.drawImage( element, 0, 0, element.width, element.height );
|
|
|
+ const rect = element.getBoundingClientRect();
|
|
|
+
|
|
|
+ x = rect.left - offset.left - 0.5;
|
|
|
+ y = rect.top - offset.top - 0.5;
|
|
|
+ width = rect.width + 0.5;
|
|
|
+ height = rect.height + 0.5;
|
|
|
+
|
|
|
+ context.drawImage( element, x, y, width, height );
|
|
|
|
|
|
} else {
|
|
|
|