1
0
mirror of https://github.com/niklasvh/html2canvas.git synced 2023-08-10 21:13:10 +03:00

Render multiple backgrounds in correct order

This commit is contained in:
MoyuScript 2017-08-01 18:25:32 +08:00
parent b9f72445de
commit a7832fab46

@ -132,7 +132,7 @@ export default class CanvasRenderer {
}
renderBackgroundImage(container: NodeContainer) {
container.style.background.backgroundImage.forEach(backgroundImage => {
container.style.background.backgroundImage.reverse().forEach(backgroundImage => {
if (backgroundImage.source.method === 'url' && backgroundImage.source.args.length) {
this.renderBackgroundRepeat(container, backgroundImage);
}