Skip to content

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
@1000-x-t30 1000-x-t30 requested a review from uidev1116 June 29, 2023 09:02
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

3 participants