consistent gate stroke
This commit is contained in:
parent
5361fa4190
commit
ae49b390cd
|
@ -16,7 +16,7 @@ export const renderGate = (
|
||||||
renderPins(ctx, renderer, gate)
|
renderPins(ctx, renderer, gate)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
((renderer.mouseState >> 2) & 1 &&
|
(renderer.mouseState >> 2 &&
|
||||||
gatesInSelection(renderer.selectedArea, [gate]).length) ||
|
gatesInSelection(renderer.selectedArea, [gate]).length) ||
|
||||||
idIsSelected(renderer, gate.id)
|
idIsSelected(renderer, gate.id)
|
||||||
) {
|
) {
|
||||||
|
@ -28,6 +28,7 @@ export const renderGate = (
|
||||||
ctx.lineWidth = renderer.options.gates.gateStroke.width
|
ctx.lineWidth = renderer.options.gates.gateStroke.width
|
||||||
|
|
||||||
ctx.save()
|
ctx.save()
|
||||||
|
|
||||||
const r = useTransform(ctx, gate.transform)
|
const r = useTransform(ctx, gate.transform)
|
||||||
const renderingParameters = [
|
const renderingParameters = [
|
||||||
r.x,
|
r.x,
|
||||||
|
@ -47,13 +48,12 @@ export const renderGate = (
|
||||||
|
|
||||||
roundRect(ctx, ...renderingParameters)
|
roundRect(ctx, ...renderingParameters)
|
||||||
|
|
||||||
ctx.stroke()
|
|
||||||
|
|
||||||
if (gate.template.material.type === 'color') {
|
if (gate.template.material.type === 'color') {
|
||||||
ctx.fillStyle = gate.template.material.value
|
ctx.fillStyle = gate.template.material.value
|
||||||
|
|
||||||
ctx.fill()
|
ctx.fill()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx.stroke()
|
||||||
ctx.restore()
|
ctx.restore()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue