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

Crop preset review #84

Merged
merged 11 commits into from
Oct 31, 2018
Merged

Crop preset review #84

merged 11 commits into from
Oct 31, 2018

Conversation

jinwoo-kim-nhn
Copy link
Contributor

work

example

@jinwoo-kim-nhn
Copy link
Contributor Author

ok to test

left: -10,
height: 1,
width: 1
});
Copy link
Member

@seonim-ryu seonim-ryu Oct 31, 2018

Choose a reason for hiding this comment

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

defaultOption으로 해서 객체 빼는건 어떨까요?

Copy link
Member

@seonim-ryu seonim-ryu Oct 31, 2018

Choose a reason for hiding this comment

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

factor 그냥.. 1이 아닌 경우에 1로 초기화 하고 this._getPresetCropSizePosition(factor) 호출하는거로 하면 될듯해요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

넵 반영하겠습니다.

const standardSize = (originalWidth >= originalHeight) ? originalWidth : originalHeight;
const getScale = (value, orignalValue) => (value > orignalValue) ? orignalValue / value : 1;

let width = (standardSize * factor);
Copy link
Member

Choose a reason for hiding this comment

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

괄호 안해도될듯요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

반영하겠습니다.

}

/**
* Add event for crop
* @param {Object} actions - actions for crop
* @param {Function} actions.crop - crop action
* @param {Function} actions.cancel - cancel action
* @param {Function} actions.preset - cancel action
Copy link
Member

Choose a reason for hiding this comment

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

디스크립션이 잘못된 것 같습니다

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -277,6 +278,64 @@ class Cropper extends Component {
};
}

/**
* Set a cropzone square
* @param {number} factor - preset ratio
Copy link
Member

Choose a reason for hiding this comment

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

  • factor -> scale 파라미터명 변경
  • 파라미터가 비어있는 경우 -> [factor] 변경

Copy link
Contributor Author

Choose a reason for hiding this comment

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

네 반영했습니다.


/**
* Set preset button to active status
* @param {HTMLElement} button - event target element
Copy link
Member

Choose a reason for hiding this comment

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

@private 추가

Copy link
Contributor Author

Choose a reason for hiding this comment

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

* @param {HTMLElement} button - event target element
*/
_setPresetButtonActive(button = this.defaultPresetButton) {
snippet.forEach([].slice.call(this._els.preset.querySelectorAll('.preset')), presetButton => {
Copy link
Member

Choose a reason for hiding this comment

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

[].slice.call -> 코드스니펫 메서드로 변경

Copy link
Contributor Author

Choose a reason for hiding this comment

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

snippet에 따로 없고 예제에서도 따로 slice 해주라고 하네요. 이대로 하는게 좋을것 같습니다

@seonim-ryu
Copy link
Member

[10/31] 리뷰 완료요~

@jungeun-cho
Copy link
Contributor

[10/31] 리뷰 완료했습니다.

</li>
<li class="tui-image-editor-partition tui-image-editor-newline">
</li>
<li class="tui-image-editor-partition only-left-right">

Choose a reason for hiding this comment

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

이건 용도가 뭔가요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

메뉴 바 정렬이 left나 right로 되어 있을때만 보여야 하는 라인입니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

가능하면 태그 한줄로 처리하는 방법을 찾아보겠습니다.

@sohee-lee7
Copy link

[10/31] 리뷰 완료입니다

@jinwoo-kim-nhn jinwoo-kim-nhn merged commit 46d4b76 into master Oct 31, 2018
@junghwan-park junghwan-park deleted the crop-preset-review branch January 30, 2019 07:59
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.

None yet

4 participants