-
Notifications
You must be signed in to change notification settings - Fork 1
UIdesign v3 #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIdesign v3 #16
Conversation
Deploying life-code with
|
| Latest commit: |
371cc24
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://95469795.life-code.pages.dev |
| Branch Preview URL: | https://uidesign-v3.life-code.pages.dev |
| window.parent.postMessage( | ||
| { | ||
| type: "generation_change", | ||
| data: generationFigure, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これしようとすると大変になってくるので、外側で世代とかの情報を管理して、「世代交代」だけを iframe に渡すのがいいんじゃないかな。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intervalの間隔は編集可能にしておきたいのでその辺のコードは外に置きたくないってのがあります。
この先似たようなのが増えるわけではない(はず)なので複雑さもそこまでひどくならないとは思いますが...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interval ってこっちで編集機能を用意しておくんじゃなかったっけ?
それならそれでもいいと思う
src/iframe/life-game.js
Outdated
|
|
||
| on.sizechange = (newSizenum) => { | ||
| const newSize = parseInt(newSizenum, 10); | ||
| if (isNaN(newSize) || newSize < BOARD_MIN || BOARD_MAX < newSize) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここのバリデーション (10以上100以下である) も、外側に移すのが良さそう
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちらもですね
|
他の作業と範囲被ってるのでいったんマージします! |
・table以外の要素の移設(ボードサイズ、世代表示、リセット、ランダムボタン)
・tableの中央配置
・その他軽微な調整(マスの大きさ、iframe要素の大きさ等)