You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.tsx 400B

1234567891011121314151617
  1. import Circle from "./circle"
  2. import Dot from "./dot"
  3. import Polyline from "./polyline"
  4. import Rectangle from "./rectangle"
  5. import { Bounds, Shape, ShapeType } from "types"
  6. export const boundsCache = new WeakMap<Shape, Bounds>([])
  7. const shapes = {
  8. [ShapeType.Circle]: Circle,
  9. [ShapeType.Dot]: Dot,
  10. [ShapeType.Polyline]: Polyline,
  11. [ShapeType.Rectangle]: Rectangle,
  12. }
  13. export default shapes