Skip to content

Commit

Permalink
[Canvas] Register expression_functions in `{expression}/public/plug…
Browse files Browse the repository at this point in the history
…in.ts`. (#106636)

* Registered `revealImageFunction` in `public/plugin`.

* Registered `shapeFunction` in `public/plugin`.
  • Loading branch information
Kuznietsov authored Jul 26, 2021
1 parent a1134e1 commit 6a50aff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plugins/expression_reveal_image/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import { CoreSetup, CoreStart, Plugin } from '../../../core/public';
import { ExpressionsStart, ExpressionsSetup } from '../../expressions/public';
import { revealImageRenderer } from './expression_renderers';
import { revealImageFunction } from '../common/expression_functions';

interface SetupDeps {
expressions: ExpressionsSetup;
Expand All @@ -30,6 +31,7 @@ export class ExpressionRevealImagePlugin
StartDeps
> {
public setup(core: CoreSetup, { expressions }: SetupDeps): ExpressionRevealImagePluginSetup {
expressions.registerFunction(revealImageFunction);
expressions.registerRenderer(revealImageRenderer);
}

Expand Down
2 changes: 2 additions & 0 deletions src/plugins/expression_shape/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import { CoreSetup, CoreStart, Plugin } from '../../../core/public';
import { ExpressionsStart, ExpressionsSetup } from '../../expressions/public';
import { shapeRenderer } from './expression_renderers';
import { shapeFunction } from '../common/expression_functions';

interface SetupDeps {
expressions: ExpressionsSetup;
Expand All @@ -24,6 +25,7 @@ export type ExpressionShapePluginStart = void;
export class ExpressionShapePlugin
implements Plugin<ExpressionShapePluginSetup, ExpressionShapePluginStart, SetupDeps, StartDeps> {
public setup(core: CoreSetup, { expressions }: SetupDeps): ExpressionShapePluginSetup {
expressions.registerFunction(shapeFunction);
expressions.registerRenderer(shapeRenderer);
}

Expand Down

0 comments on commit 6a50aff

Please sign in to comment.