MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / clickLayer

Function clickLayer

src/components/Workspace/Layer/index.jsx:81–95  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

79
80 }
81 function clickLayer (id) {
82 // 点击图层中某个图层
83 let tempSelectKeys = [...(props.nowId || [])]
84 if (isCtrl) {
85 if (tempSelectKeys.includes(id)) {
86 tempSelectKeys.splice(tempSelectKeys.findIndex(item => item === id), 1)
87 } else {
88 tempSelectKeys.push(id)
89 }
90 } else {
91 tempSelectKeys = [id]
92 }
93 // setSelectKeys(tempSelectKeys)
94 props.onPropertyChange({ selectKeys: tempSelectKeys }, null, 'layerClick');
95 }
96 function onMenuClick (type) {
97 setIsShowMenu(false)
98 setShowSubMenu(false)

Callers 1

renderMenuItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected