Commit 8bd2e03a by Edgar Hipp

added getImageFromDataAsync

parent 18ce6b9e
...@@ -66,11 +66,13 @@ class ImageModule ...@@ -66,11 +66,13 @@ 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)=>
if @getImageFromDataAsync?
@getImageFromDataAsync(result,cb)
else
cb(null,@getImageFromData(result)) cb(null,@getImageFromData(result))
imR.pushQrQueue=(num)=> imR.pushQrQueue=(num)=>
@qrQueue.push(num) @qrQueue.push(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