From b3ea53d50ee31ee66f0e87a12107a51bb81e2cc6 Mon Sep 17 00:00:00 2001 From: Sebastian Blank Date: Fri, 9 Aug 2024 10:50:07 +0200 Subject: [PATCH] labelWidth as const --- public/js/pimcore/object/tags/rgbaColor.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/public/js/pimcore/object/tags/rgbaColor.js b/public/js/pimcore/object/tags/rgbaColor.js index bd07dbe24..062c27607 100644 --- a/public/js/pimcore/object/tags/rgbaColor.js +++ b/public/js/pimcore/object/tags/rgbaColor.js @@ -71,11 +71,8 @@ pimcore.object.tags.rgbaColor = Class.create(pimcore.object.tags.abstract, { }, getLayoutEdit: function () { - let labelWidth = 100; + const labelWidth = this.fieldConfig.labelWidth ? this.fieldConfig.labelWidth : 100; let width = this.fieldConfig.width ? this.fieldConfig.width : 400; - if (this.fieldConfig.labelWidth) { - labelWidth = this.fieldConfig.labelWidth; - } if (!this.fieldConfig.labelAlign || 'left' === this.fieldConfig.labelAlign) { width = this.sumWidths(width, labelWidth); }