Skip to content
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

Feature/modal destroy#25 #94

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

1000-x-t30
Copy link

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
Copy link

@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.

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

const height = Number(arr[1]);
const padding = height * 100 / width;
return `${padding}%`;
isModal(event) {

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:

getHtml(opt, videoUrl, id) {
const padding = this.getPadding(opt.ratio);
const classNames = opt.classNames;
reAdd() {

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 というのはおかしくなってくるため。

const padding = this.getPadding(opt.ratio);
const classNames = opt.classNames;
reAdd() {
this.selectors = typeof this.selectors === 'string' ? document.querySelectorAll( this.selectors) : this.selectors;

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 を更新するかどうかは引数によって変える。

}

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

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

if(eacquisition) {
this.selectors = typeof this.selectors === 'string' ? document.querySelectorAll( this.selectors) : this.selectors;
}
console.log(this.selectors)

Choose a reason for hiding this comment

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

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

getHtml(opt, videoUrl, id) {
const padding = this.getPadding(opt.ratio);
const classNames = opt.classNames;
add(eacquisition = false) {

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