-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: pass global runtime in svg element lifecycle contribution (#1451)
* fix: pass global runtime in svg element lifecycle contribution * chore: commit changeset * fix: revert stopPropagation in g-gesture * chore: commit changeset
- Loading branch information
Showing
5 changed files
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@antv/g-plugin-rough-svg-renderer': patch | ||
'@antv/g-plugin-zdog-svg-renderer': patch | ||
'@antv/g-gesture': patch | ||
--- | ||
|
||
Revert stopPropagation in g-gesture |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@antv/g-plugin-rough-svg-renderer': patch | ||
'@antv/g-plugin-zdog-svg-renderer': patch | ||
--- | ||
|
||
Pass global runtime in svg element lifecycle contribution. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
import { AbstractRendererPlugin } from '@antv/g-lite'; | ||
import { AbstractRendererPlugin, GlobalRuntime } from '@antv/g-lite'; | ||
import { RoughElementLifeCycleContribution } from './RoughElementLifeCycleContribution'; | ||
import { RoughRendererPlugin } from './RoughRendererPlugin'; | ||
export class Plugin extends AbstractRendererPlugin { | ||
name = 'rough-svg-renderer'; | ||
init(): void { | ||
const roughElementLifeCycleContribution = new RoughElementLifeCycleContribution(this.context); | ||
init(runtime: GlobalRuntime): void { | ||
const roughElementLifeCycleContribution = | ||
new RoughElementLifeCycleContribution(this.context, runtime); | ||
|
||
// @ts-ignore | ||
this.context.SVGElementLifeCycleContribution = roughElementLifeCycleContribution; | ||
this.context.SVGElementLifeCycleContribution = | ||
roughElementLifeCycleContribution; | ||
|
||
this.addRenderingPlugin(new RoughRendererPlugin()); | ||
} | ||
destroy(): void { | ||
this.removeAllRenderingPlugins(); | ||
|
||
// @ts-ignore | ||
this.context.SVGElementLifeCycleContribution = this.context.defaultElementLifeCycleContribution; | ||
this.context.SVGElementLifeCycleContribution = | ||
this.context.defaultElementLifeCycleContribution; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters