remove promise delay (#1134)

main
Michael Fix 4 years ago committed by GitHub
parent cb566d92b0
commit efa8241226
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -148,14 +148,16 @@
} }
function draw(domNode, options) { function draw(domNode, options) {
return toSvg(domNode, options) return (
toSvg(domNode, options)
.then(util.makeImage) .then(util.makeImage)
.then(util.delay(100)) // .then(util.delay(100))
.then(function (image) { .then(function (image) {
var canvas = newCanvas(domNode) var canvas = newCanvas(domNode)
canvas.getContext('2d').drawImage(image, 0, 0) canvas.getContext('2d').drawImage(image, 0, 0)
return canvas return canvas
}) })
)
function newCanvas(domNode) { function newCanvas(domNode) {
var canvas = document.createElement('canvas') var canvas = document.createElement('canvas')

Loading…
Cancel
Save