File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
lib/components/primitive-components Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1+ import { decomposeTSR } from "transformation-matrix"
12import { PrimitiveComponent } from "../base-components/PrimitiveComponent"
23import { courtyardRectProps } from "@tscircuit/props"
34
@@ -34,8 +35,10 @@ export class CourtyardRect extends PrimitiveComponent<
3435 this . parent ?. pcb_component_id ??
3536 this . getPrimitiveContainer ( ) ?. pcb_component_id !
3637
37- const transform = this . _computePcbGlobalTransformBeforeLayout ( )
38- const ccw_rotation = ( Math . atan2 ( transform . b , transform . a ) * 180 ) / Math . PI
38+ const decomposedTransform = decomposeTSR (
39+ this . _computePcbGlobalTransformBeforeLayout ( ) ,
40+ )
41+ const ccw_rotation = ( decomposedTransform . rotation . angle * 180 ) / Math . PI
3942
4043 const pcb_courtyard_rect = db . pcb_courtyard_rect . insert ( {
4144 pcb_component_id,
You can’t perform that action at this time.
0 commit comments