@tabler/core
Version:
Premium and Open Source dashboard template with responsive and high quality UI.
23 lines (20 loc) • 554 B
JavaScript
import { removeElement } from '../util'
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
class BaseComponent {
dispose() {
if (this._tooltip) {
removeElement(this._tooltip)
} else {
// @todo: move shape in base component in v2
this.shape.remove()
}
for (const propertyName of Object.getOwnPropertyNames(this)) {
this[propertyName] = null
}
}
}
export default BaseComponent