diff --git a/iframe.html b/iframe.html index b370e17..877ee92 100644 --- a/iframe.html +++ b/iframe.html @@ -2202,7 +2202,8 @@ const CALCULATOR_CONFIG = { energyUnit: 'kcal100g', percentage: 0, isLocked: false, - chartType: null + chartType: null, + splitByMeals: false }; this.foodSources.push(treats); this.renderFoodSource(treats); @@ -2654,6 +2655,11 @@ const CALCULATOR_CONFIG = { const container = document.getElementById('foodSources'); if (!container) return; + const isChart = foodSource.chartType === 'gc' || foodSource.chartType === 'kibble'; + const energyReadonlyAttr = isChart ? 'readonly' : ''; + const energyTitle = isChart ? 'Chart-based food: kcal locked' : 'Enter energy content'; + const unitDisabledAttr = isChart ? 'disabled' : ''; + const cardHTML = `