Skip to content

Commit

Permalink
fix subject edit mode handler
Browse files Browse the repository at this point in the history
  • Loading branch information
susielu committed Sep 21, 2018
1 parent c21b12b commit 71f44be
Show file tree
Hide file tree
Showing 14 changed files with 135 additions and 66 deletions.
35 changes: 26 additions & 9 deletions 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.

35 changes: 26 additions & 9 deletions 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.

14 changes: 0 additions & 14 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.

35 changes: 26 additions & 9 deletions 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.

35 changes: 26 additions & 9 deletions 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.

15 changes: 14 additions & 1 deletion src/Annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class Annotation {
this.id = id
this._className = className || ""

this.type = type || ""
this._type = type || ""
this.data = data

this.note = note || {}
Expand All @@ -46,6 +46,10 @@ export default class Annotation {
}
}

clearComponents() {
this.type.clearComponents && this.type.clearComponents()
}

get className() {
return this._className
}
Expand All @@ -67,6 +71,15 @@ export default class Annotation {
}
}

get type() {
return this._type
}

set type(type) {
this._type = type
this.clearComponents()
}

get x() {
return this._x
}
Expand Down

0 comments on commit 71f44be

Please sign in to comment.