Skip to content

Commit

Permalink
pcb_solder_paste inherit pcb_smt_pad _setPositionFromLayout behaviour (
Browse files Browse the repository at this point in the history
…#138)

* new component pcb_solder_paste created from smtpads

* cleanup

* fixed test

* fixed test v2

* removed circuit-json

* SmtPat now inserts pcb_solder_paste directly into db

* fixed test

* pcb_solder_paste from smtpad; rewrite
  • Loading branch information
ShiboSoftwareDev authored Oct 6, 2024
1 parent 83c09f8 commit 6632dcc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/components/primitive-components/SmtPad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,15 @@ export class SmtPad extends PrimitiveComponent<typeof smtPadProps> {
x: newCenter.x,
y: newCenter.y,
})

const solderPaste = db.pcb_solder_paste
.list()
.find((elm) => elm.pcb_smtpad_id === this.pcb_smtpad_id)
db.pcb_solder_paste.update(solderPaste?.pcb_solder_paste_id!, {
x: newCenter.x,
y: newCenter.y,
})

this.matchedPort?._setPositionFromLayout(newCenter)
}
}

0 comments on commit 6632dcc

Please sign in to comment.