MCPcopy Create free account
hub / github.com/anomalyco/opencode / createTransformer

Function createTransformer

packages/app/src/utils/solid-dnd.tsx:19–23  ·  view source on GitHub ↗
(id: string, axis: "x" | "y")

Source from the content-addressed store, hash-verified

17}
18
19const createTransformer = (id: string, axis: "x" | "y"): Transformer => ({
20 id,
21 order: 100,
22 callback: (transform) => (axis === "x" ? { ...transform, x: 0 } : { ...transform, y: 0 }),
23})
24
25const createAxisConstraint = (axis: "x" | "y", transformerId: string) => (): JSXElement => {
26 const context = useDragDropContext()

Callers 1

createAxisConstraintFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected