Skip to content

Commit a601758

Browse files
authored
[elsa] 交互逻辑修改:1.编排时单击空白处自动关闭详情窗口 2.点击关闭详情窗口时,对应shape去除选中状态 (#99)
1 parent bde175d commit a601758

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

framework/elsa/fit-elsa-react/src/components/DefaultRoot.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export const DefaultRoot = forwardRef(function (
161161
<div className="sticky-header">
162162
{shape.drawer.getHeaderComponent(data, shapeStatus)}
163163
<div className="jade-form-drawer-close" onClick={() => {
164-
shape.page.onConfigShape = undefined;
164+
shape.unSelect();
165165
setOpen(false);
166166
}}>
167167
<CloseOutlined style={{fontSize: '12px'}}/>

framework/elsa/fit-elsa-react/src/components/base/jadeNode.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,5 +505,16 @@ export const jadeNode = (id, x, y, width, height, parent, drawer) => {
505505
}
506506
};
507507

508+
/**
509+
* @override
510+
*/
511+
const unSelect = self.unSelect;
512+
self.unSelect = () => {
513+
unSelect.apply(self, []);
514+
if (self.page.onConfigShape === self.id) {
515+
self.page.onConfigShape = undefined;
516+
}
517+
};
518+
508519
return self;
509520
};

0 commit comments

Comments
 (0)