Skip to content

Commit eed6cb7

Browse files
authored
Merge pull request #240 from JunoLab/sp/canopyfix
fix readAfterUpdate in canopy
2 parents 3854df1 + f4ba512 commit eed6cb7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/plots/canopy.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ export class Pannable extends Etch {
9696
}
9797

9898
readAfterUpdate () {
99+
this.containerRect =
100+
this.element.getElementsByClassName('ink-pannable')[0].getBoundingClientRect()
99101
this.setInitialScale(this.item)
100102
etch.update(this)
101103
}
@@ -196,11 +198,6 @@ export class Pannable extends Etch {
196198
</div>;
197199
}
198200

199-
readAfterUpdate () {
200-
this.containerRect =
201-
this.element.getElementsByClassName('ink-pannable')[0].getBoundingClientRect()
202-
}
203-
204201
teardown () {
205202
if (this.item && this.item.teardown) this.item.teardown()
206203
etch.update(this)

0 commit comments

Comments
 (0)