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

fix: Add shape on mouseClick without mouseMove (fix #144) #146

Merged
merged 4 commits into from
Feb 14, 2019

Conversation

junghwan-park
Copy link
Member

Please check if the PR fulfills these requirements

  • It's submitted to right branch according to our branching model
  • It's right issue type on title
  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • It does not introduce a breaking change or has description for the breaking change

Description

Add shape on mouseClick without mouseMove.


Thank you for your contribution to TOAST UI product. πŸŽ‰ 😘 ✨

@junghwan-park junghwan-park changed the title fix: Add shape on mouseClick without mouseMove fix: Add shape on mouseClick without mouseMove (fix #144) Feb 13, 2019
@junghwan-park junghwan-park self-assigned this Feb 13, 2019
@junghwan-park junghwan-park added this to the v3.5.0 milestone Feb 14, 2019
@@ -364,14 +370,24 @@ class Shape extends Component {
*/
_onFabricMouseUp() {
const canvas = this.getCanvas();
const startPointX = this._startPoint.x;
Copy link
Contributor

Choose a reason for hiding this comment

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

이 뢀뢄은 λ””μŠ€νŠΈλŸ­μ²˜λ§+alias μ•ˆμ“°λŠ”κ²Œ 훨씬 더 κΉ”λ”ν•˜λ„€μš”. κ΅Ώ

Copy link
Member Author

Choose a reason for hiding this comment

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

λ„€, κ°„λ‹¨ν•˜κ²Œ ν‘œν˜„ν•˜λŠ”κ²Œ μ’‹λ”λΌκ³ μš”. :)
λ‹€λ₯Έ μ½”λ“œμ—μ„œλ„ μ € ν˜•νƒœλ‘œ μ‚¬μš©ν•˜κ³  μžˆμ–΄μ„œ κ·ΈλŒ€λ‘œ μ μš©ν–ˆμŠ΅λ‹ˆλ‹€.

@@ -27,7 +27,6 @@ class Component {

/**
* Fire Graphics event
* @param {Array} args - arguments
Copy link
Contributor

Choose a reason for hiding this comment

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

jsdoc, μŠ€ν”„λ ˆλ“œ νŒŒλΌλ―Έν„° ν‘œν˜„ν•  수 μžˆλŠ” 방법이 μ—†λ‚˜μš”? ν˜Ήμ‹œ?

Copy link
Member Author

Choose a reason for hiding this comment

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

JSDoc - @param 의 Allows a parameter to be repeated μ„Ήμ…˜μ²˜λŸΌ λ°˜λ³΅λ˜λŠ” λ™μΌν•œ νƒ€μž…μ„ μ •μ˜ν• λ•Œ rest parameterλ₯Ό μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
이 λ©”μ„œλ“œλŠ” λ™μΌν•œ νƒ€μž…μ˜ λ°˜λ³΅μ„ λ‚˜νƒ€λ‚΄λŠ”λ° μ‚¬μš©ν•˜κ³  μžˆμ§€ μ•Šμ•„μ„œ μ œκ±°ν–ˆμŠ΅λ‹ˆλ‹€.

@dongsik-yoo
Copy link
Contributor

리뷰 μ™„λ£Œν–ˆμŠ΅λ‹ˆλ‹€. μˆ˜κ³ ν•˜μ…¨μ–΄μš”.


const objectProperties = this.graphics.createObjectProperties(shapeObj);

resolve(objectProperties);
Copy link
Contributor

Choose a reason for hiding this comment

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

objectProperties 둜 μ •μ˜ ν›„ resolve ν•΄μ£ΌλŠ” μ΄μœ κ°€ μžˆμ„κΉŒμš”?
제 주관적인 μƒκ°μ—λŠ” ν•œμ€„μ΄ 더 깔끔해 λ³΄μ΄λ„€μš”

Copy link
Member Author

Choose a reason for hiding this comment

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

λ³€μˆ˜λ‘œ λ”°λ‘œ μ •μ˜ν•˜λŠ”κ²Œ resolve()λ₯Ό 의미적으둜 λΆ„λ¦¬ν•΄μ£ΌλŠ”κ²ƒ κ°™μ•„μ„œ λ³€κ²½ν–ˆμŠ΅λ‹ˆλ‹€.

@jinwoo-kim-nhn
Copy link
Contributor

μˆ˜κ³ ν•˜μ…¨μŠ΅λ‹ˆλ‹€.

@junghwan-park junghwan-park merged commit 439816d into master Feb 14, 2019
@junghwan-park junghwan-park deleted the fix/shape-click branch February 14, 2019 07:23
HerlinMatos pushed a commit to EveryMundo/tui.image-editor that referenced this pull request Jul 2, 2020
* fix: Fire ADD_OBJECT_AFTER event in shape.add()

* fix: Add shape mouseClick without mouse moving fixes nhn#144

* refactor: Rename variable

* refactor: Move event
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants