Commit 8bd2e03a by Edgar Hipp

added getImageFromDataAsync

parent 18ce6b9e
...@@ -66,12 +66,14 @@ class ImageModule ...@@ -66,12 +66,14 @@ class ImageModule
newText=@getImageXmlCentered(rId,size) newText=@getImageXmlCentered(rId,size)
@replaceBy(newText,outsideElement) @replaceBy(newText,outsideElement)
replaceQr:-> replaceQr:->
xmlTemplater=@manager.getInstance('xmlTemplater') xmlTemplater=@manager.getInstance('xmlTemplater')
imR=new ImgReplacer(xmlTemplater,@imgManager) imR=new ImgReplacer(xmlTemplater,@imgManager)
imR.getDataFromString=(result,cb)=> imR.getDataFromString=(result,cb)=>
cb(null,@getImageFromData(result)) if @getImageFromDataAsync?
@getImageFromDataAsync(result,cb)
else
cb(null,@getImageFromData(result))
imR.pushQrQueue=(num)=> imR.pushQrQueue=(num)=>
@qrQueue.push(num) @qrQueue.push(num)
imR.popQrQueue=(num)=> imR.popQrQueue=(num)=>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment