@@ -8,10 +8,8 @@ import Control.Monad.Except (runExcept)
88import Data.Foldable (for_ )
99import Data.Foreign (Foreign , readString )
1010import Data.Foreign.Index (readProp )
11- import Data.Maybe as M
1211import Data.List as L
1312import Data.Record.Unsafe as R
14- import Data.StrMap as SM
1513import Data.Tuple (Tuple (..), fst , snd )
1614import Data.Variant.Internal (RLProxy (..), variantTags , class VariantTags )
1715import ECharts.Types (EChartsEvent , EChartsEventR , Chart , ECHARTS )
@@ -43,10 +41,8 @@ listenAll chart cb = liftEff $
4341 toEChartsEvent = unsafeCoerce
4442
4543foreign import dispatchAction_
46- ∷ ∀ e a b action
47- . SM.StrMap (Array String ) -- mapping from action type to keys that are maybe's
48- → ( b → (a → b ) → M.Maybe a → b ) -- maybe
49- → action
44+ ∷ ∀ e action
45+ . action
5046 → Chart
5147 → Eff ( echarts ∷ ECHARTS |e ) Unit
5248
@@ -57,18 +53,8 @@ dispatch
5753 → Chart
5854 → m Unit
5955dispatch vaction chart =
60- liftEff $ dispatchAction_ strmapConfig M .maybe action chart
56+ liftEff $ dispatchAction_ action chart
6157 where
62- strmapConfig = SM .fromFoldable
63- [ Tuple " highlight" [" name" , " dataIndex" ]
64- , Tuple " downplay" [" name" , " dataIndex" ]
65- , Tuple " mapSelect" [" name" , " dataIndex" ]
66- , Tuple " mapUnSelect" [" name" , " dataIndex" ]
67- , Tuple " mapToggleSelect" [" name" , " dataIndex" ]
68- , Tuple " focusNodeAdjacency" [" seriesId" , " seriesIndex" , " seriesName" ]
69- , Tuple " unfocusNodeAdjacency" [" seriesId" , " seriesIndex" , " seriesName" ]
70- ]
71-
7258 variantPair ∷ Tuple String { }
7359 variantPair = unsafeCoerce vaction
7460
0 commit comments