feat: add ribbon layer selector with layer actions and state restore#233
Merged
feat: add ribbon layer selector with layer actions and state restore#233
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MlLayerSelectcomponent with searchable layer options, inline state toggles (on/frozen/locked), line preview, and localized tooltips.useLayersinto a fuller layer state manager with document/sysvar sync, mutation helpers, and snapshot capture/restore.MlLayerDrawStyleToolbar,MlLayerList) to reuseuseLayersoperations instead of ad-hoc DB writes.@mlightcad/ribbonfrom0.0.8to0.0.9.Why
What Changed
packages/cad-viewer/src/component/common/MlLayerSelect.vueadded as a reusable, interactive layer selector.packages/cad-viewer/src/composable/useLayers.tsnow exposes:on,frozen,locked)packages/cad-viewer/src/component/layout/MlRibbonCommands.vueintegratesuseLayersand adds new ribbon layer action handling, including isolate snapshot + restore flow.packages/cad-viewer/src/component/layout/MlLayerDrawStyleToolbar.vueswitches toMlLayerSelectand layer-state toggle events.packages/cad-viewer/src/component/palette/MlLayerList.vuenow calls shared composable methods (setLayerOn,setLayerColor).packages/cad-viewer/src/locale/en/main.tsandpackages/cad-viewer/src/locale/zh/main.tsadd new ribbon/layer tooltip and selector strings.packages/cad-viewer/src/svg/layer/*adds isolate/light/locker/snow/unisolate icons and updates existing layer icons.packages/cad-viewer/package.jsonandpnpm-lock.yamlupgrade@mlightcad/ribbonto0.0.9.Risks / Notes
LayerInfoshape changed (isHidden->isFrozen), which may impact any downstream code that referenced the old property.MlLineWeightSelectmoved from i18n labels to fixed English labels and excludesByDIPs; confirm this is intended UX behavior.