{value.length === 0 ?
+
{value.length === 0 ?
{placeholder || ''} :
- value.map((entity, i) => ctx.highlightService.highlight(entity)}
- onMouseLeave={() => ctx.highlightService.unHighlight(entity)}>
- {entityRenderer(entity)}
- {!readOnly && deselect(entity)}> }
- )}
+ value.map((entity, i) => {
+ const model = ctx.cadRegistry.find(entity);
+ return ctx.highlightService.highlight(entity)}
+ onMouseLeave={() => ctx.highlightService.unHighlight(entity)}>
+
+
+
+
+ {entityRenderer(entity)}
+
+ {!readOnly && deselect(entity)}> }
+
+ })}
;
}
+function EditButton({model}) {
+ const ctx = useContext(AppContext);
+
+ if (!(model instanceof MFace)) {
+ return null;
+ }
+
+ return
ctx.sketcherService.sketchFace(model)} className={ls.editBtn}>
+
+ ;
+}
+
+
export default attachToForm(EntityList);
function asArray(val) {
diff --git a/web/app/cad/craft/wizard/components/form/EntityList.less b/web/app/cad/craft/wizard/components/form/EntityList.less
index 9b7b75e8..f1c6c949 100644
--- a/web/app/cad/craft/wizard/components/form/EntityList.less
+++ b/web/app/cad/craft/wizard/components/form/EntityList.less
@@ -9,8 +9,11 @@
border: 1px solid #d2d0e0;
padding: 0 3px;
margin: 0 2px 2px 2px;
- display: inline-block;
+ display: flex;
+ align-items: center;
+ flex-wrap: nowrap;
& .rm {
+ padding-left: 2px;
background: none;
cursor: pointer;
&:hover {
@@ -20,4 +23,37 @@
color: red;
}
}
+ &:hover .editBtn {
+ display: flex;
+ }
+}
+
+.entityLabel {
+ position: relative;
+ display: flex;
+ align-items: center;
+}
+
+.editBtn {
+ display: none;
+ align-items: center;
+ position: absolute;
+ right: 0;
+ height: 100%;
+ padding: 0 2px;
+ background-color: #a9a91a;
+ &:hover {
+ color: #feffcb;
+ }
+ &:active {
+ color: yellow;
+ }
+}
+
+.container {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ justify-content: flex-start;
+ align-items: center;
}
\ No newline at end of file