Skip to content

Commit 6d982d1

Browse files
committed
Merge branch 'main' into dev
2 parents 76a4ce4 + 86bf0b3 commit 6d982d1

File tree

5 files changed

+2816
-3177
lines changed

5 files changed

+2816
-3177
lines changed

apps/ionic-demo/src/polyfills.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
*
4242
* The following flags will work for all browsers.
4343
*
44-
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
45-
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
46-
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
44+
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch for requestAnimationFrame
45+
* (window as any).__Zone_disable_on_property = true; // disable patch for onProperty events
46+
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch for specified eventNames
4747
*
4848
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
4949
* with the following flag, it will bypass `zone.js` patch for IE/Edge

components/fireworks/projects/ng-fireworks/src/lib/ng-fireworks.component.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { isPlatformServer } from '@angular/common';
22
import { Component, Inject, Input, PLATFORM_ID } from '@angular/core';
3-
import { FireworkOptions, fireworks } from '@tsparticles/fireworks';
3+
import { FireworkOptions, fireworks, FireworksInstance } from '@tsparticles/fireworks';
44

55
@Component({
66
selector: 'ngx-fireworks',
@@ -11,6 +11,8 @@ export class NgxFireworksComponent {
1111
@Input() options?: FireworkOptions;
1212
@Input() id: string;
1313

14+
fireworks_instance: FireworksInstance | undefined = undefined;
15+
1416
constructor(@Inject(PLATFORM_ID) protected platformId: string) {
1517
this.id = 'tsparticles';
1618
}
@@ -20,6 +22,14 @@ export class NgxFireworksComponent {
2022
return;
2123
}
2224

23-
fireworks(this.id, this.options);
25+
fireworks(this.id, this.options).then((firework: FireworksInstance | undefined) => {
26+
this.fireworks_instance = firework;
27+
});
28+
}
29+
30+
public ngOnDestroy(): void {
31+
if (this.fireworks_instance) {
32+
this.fireworks_instance.stop();
33+
}
2434
}
2535
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@commitlint/cli": "^18.4.2",
1616
"@commitlint/config-conventional": "^18.4.2",
1717
"husky": "^8.0.3",
18-
"lerna": "^7.4.2",
18+
"lerna": "^8.0.0",
1919
"typedoc": "^0.25.3",
2020
"typedoc-plugin-clarity": "^1.5.0",
2121
"typedoc-plugin-carbon-ads": "^1.5.0",

0 commit comments

Comments
 (0)