Merged conflicts.

This commit is contained in:
2019-07-30 17:12:17 +02:00
parent c55644558a
commit 73342a0506
2 changed files with 14 additions and 8 deletions
+12 -7
View File
@@ -1,6 +1,6 @@
/* eslint-disable no-unused-vars */
/* eslint-disable no-console */
/* globals TweenLite debugCanvas */
/* globals debugCanvas */
import Interface from './interface.js'
import { Points, Polygon, Angle, Elements, LowPassFilter } from './utils.js'
import Events from './events.js'
@@ -351,15 +351,20 @@ export class AbstractScatter extends Throwable {
}
close() {
this._callCloseCallbacks()
this._removeSelfFromScatterContainer()
}
_callCloseCallbacks() {
if (this.onClose) {
this.onClose.forEach(callback => callback(this))
}
}
/**
Removes self from container when it's closed.
*/
if (this.container) {
this.container.remove(this)
}
_removeSelfFromScatterContainer() {
// Removes self from container when it's closed.
if (this.container) {
this.container.remove(this)
}
}