SenseTW / sensetw

gigantic repository
https://sense.tw
Other
21 stars 2 forks source link

refactoring for map editor #80

Open pm5 opened 6 years ago

pm5 commented 6 years ago
pm5 commented 6 years ago

為了 #65 的拖拉功能,需要透過 ref 對 Konva 實作 dragenterdragleave events,於是需要昇級 types。結果有點複雜,接近人類一般狀況下記憶力的極限。以下筆記:

先丟在 https://github.com/SenseTW/sensetw/tree/upgrade

caasi commented 6 years ago

好奇是否可以用 callback ref ?之前我是這樣拿到 Konva node 的: https://github.com/SenseTW/sensetw/blob/89d0ea5c3c32abc82aca69406a1ae3b214e4867f/sensemap/src/components/Map/Tag/index.tsx#L2 https://github.com/SenseTW/sensetw/blob/89d0ea5c3c32abc82aca69406a1ae3b214e4867f/sensemap/src/components/Map/Tag/index.tsx#L30 https://github.com/SenseTW/sensetw/blob/89d0ea5c3c32abc82aca69406a1ae3b214e4867f/sensemap/src/components/Map/Tag/index.tsx#L61-L63

caasi commented 6 years ago

在 action-type branch 中,為了 ThunkDispatch ,我升過 redux-thunkredux ,看來無大礙。