Skip to content

Commit

Permalink
feat: 导出renderShape (#1362)
Browse files Browse the repository at this point in the history
  • Loading branch information
ACERY1 committed Feb 10, 2022
1 parent 8ae41cd commit bcb9407
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/f2/src/components/axis/rect/bottom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import { jsx } from '../../../jsx';
import { RectProps } from '../types';
import { TextAttrs } from '../../../types';

export default (props: RectProps<'bottom'>) => {
export default (props: RectProps<'bottom'>, context) => {
const { ticks, coord, style, animation } = props;
const { px2hd } = context;
const { left, right, bottom } = coord;
const { grid, tickLine, line, labelOffset, label } = style;

Expand Down Expand Up @@ -40,7 +41,7 @@ export default (props: RectProps<'bottom'>) => {
x1: start.x,
y1: start.y,
x2: start.x,
y2: start.y + tickLine.length,
y2: start.y + px2hd(tickLine.length),
...tickLine,
}}
/>
Expand Down
3 changes: 2 additions & 1 deletion packages/f2/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import Canvas from './canvas';
import Chart from './chart';

import { jsx as createElement } from './jsx';
import { renderShape } from './base/diff'

export * from './components';
export { jsx, render } from './jsx';
export { default as createRef } from './createRef';
export { Children, createElement, Component, Timeline, Canvas, Chart };
export { Children, createElement, Component, Timeline, Canvas, Chart, renderShape };
1 change: 1 addition & 0 deletions packages/f2/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ interface PxPoint {
y: px;
}

export * from '@antv/scale'
export type { AxisTypes }

type SupportPx<T> = {
Expand Down

0 comments on commit bcb9407

Please sign in to comment.