Skip to content

Commit

Permalink
Fix: Not full override of destroy method. #102
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberDex committed Oct 20, 2023
1 parent eb5e5b8 commit 0239dbe
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/ScrollBox.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ColorSource, Ticker, utils } from '@pixi/core';
import { Container, DisplayObject } from '@pixi/display';
import { Container, DisplayObject, IDestroyOptions } from '@pixi/display';
import { EventMode, FederatedPointerEvent } from '@pixi/events';
import { Graphics } from '@pixi/graphics';
import type { ListType } from './List';
Expand Down Expand Up @@ -674,15 +674,19 @@ export class ScrollBox extends Container
}
}

/** Destroys the component. */
override destroy()
/**
* Destroys the component.
* @param {boolean | IDestroyOptions} [options] - Options parameter.
* A boolean will act as if all options have been set to that value
*/
override destroy(options?: IDestroyOptions | boolean)
{
this.ticker.remove(this.update, this);

this.background.destroy();
this.list.destroy();

super.destroy();
super.destroy(options);
}

protected restoreItemsInteractivity()
Expand Down

0 comments on commit 0239dbe

Please sign in to comment.