From 88dd5c113fb6f638b2ceed9b0171d0b9ae33c07f Mon Sep 17 00:00:00 2001 From: Anan Zhuang Date: Fri, 12 Aug 2022 15:56:06 +0000 Subject: [PATCH] [DeAngular][visualization][vislib] remove angular from vislib * remove angular import and $scope from Binder class since there is no usage in the code Issue resolved: https://github.com/opensearch-project/OpenSearch-Dashboards/issues/2137 Signed-off-by: Anan Zhuang --- src/plugins/vis_type_vislib/public/vislib/lib/binder.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/plugins/vis_type_vislib/public/vislib/lib/binder.ts b/src/plugins/vis_type_vislib/public/vislib/lib/binder.ts index 33ef39590d35..0dc7fbb6f537 100644 --- a/src/plugins/vis_type_vislib/public/vislib/lib/binder.ts +++ b/src/plugins/vis_type_vislib/public/vislib/lib/binder.ts @@ -30,7 +30,6 @@ import d3 from 'd3'; import $ from 'jquery'; -import { IScope } from 'angular'; export interface Emitter { on: (...args: any[]) => void; @@ -42,13 +41,6 @@ export interface Emitter { export class Binder { private disposal: Array<() => void> = []; - constructor($scope: IScope) { - // support auto-binding to $scope objects - if ($scope) { - $scope.$on('$destroy', () => this.destroy()); - } - } - public on(emitter: Emitter, ...args: any[]) { const on = emitter.on || emitter.addListener; const off = emitter.off || emitter.removeListener;