Commit 14130dc3 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski
parents 11fcd444 1f0bf785
This diff is collapsed.
# Phylomeme visualization tool
# Purescript-memiescape
A Phylomeme visualization tool.
Port Memiescape https://gitlab.iscpif.fr/qlobbe/memiescape/tree/v2 to Purescript for FrontEnd integration.
## Getting started
......
module Main (main) where
import Data.Maybe (Maybe(..))
import Data.Nullable (toMaybe)
import DOM.Simple (Element)
import DOM.Simple.Console (log)
import DOM.Simple.Document (document)
import Effect (Effect)
import FFI.Simple ((...))
import Prelude (Unit)
import Memiescape.App (app)
import Memiescape.Main (render)
main :: Effect Unit
main = do
log "[main] hello world!"
main = paint $ toMaybe (document ... "getElementById" $ [ "app" ])
paint :: Maybe Element -> Effect Unit
paint Nothing = log "[paint] Container not found"
paint (Just c) = render (app {}) c
module Memiescape.Main where
import DOM.Simple as DOM
import DOM.Simple.Element as Element
import Effect (Effect)
import FFI.Simple ((...), args2, delay)
import Prelude (Unit, ($), pure, unit)
import Reactix as R
render :: R.Element -> DOM.Element -> Effect Unit
render e d = delay unit $ \_ -> pure $ R.reactDOM ... "render" $ args2 e d
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