Skip to content

Commit

Permalink
fix bug with update position
Browse files Browse the repository at this point in the history
  • Loading branch information
susielu committed Apr 16, 2018
1 parent ecf7978 commit 753f96a
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion d3-annotation.independent.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion d3-annotation.independent.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion d3-annotation.independent.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion d3-annotation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion d3-annotation.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion d3-annotation.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/bundle.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion indexRollup.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion indexRollup.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion indexRollupNext.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion indexRollupNext.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/Annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export default class Annotation {
updatePosition() {
if (this.type.setPosition) {
this.type.setPosition()
if (this.type.subject.selectAll(":not(.handle)").nodes().length !== 0) {
if (
this.type.subject &&
this.type.subject.selectAll(":not(.handle)").nodes().length !== 0
) {
this.type.redrawSubject()
}
}
Expand Down

0 comments on commit 753f96a

Please sign in to comment.