mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
fix: ios text wrapping with 0 width rect (#2786)
This commit is contained in:
parent
74696faf47
commit
0476d06515
@ -17,7 +17,7 @@ export class Bounds {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static fromDOMRectList(context: Context, domRectList: DOMRectList): Bounds {
|
static fromDOMRectList(context: Context, domRectList: DOMRectList): Bounds {
|
||||||
const domRect = domRectList[0];
|
const domRect = Array.from(domRectList).find(rect => rect.width !== 0);
|
||||||
return domRect
|
return domRect
|
||||||
? new Bounds(
|
? new Bounds(
|
||||||
domRect.x + context.windowBounds.left,
|
domRect.x + context.windowBounds.left,
|
||||||
|
Loading…
Reference in New Issue
Block a user