@@ -167,9 +167,15 @@ module Method = {
167167 Meta3dCommonlib .ArraySt .getExn (dropPos , dropPos -> Meta3dCommonlib .ArraySt .length - 1 ),
168168 ) // the drop position relative to the drop node, inside 0, top -1, bottom 1
169169
170- dispatch (ElementAssembleStoreType .DropSelectUIControl (
171- (service .meta3d .hasChildren , service .meta3d .serializeUIControlProtocolConfigLib ),
172- info .dropToGap , dragKey , dropKey ,dropPosition ))
170+ dispatch (
171+ ElementAssembleStoreType .DropSelectUIControl (
172+ (service .meta3d .hasChildren , service .meta3d .serializeUIControlProtocolConfigLib ),
173+ info .dropToGap ,
174+ dragKey ,
175+ dropKey ,
176+ dropPosition ,
177+ ),
178+ )
173179 }
174180
175181 // let upgradeSelectUIControl = (dispatch, isDebug, selectedKeys) => {
@@ -298,56 +304,58 @@ let make = (
298304 ) = service .react .useAllSelector (. Method .useSelector )
299305
300306 <>
301- <Space direction = #vertical size = #middle >
302- <Space direction = #horizontal wrap = true >
303- <Button
304- ref = {addUIControlButtonTarget }
305- icon = {<Icon .FileAddOutlined />}
306- onClick = {_ => {
307- setIsShowUIControls (_ => true )
308-
309- eventEmitter .emit (. EventUtils .getAddUIControlsEventName (), Obj .magic (1 ))
310- }}
311- />
312- <Button
313- icon = {<Icon .DeleteOutlined />}
314- onClick = {_ => {
315- Method .unselectUIControl (dispatch , isDebug , selectedKeys )
316- }}
317- />
318- </Space >
319- <section ref = {selectedUIControlTarget -> Obj .magic }>
320- <Tree
321- draggable = true
322- autoExpandParent = true
323- showIcon = true
324- treeData = {selectedUIControls
325- -> Method .convertToTreeData (service , _ , selectedUIControlInspectorData )
326- -> Method .addRootTreeNode }
327- expandedKeys = {Method .getAllKeys (selectedUIControls )}
328- // onExpand={expandedKeysValue =>
329- // Method.onExpand((setExpandedKeys, setAutoExpandParent), expandedKeysValue)}
330- selectedKeys
331- onSelect = {(selectedKeysValue , info : Tree .info ) => {
332- Method .onSelect (service , (dispatch , setSelectedKeys ), selectedKeysValue , info )
333-
334- // handleWhenSelectTreeNodeFunc(info.node.title)
335- eventEmitter .emit (.
336- EventUtils .getSelectTreeNodeEventName (),
337- Method .findTitle (
338- info .node .key ,
339- info .node .title ,
340- selectedUIControls ,
341- selectedUIControlInspectorData ,
342- )-> Obj .magic ,
343- )
344- }}
345- onDrop = {(info : Tree .info ) => {
346- Method .onDrop (service , dispatch , info )
347- }}
348- />
349- </section >
350- </Space >
307+ // <Space direction=#vertical size=#middle>
308+ <section style = {ReactDOM .Style .make (~position = "sticky" , ~top = "0" , ~zIndex = "100" , ())}>
309+ // <Space direction=#horizontal wrap=true>
310+ <Button
311+ ref = {addUIControlButtonTarget }
312+ icon = {<Icon .FileAddOutlined />}
313+ onClick = {_ => {
314+ setIsShowUIControls (_ => true )
315+
316+ eventEmitter .emit (. EventUtils .getAddUIControlsEventName (), Obj .magic (1 ))
317+ }}
318+ />
319+ <Button
320+ icon = {<Icon .DeleteOutlined />}
321+ onClick = {_ => {
322+ Method .unselectUIControl (dispatch , isDebug , selectedKeys )
323+ }}
324+ />
325+ // </Space>
326+ </section >
327+ <section ref = {selectedUIControlTarget -> Obj .magic }>
328+ <Tree
329+ draggable = true
330+ autoExpandParent = true
331+ showIcon = true
332+ treeData = {selectedUIControls
333+ -> Method .convertToTreeData (service , _ , selectedUIControlInspectorData )
334+ -> Method .addRootTreeNode }
335+ expandedKeys = {Method .getAllKeys (selectedUIControls )}
336+ // onExpand={expandedKeysValue =>
337+ // Method.onExpand((setExpandedKeys, setAutoExpandParent), expandedKeysValue)}
338+ selectedKeys
339+ onSelect = {(selectedKeysValue , info : Tree .info ) => {
340+ Method .onSelect (service , (dispatch , setSelectedKeys ), selectedKeysValue , info )
341+
342+ // handleWhenSelectTreeNodeFunc(info.node.title)
343+ eventEmitter .emit (.
344+ EventUtils .getSelectTreeNodeEventName (),
345+ Method .findTitle (
346+ info .node .key ,
347+ info .node .title ,
348+ selectedUIControls ,
349+ selectedUIControlInspectorData ,
350+ )-> Obj .magic ,
351+ )
352+ }}
353+ onDrop = {(info : Tree .info ) => {
354+ Method .onDrop (service , dispatch , info )
355+ }}
356+ />
357+ </section >
358+ // </Space>
351359 <Modal
352360 title = {` UI Controls` }
353361 visible = {isShowUIControls }
0 commit comments