-
-
Save ryantrinkle/929338f682af85dc2172 to your computer and use it in GitHub Desktop.
Here the updated baseImgD in templateRenderCanvas will not fire
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
templateRenderCanvas qrcInfoD cnvInfo newBaseImage initialBaseImage = do | |
cnvRef <- liftIO $ mkCanvas' cnvInfo | |
qrcInfo <- sample $ current qrcInfoD | |
imgRef <- liftIO $ canvasDisplay cnvRef imgInfo | |
qrcRef <- liftIO $ canvasDisplay cnvRef qrcInfo | |
liftIO $ canvasAddChild cnvRef imgRef | |
liftIO $ imageAddChild imgRef qrcRef | |
return () | |
--templateCanvas :: (MonadWidget t m) => TemplateForm t -> m (TemplateCanvas t) | |
templateCanvas :: (MonadWidget t m) => TemplateForm t -> m () | |
templateCanvas tf = do | |
baseImgD <- mkImageInfo (fileInfo tf) defaultImageInfo | |
qrcImgD <- mkQRImageInfo (updated baseImgD) | |
display baseImgD | |
display qrcImgD | |
(firstBaseImg, laterBaseImgs) <- headTailE $ updated baseImgD | |
widgetHold (text "Please select a base image") $ | |
fmap (templateRenderCanvas qrcImgD defaultCanvasInfo laterBaseImgs) firstBaseImg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment