-
Notifications
You must be signed in to change notification settings - Fork 357
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
refactor(shape.line): Point node generation containment #63
Conversation
Avoid creating circle nodes when set to not shown. Ref #36
Changes Unknown when pulling 1fcef35 on netil:node#36 into ** on naver:master**. |
# Conflicts: # src/internals/shape.line.js
Changes Unknown when pulling 66eaac4 on netil:node#36 into ** on naver:master**. |
src/internals/shape.line.js
Outdated
|
||
$$.mainCircle = $$.main.selectAll(`.${CLASS.circles}`).selectAll(`.${CLASS.circle}`) | ||
.data($$.lineOrScatterData.bind($$)); | ||
if (show) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about returning a value in advance for code readability?
if (!$$.config.point_show) { return; }
src/internals/shape.line.js
Outdated
let selectedCircles = this.main.selectAll(`.${CLASS.selectedCircle}`); | ||
let mainCircles; | ||
let result = []; | ||
|
||
if (show) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM |
- Applied review - Merge branch 'master' into node#36
Changes Unknown when pulling a84e915 on netil:node#36 into ** on naver:master**. |
Changes Unknown when pulling a84e915 on netil:node#36 into ** on naver:master**. |
Issue
Ref #36
Details
Avoid creating circle nodes when set to not shown.
Normally nodes are generated as below, which even data points aren't shown still nodes area generated, which giving bad affection.
This PR makes avoiding the node generation depending the option.
Check comments below for the details.
Preferred reviewers
@sculove