-
Notifications
You must be signed in to change notification settings - Fork 40
Revert "Fix multi-layer visibility issues: inner5,6 not showing and top layer…" #442
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
base: main
Are you sure you want to change the base?
Conversation
…op layer…" This reverts commit 7b61949.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this 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".
| 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}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 👍 / 👎.
Reverts #440