diff --git a/src/Frame.tsx b/src/Frame.tsx index 3a1e026..864cb95 100644 --- a/src/Frame.tsx +++ b/src/Frame.tsx @@ -3,11 +3,12 @@ import * as React from 'react'; export interface FrameProps { offset: number; width: number; + height: number; } export const Frame: React.FunctionComponent = (props) => { return ( - + {props.children} diff --git a/src/Word.tsx b/src/Word.tsx index 45e92fd..852743a 100644 --- a/src/Word.tsx +++ b/src/Word.tsx @@ -28,7 +28,7 @@ export const Word: React.FunctionComponent = props => { height={props.theme.fontSize * props.theme.lineHeight} inverse={props.inverse} width={props.children.length > 0 ? props.children.length : 0} - x={props.x * props.theme.fontSize * 0.6} + x={props.x} y={props.y - props.theme.fontSize} /> )} @@ -39,7 +39,7 @@ export const Word: React.FunctionComponent = props => { inverse={props.inverse} theme={props.theme} underline={props.underline} - x={props.x * props.theme.fontSize * 0.6} + x={props.x} y={props.y} > {props.children} diff --git a/src/load-cast.ts b/src/load-cast.ts index f2eb3f4..250fd4a 100644 --- a/src/load-cast.ts +++ b/src/load-cast.ts @@ -11,7 +11,7 @@ export function loadCast(input: string, options: LoadOptions = {}): Cast { const { width, height, idle, fps } = options; return load(input, { width, - height: height ? height + 1 : undefined, + height, idle: idle ? idle / 1000 : undefined, fps }); diff --git a/src/render.tsx b/src/render.tsx index 96cb63a..4426d66 100644 --- a/src/render.tsx +++ b/src/render.tsx @@ -48,7 +48,6 @@ export function render( paddingY={paddingY} decorations={decorations} cursor={cursor} - height={options.height} /> ); } diff --git a/src/svg-term.tsx b/src/svg-term.tsx index 2c4700c..8314080 100644 --- a/src/svg-term.tsx +++ b/src/svg-term.tsx @@ -17,7 +17,6 @@ export interface SvgTermProps { theme: Theme; paddingX: number; paddingY: number; - height?: number; decorations: boolean; from?: number; to?: number; @@ -35,7 +34,6 @@ export const SvgTerm: React.FunctionComponent = props => { const data = toViewModel({ cast: props.cast, cursor: props.cursor, - height: props.height, theme: props.theme, from: from(bound), to: to(bound) @@ -44,14 +42,14 @@ export const SvgTerm: React.FunctionComponent = props => { return ( = props => { theme={props.theme} /> @@ -81,7 +79,7 @@ export const SvgTerm: React.FunctionComponent = props => { > {data.frames.map((frame: any, index: number) => { return ( -