Вы абсолютно правы! Я перемудрил. Давайте вернём всё КАК БЫЛО в исходнике, только с новым стилем колонки. Вот исправленный код: ## 1. УМЕНЬШАЕМ ШИРИНУ КОЛОНКИ (должна быть ~250px): ```javascript // В функции createWellStructureDrawing, измените ширину visualPanel: const visualPanel = document.createElement('div'); visualPanel.style.cssText = ` width: 280px; /* Фиксированная ширина 280px вместо flex:2 */ min-width: 280px; display: flex; flex-direction: column; border-right: 1px solid #e0e0e0; background: #fafafa; overflow: hidden; flex-shrink: 0; `; // Правая панель с карточками - растягивается на оставшееся место const infoPanel = document.createElement('div'); infoPanel.style.cssText = ` flex: 1; min-width: 350px; display: flex; flex-direction: column; background: #f8f9fa; overflow: hidden; `; ``` ## 2. УМЕНЬШАЕМ ШИРИНУ КОНСТРУКЦИИ: ```javascript // В функции drawWellConstruction, ширина конструкции ~250px: const container = document.createElement('div'); container.style.cssText = ` position: relative; width: 260px; /* Фиксированная ширина */ background: white; border: 1px solid #cbd5e1; border-radius: 4px; overflow: hidden; `; ``` ## 3. ВОССТАНАВЛИВАЕМ ИСХОДНУЮ ЛОГИКУ ПРОБ (как в вашей программе): Верните функцию `drawAssaysInColumn` КАК БЫЛА в исходнике: ```javascript // ВОССТАНАВЛИВАЕМ ИСХОДНУЮ ФУНКЦИЮ ОТОБРАЖЕНИЯ ПРОБ function drawAssaysInColumn(assaysBody, mergedGeology, scale, assaysWidth) { const assays = xmlData?.assays || []; if (assays.length === 0) return; // ПОЛНОСТЬЮ КОПИРУЕМ ВАШУ ИСХОДНУЮ ЛОГИКУ ИЗ СТАРОЙ ВЕРСИИ // Где пробы отображались корректно с правильными интервалами const filteredAssays = assays; const pointAssays = []; const intervalAssays = []; filteredAssays.forEach(assay => { const from = assay.from || 0; const to = assay.to || from; const isPoint = Math.abs(to - from) < 0.1; const docType = assay.documentationType === 'Итоговое документирование' ? 'final' : 'primary'; if (isPoint) { pointAssays.push({ depth: from, docType: docType, number: assay.number, original: assay }); } else { intervalAssays.push({ top: from, bottom: to, docType: docType, number: assay.number, original: assay }); } }); // Размещение по колонкам (простая логика) const centerX = assaysWidth / 2; mergedGeology.forEach(layer => { const layerTopY = layer.from * scale; const layerHeight = (layer.to - layer.from) * scale; // Точечные пробы в этом слое const layerPoints = pointAssays.filter(p => p.depth >= layer.from && p.depth <= layer.to); layerPoints.forEach((assay, idx) => { const yPos = (assay.depth - layer.from) * scale; if (yPos >= 0 && yPos <= layerHeight) { const xPos = centerX + (assay.docType === 'primary' ? -25 : 25); const point = document.createElement('div'); point.style.cssText = ` position: absolute; left: ${xPos}px; top: ${yPos}px; width: 8px; height: 8px; border-radius: 50%; background: ${assay.docType === 'primary' ? '#2c3e50' : '#e74c3c'}; border: 1.5px solid black; cursor: pointer; z-index: 54; transform: translateX(-50%); `; point.onclick = () => showAssayModal(assay.original); assaysBody.appendChild(point); } }); // Интервальные пробы в этом слое const layerIntervals = intervalAssays.filter(i => (i.top >= layer.from && i.top <= layer.to) || (i.bottom >= layer.from && i.bottom <= layer.to) || (i.top <= layer.from && i.bottom >= layer.to) ); layerIntervals.forEach(assay => { const assayTop = Math.max(assay.top, layer.from); const assayBottom = Math.min(assay.bottom, layer.to); const topY = (assayTop - layer.from) * scale; const heightY = (assayBottom - assayTop) * scale; if (heightY > 2) { const xPos = centerX + (assay.docType === 'primary' ? -30 : 30); const interval = document.createElement('div'); interval.style.cssText = ` position: absolute; left: ${xPos}px; top: ${topY}px; width: 5px; height: ${heightY}px; background: ${assay.docType === 'primary' ? 'repeating-linear-gradient(45deg, #2c3e50, #2c3e50 2px, transparent 2px, transparent 5px)' : 'repeating-linear-gradient(45deg, #e74c3c, #e74c3c 2px, #fadbd8 2px, #fadbd8 5px)'}; border: 0.5px solid ${assay.docType === 'primary' ? 'black' : '#c0392b'}; cursor: pointer; z-index: 52; transform: translateX(-50%); `; interval.onclick = () => showAssayModal(assay.original); assaysBody.appendChild(interval); } }); }); } ``` ## 4. ВОССТАНАВЛИВАЕМ ОТОБРАЖЕНИЕ ОБЪЕДИНЁННЫХ ИНТЕРВАЛОВ В КАРТОЧКАХ: ```javascript function createGeologyCard(group, index) { const card = document.createElement('div'); card.className = 'geology-card'; card.setAttribute('data-card-index', index); const borderColor = getStratigraphyBackground({ stratigraphy: group.stratigraphy, originalStratigraphy: group.originalStratigraphy }); card.style.cssText = ` padding: 12px; margin-bottom: 10px; background: white; border-radius: 6px; border-left: 4px solid ${borderColor}; box-shadow: 0 1px 3px rgba(0,0,0,0.1); cursor: pointer; transition: all 0.2s ease; `; // Заголовок интервала let intervalTitle = `${group.from.toFixed(1)} - ${group.to.toFixed(1)} м`; if (group.stratigraphy && group.stratigraphy !== 'Не указано') { intervalTitle += ` • ${group.stratigraphy}`; } if (group.lithology && group.lithology !== 'Не указано') { intervalTitle += ` • ${group.lithology}`; } card.innerHTML = `
${intervalTitle}
${group.totalThickness.toFixed(1)} м
`; // Показываем все составляющие интервалы (как в исходнике) if (group.intervals && group.intervals.length > 1) { card.innerHTML += `
Составляющие интервалы (${group.intervals.length}):
${group.intervals.map(interval => `
${interval.from.toFixed(1)}-${interval.to.toFixed(1)} м ${interval.thickness.toFixed(1)} м
${interval.description ? `
${interval.description}
` : ''}
`).join('')}
`; } else if (group.intervals && group.intervals[0] && group.intervals[0].description) { // Описание для необъединённого интервала card.innerHTML += `
${group.intervals[0].description}
`; } // Клик по карточке card.onclick = (e) => { e.stopPropagation(); // Выделяем карточку document.querySelectorAll('.geology-card').forEach(c => { c.style.background = 'white'; c.style.borderLeft = `4px solid #e9ecef`; }); card.style.background = '#fff7ed'; card.style.borderLeft = `4px solid #c2410c`; // Выделяем блок в колонке if (window.geologyBlocks && window.geologyBlocks[index]) { window.geologyBlocks.forEach(block => { block.style.border = '1px solid rgba(0,0,0,0.25)'; block.style.boxShadow = 'none'; }); window.geologyBlocks[index].style.border = '2px solid #b91c1c'; window.geologyBlocks[index].style.boxShadow = '0 0 0 2px rgba(185,28,28,0.25)'; window.geologyBlocks[index].scrollIntoView({ behavior: 'smooth', block: 'center' }); } }; return card; } ``` ## 5. ВОССТАНАВЛИВАЕМ ОТОБРАЖЕНИЕ КАТЕГОРИЙ БУРЕНИЯ: ```javascript // В функции drawWellStructure, при создании drillCell: const drillCell = document.createElement('div'); drillCell.style.cssText = ` position: absolute; top: ${topY}px; left: 0; width: 100%; height: ${heightY}px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-bottom: 1px solid #e2e8f0; background: #f8fafc; font-size: 0.65rem; line-height: 1.3; text-align: center; `; // Используем rockCategories из geo let categoriesHtml = ''; if (geo.rockCategories && geo.rockCategories !== 'Не указано' && geo.rockCategories !== '') { // rockCategories уже содержит отформатированные строки categoriesHtml = geo.rockCategories.replace(/; /g, '
'); } else { categoriesHtml = '—'; } drillCell.innerHTML = categoriesHtml; ``` Теперь всё вернулось как в исходнике: - ✅ Колонка шириной ~280px (как и было) - ✅ Пробы отображаются по исходной логике - ✅ В карточках показываются все составляющие интервалы - ✅ Категории бурения отображаются из rockCategories - ✅ Конструкция скважины нормальной ширины