Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fixed using pcbRotatios rotate the pads in the opposite direction" #87

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"@storybook/nextjs": "^8.0.6",
"@storybook/react": "^8.0.6",
"@swc/core": "^1.4.12",
"@tscircuit/core": "^0.0.215",
"@tscircuit/core": "^0.0.109",
"@tscircuit/eagle-xml-converter": "^0.0.6",
"@tscircuit/props": "^0.0.108",
"@tscircuit/props": "^0.0.46",
"@tscircuit/soup-util": "^0.0.38",
"@types/color": "^3.0.6",
"@types/node": "18.7.23",
Expand Down
5 changes: 0 additions & 5 deletions src/components/ElementOverlayBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ export const HighlightedPrimitiveBoxWithText = ({
?.layer as keyof typeof layerColorHightlightMap
] ?? "red"

// Check for rotation on the parent PCB component
const rotation = (primitive as any)?._parent_pcb_component?.rotation ?? 0

return (
<div
style={{
Expand All @@ -106,8 +103,6 @@ export const HighlightedPrimitiveBoxWithText = ({
width: w + 16,
height: h + 16,
color,
transform: `rotate(${-rotation}deg)`,
transformOrigin: "center center",
}}
>
<div
Expand Down
3 changes: 1 addition & 2 deletions src/lib/Drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ export class Drawer {

const [centerX, centerY] = applyToPoint(this.transform, [x, y])
ctx.translate(centerX, centerY)
const cw_rotation = 360 - ccw_rotation
if (ccw_rotation) ctx.rotate((cw_rotation * Math.PI) / 180)
ctx.rotate((ccw_rotation * Math.PI) / 180)
ctx.translate(-centerX, -centerY)

if (mesh_fill) {
Expand Down
41 changes: 0 additions & 41 deletions src/stories/rotated-rec.stories.tsx

This file was deleted.

Loading