Skip to content

Conversation

@seveibar
Copy link
Contributor

Reverts #440

@vercel
Copy link

vercel bot commented Oct 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
pcb-viewer Ready Ready Preview Comment Oct 30, 2025 8:29pm

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 493 to +508
const order = [
"board",
"drill",
...DEFAULT_DRAW_ORDER.filter((l) => l !== foregroundLayer),
"board",
foregroundLayer,
...DEFAULT_DRAW_ORDER.filter((l) => l !== foregroundLayer),
]

order.forEach((layer, i) => {
const canvas = canvasLayerMap[layer]
if (!canvas) return

// Foreground layer and its associated silkscreen get the highest z-index
if (layer === foregroundLayer) {
canvas.style.zIndex = `${zIndexMap.topLayer}`
} else if (
if (
(layer === "bottom_silkscreen" && foregroundLayer === "bottom") ||
(layer === "top_silkscreen" && foregroundLayer === "top")
) {
canvas.style.zIndex = `${zIndexMap.topLayer + 1}`
canvas.style.zIndex = `${zIndexMap.topLayer}` // zIndexMap.topLayer
} else {
canvas.style.zIndex = `${zIndexMap.topLayer - (order.length - i)}`
canvas.style.zIndex = `${zIndexMap.topLayer - i}`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore foreground layer to highest z-index

The revised orderAndFadeLayers now builds the layer list as ["drill", "board", foregroundLayer, …DEFAULT_DRAW_ORDER] and applies canvas.style.zIndex = zIndexMap.topLayer - i for every entry. Because there is no longer special handling for the foregroundLayer, the drill and board canvases always receive larger z-indices than the selected copper layer, so the chosen layer can sit underneath the board or drill canvases and be obscured. The previous implementation appended foregroundLayer last and explicitly promoted it to zIndexMap.topLayer. Consider restoring that behaviour so the selected layer is guaranteed to render above all others.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants