diff --git a/demo/vpaid/vpaid-client.js b/demo/vpaid/vpaid-client.js index b721127..d3236f6 100644 --- a/demo/vpaid/vpaid-client.js +++ b/demo/vpaid/vpaid-client.js @@ -1619,8 +1619,8 @@ var IntersectionObserver = function (_BaseTechnique) { key: 'dispose', value: function dispose() { if (this.observer) { - this.observer.unobserve(element); - this.observer.disconnect(element); + this.observer.unobserve(this.element); + this.observer.disconnect(this.element); } } diff --git a/dist/openvv.js b/dist/openvv.js index 3727643..7ad7b28 100644 --- a/dist/openvv.js +++ b/dist/openvv.js @@ -1563,8 +1563,8 @@ var IntersectionObserver = function (_BaseTechnique) { key: 'dispose', value: function dispose() { if (this.observer) { - this.observer.unobserve(element); - this.observer.disconnect(element); + this.observer.unobserve(this.element); + this.observer.disconnect(this.element); } } diff --git a/src/Measurement/MeasurementTechniques/IntersectionObserver.js b/src/Measurement/MeasurementTechniques/IntersectionObserver.js index db87766..4acd5a5 100644 --- a/src/Measurement/MeasurementTechniques/IntersectionObserver.js +++ b/src/Measurement/MeasurementTechniques/IntersectionObserver.js @@ -46,8 +46,8 @@ export default class IntersectionObserver extends BaseTechnique { */ dispose() { if(this.observer) { - this.observer.unobserve(element); - this.observer.disconnect(element); + this.observer.unobserve(this.element); + this.observer.disconnect(this.element); } } @@ -106,4 +106,4 @@ export default class IntersectionObserver extends BaseTechnique { } } -} \ No newline at end of file +}