aframe-babia-components 1.2.8 → 1.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -57,8 +57,9 @@ AFRAME.registerComponent('babia-doughnut', {
57
57
  * Called on each scene tick.
58
58
  */
59
59
  tick: function (t, delta) {
60
+ let self = this
60
61
  if (this.data.animation && this.loaded) {
61
- let elements = document.getElementsByClassName('babiaxrChart')[0].children
62
+ let elements = self.el.children[0].children
62
63
  for (let slice in this.slice_array) {
63
64
  let delay = this.slice_array[slice].delay
64
65
  let max_arc = this.slice_array[slice].arc
@@ -58,8 +58,9 @@ AFRAME.registerComponent('babia-pie', {
58
58
  * Called on each scene tick.
59
59
  */
60
60
  tick: function (t, delta) {
61
+ let self = this
61
62
  if (this.data.animation && this.loaded) {
62
- let elements = document.getElementsByClassName('babiaxrChart')[0].children
63
+ let elements = self.el.children[0].children
63
64
  for (let slice in this.slice_array) {
64
65
  let delay = this.slice_array[slice].delay
65
66
  let max_length = this.slice_array[slice].degreeLenght