Skip to content

Feature/modal destroy#25#94

Open
1000-x-t30 wants to merge 4 commits intomasterfrom
feature/modal-destroy#25
Open

Feature/modal destroy#25#94
1000-x-t30 wants to merge 4 commits intomasterfrom
feature/modal-destroy#25

Conversation

@1000-x-t30
Copy link
Copy Markdown

I was able to work on it. Please confirm. #25 #41

@1000-x-t30 1000-x-t30 linked an issue Jun 29, 2023 that may be closed by this pull request
@1000-x-t30 1000-x-t30 requested a review from uidev1116 June 29, 2023 09:02
Copy link
Copy Markdown

@uidev1116 uidev1116 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます。!コメントいたしました。!

Comment thread src/core/index.js Outdated
const height = Number(arr[1]);
const padding = height * 100 / width;
return `${padding}%`;
isModal(event) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1000-x-t30
個人的な意見ですが、isModal というメソッド名だと モーダルかどうかを判別するメソッドなのかな?と思ってしまいますので、他の名前にしたほうがいいかと感じました。

例えばよくあるのは onClickhandleClick などです。

ご検討よろしくお願いします。:bow:

Comment thread src/core/index.js Outdated
getHtml(opt, videoUrl, id) {
const padding = this.getPadding(opt.ratio);
const classNames = opt.classNames;
reAdd() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1000-x-t30
メソッド名を re(再度という意味) をなくした名前に変更(create や mount など)。
constructor 内でも同じメソッドを利用したいので、re というのはおかしくなってくるため。

Comment thread src/core/index.js Outdated
const padding = this.getPadding(opt.ratio);
const classNames = opt.classNames;
reAdd() {
this.selectors = typeof this.selectors === 'string' ? document.querySelectorAll( this.selectors) : this.selectors;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1000-x-t30
this.selectors を更新するかどうかは引数によって変える。

Comment thread src/core/index.js Outdated
}

destroy() {
this.selectors = typeof this.selectors === 'string' ? document.querySelectorAll( this.selectors) : this.selectors;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1000-x-t30
destory は this.selector の再取得はなくてもok

Comment thread src/core/index.js Outdated
if(eacquisition) {
this.selectors = typeof this.selectors === 'string' ? document.querySelectorAll( this.selectors) : this.selectors;
}
console.log(this.selectors)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1000-x-t30
デバックコードは削除お願いします。!!:bow:

Comment thread src/core/index.js Outdated
getHtml(opt, videoUrl, id) {
const padding = this.getPadding(opt.ratio);
const classNames = opt.classNames;
add(eacquisition = false) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1000-x-t30
引数名 isUpdateSelectors とかにしませんか??
あまりプログラムの変数で aeacquisition 利用しない気がするので isUpdateSelectors とかのほうが直感的ででわかりやす行かなと思いました。

@1000-x-t30 1000-x-t30 self-assigned this Sep 22, 2023
@1000-x-t30 1000-x-t30 linked an issue Sep 22, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Close modal on escape key remove/destroy ModalVideo on smaller screen size

2 participants