From 41cc8c7bccc2f4d92995e58131d5cfa2e5df6739 Mon Sep 17 00:00:00 2001 From: new_bajie <1054845498@qq.com> Date: Sat, 21 Jun 2025 14:23:19 +0800 Subject: [PATCH] [feature]: templates Any Control Tags, such as RectangleLabels. Configurable isEdit, default is true. Set it to false and the label name will not be displayed in the Labeling Interface > visual. --- web/apps/labelstudio/src/pages/CreateProject/Config/Config.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/apps/labelstudio/src/pages/CreateProject/Config/Config.jsx b/web/apps/labelstudio/src/pages/CreateProject/Config/Config.jsx index 5ee8ae27d343..566375906c10 100644 --- a/web/apps/labelstudio/src/pages/CreateProject/Config/Config.jsx +++ b/web/apps/labelstudio/src/pages/CreateProject/Config/Config.jsx @@ -77,7 +77,8 @@ const Label = ({ label, template, color }) => { const ConfigureControl = ({ control, template }) => { const refLabels = React.useRef(); const tagname = control.tagName; - + const isedit = control.attributes.getNamedItem("isEdit"); + if (isedit && !JSON.parse(isedit.value)) return null; if (tagname !== "Choices" && !tagname.endsWith("Labels")) return null; const palette = Palette();