|
|
@ -1,6 +1,5 @@
|
|
|
|
import { JSX, Component, createEffect, onCleanup } from "solid-js";
|
|
|
|
import { JSX, Component, createEffect, onCleanup } from "solid-js";
|
|
|
|
import { attachCanvas, AttachCanvasOptions } from '../index.js';
|
|
|
|
import { attachCanvas, AttachCanvasOptions } from '../index.js';
|
|
|
|
import styles from './PixelPerfectCanvas.module.css';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export type PixelPerfectCanvasProps = {
|
|
|
|
export type PixelPerfectCanvasProps = {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -59,8 +58,11 @@ export const PixelPerfectCanvas: Component<PixelPerfectCanvasProps> = (props) =>
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
return (<div
|
|
|
|
return (<div
|
|
|
|
style={props.style}
|
|
|
|
style={{
|
|
|
|
class={[props.class, styles.container].filter(Boolean).join(' ')}
|
|
|
|
...props.style,
|
|
|
|
|
|
|
|
overflow: 'hidden'
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
class={props.class}
|
|
|
|
ref={(div) => containerRef = div}
|
|
|
|
ref={(div) => containerRef = div}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<canvas ref={(canvas) => canvasRef = canvas}>
|
|
|
|
<canvas ref={(canvas) => canvasRef = canvas}>
|
|
|
|