Spaces:
Running
Running
Download index.html from PHILIP111OO/its: direct link, hf CLI and curl.
- Browser
- Download file 32.8 kB
-
https://huggingface.co/spaces/PHILIP111OO/its/resolve/main/index.html
- Command line
-
hf download hf://spaces/PHILIP111OO/its/index.html
-
curl -L -o index.html https://huggingface.co/spaces/PHILIP111OO/its/resolve/main/index.html
32.8 kB
| <html lang="ru"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Конструктор ИТС - Веб-онтология транспортных систем России</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| .ontology-node { | |
| transition: all 0.3s ease; | |
| } | |
| .ontology-node:hover { | |
| transform: translateY(-3px); | |
| box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); | |
| } | |
| .equipment-card { | |
| transition: all 0.2s ease; | |
| } | |
| .equipment-card:hover { | |
| transform: scale(1.02); | |
| } | |
| #ontology-visualization { | |
| height: 600px; | |
| background-color: #f8fafc; | |
| border-radius: 0.5rem; | |
| overflow: hidden; | |
| } | |
| .connection-line { | |
| stroke: #94a3b8; | |
| stroke-width: 2; | |
| stroke-dasharray: 5, 5; | |
| } | |
| .drag-handle { | |
| cursor: move; | |
| } | |
| .selected-equipment { | |
| border-left: 4px solid #3b82f6; | |
| } | |
| [data-tooltip] { | |
| position: relative; | |
| } | |
| [data-tooltip]:hover:after { | |
| content: attr(data-tooltip); | |
| position: absolute; | |
| bottom: 100%; | |
| left: 50%; | |
| transform: translateX(-50%); | |
| background: #1e293b; | |
| color: white; | |
| padding: 4px 8px; | |
| border-radius: 4px; | |
| font-size: 12px; | |
| white-space: nowrap; | |
| z-index: 100; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50 font-sans"> | |
| <header class="bg-blue-800 text-white shadow-lg"> | |
| <div class="container mx-auto px-4 py-6"> | |
| <div class="flex justify-between items-center"> | |
| <div> | |
| <h1 class="text-3xl font-bold">Конструктор ИТС</h1> | |
| <p class="text-blue-200">Веб-онтология транспортных систем России</p> | |
| </div> | |
| <div class="flex space-x-4"> | |
| <button class="bg-blue-700 hover:bg-blue-600 px-4 py-2 rounded-lg flex items-center"> | |
| <i class="fas fa-save mr-2"></i> Сохранить проект | |
| </button> | |
| <button class="bg-blue-600 hover:bg-blue-500 px-4 py-2 rounded-lg flex items-center"> | |
| <i class="fas fa-share-alt mr-2"></i> Экспорт | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <main class="container mx-auto px-4 py-8"> | |
| <div class="grid grid-cols-1 lg:grid-cols-4 gap-8"> | |
| <!-- Боковая панель с оборудованием --> | |
| <div class="lg:col-span-1 bg-white p-6 rounded-xl shadow-md"> | |
| <h2 class="text-xl font-semibold mb-4 text-gray-800 border-b pb-2">Оборудование ИТС</h2> | |
| <!-- Фильтры --> | |
| <div class="mb-6"> | |
| <div class="relative mb-4"> | |
| <input type="text" placeholder="Поиск оборудования..." class="w-full pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i> | |
| </div> | |
| <div class="space-y-2"> | |
| <div class="flex items-center"> | |
| <input type="checkbox" id="filter-1" class="mr-2" checked> | |
| <label for="filter-1">Дорожное оборудование</label> | |
| </div> | |
| <div class="flex items-center"> | |
| <input type="checkbox" id="filter-2" class="mr-2" checked> | |
| <label for="filter-2">Транспортные средства</label> | |
| </div> | |
| <div class="flex items-center"> | |
| <input type="checkbox" id="filter-3" class="mr-2" checked> | |
| <label for="filter-3">Центры управления</label> | |
| </div> | |
| <div class="flex items-center"> | |
| <input type="checkbox" id="filter-4" class="mr-2" checked> | |
| <label for="filter-4">Коммуникации</label> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Категории оборудования --> | |
| <div class="space-y-4"> | |
| <div class="equipment-category"> | |
| <h3 class="font-medium text-gray-700 mb-2 flex items-center justify-between"> | |
| <span>Детекторы транспорта</span> | |
| <i class="fas fa-chevron-down text-sm"></i> | |
| </h3> | |
| <div class="space-y-2 pl-4"> | |
| <div class="equipment-card bg-gray-50 p-3 rounded-lg border cursor-pointer flex items-center" data-type="detector" data-id="induction-loop"> | |
| <div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center mr-3"> | |
| <i class="fas fa-magnet text-blue-600"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Индукционная петля</p> | |
| <p class="text-xs text-gray-500">ИП-12, ИП-24</p> | |
| </div> | |
| </div> | |
| <div class="equipment-card bg-gray-50 p-3 rounded-lg border cursor-pointer flex items-center" data-type="detector" data-id="radar"> | |
| <div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center mr-3"> | |
| <i class="fas fa-broadcast-tower text-blue-600"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Радарный детектор</p> | |
| <p class="text-xs text-gray-500">РД-5, РД-10</p> | |
| </div> | |
| </div> | |
| <div class="equipment-card bg-gray-50 p-3 rounded-lg border cursor-pointer flex items-center" data-type="detector" data-id="video"> | |
| <div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center mr-3"> | |
| <i class="fas fa-video text-blue-600"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Видеодетектор</p> | |
| <p class="text-xs text-gray-500">ВД-4К, ВД-8К</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="equipment-category"> | |
| <h3 class="font-medium text-gray-700 mb-2 flex items-center justify-between"> | |
| <span>Средства управления</span> | |
| <i class="fas fa-chevron-down text-sm"></i> | |
| </h3> | |
| <div class="space-y-2 pl-4"> | |
| <div class="equipment-card bg-gray-50 p-3 rounded-lg border cursor-pointer flex items-center" data-type="controller" data-id="traffic-light"> | |
| <div class="w-8 h-8 bg-green-100 rounded-full flex items-center justify-center mr-3"> | |
| <i class="fas fa-traffic-light text-green-600"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Светофорный контроллер</p> | |
| <p class="text-xs text-gray-500">СК-1, СК-2М</p> | |
| </div> | |
| </div> | |
| <div class="equipment-card bg-gray-50 p-3 rounded-lg border cursor-pointer flex items-center" data-type="controller" data-id="ramp-metering"> | |
| <div class="w-8 h-8 bg-green-100 rounded-full flex items-center justify-center mr-3"> | |
| <i class="fas fa-signal text-green-600"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Рампа-метер</p> | |
| <p class="text-xs text-gray-500">РМ-4</p> | |
| </div> | |
| </div> | |
| <div class="equipment-card bg-gray-50 p-3 rounded-lg border cursor-pointer flex items-center" data-type="controller" data-id="vms"> | |
| <div class="w-8 h-8 bg-green-100 rounded-full flex items-center justify-center mr-3"> | |
| <i class="fas fa-sign text-green-600"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Дорожное табло</p> | |
| <p class="text-xs text-gray-500">ДТ-3, ДТ-5</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="equipment-category"> | |
| <h3 class="font-medium text-gray-700 mb-2 flex items-center justify-between"> | |
| <span>Коммуникации</span> | |
| <i class="fas fa-chevron-down text-sm"></i> | |
| </h3> | |
| <div class="space-y-2 pl-4"> | |
| <div class="equipment-card bg-gray-50 p-3 rounded-lg border cursor-pointer flex items-center" data-type="communication" data-id="fiber"> | |
| <div class="w-8 h-8 bg-purple-100 rounded-full flex items-center justify-center mr-3"> | |
| <i class="fas fa-network-wired text-purple-600"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Волоконно-оптическая линия</p> | |
| <p class="text-xs text-gray-500">ВОЛС-12, ВОЛС-24</p> | |
| </div> | |
| </div> | |
| <div class="equipment-card bg-gray-50 p-3 rounded-lg border cursor-pointer flex items-center" data-type="communication" data-id="radio"> | |
| <div class="w-8 h-8 bg-purple-100 rounded-full flex items-center justify-center mr-3"> | |
| <i class="fas fa-wifi text-purple-600"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Радиоканал</p> | |
| <p class="text-xs text-gray-500">РК-900, РК-2400</p> | |
| </div> | |
| </div> | |
| <div class="equipment-card bg-gray-50 p-3 rounded-lg border cursor-pointer flex items-center" data-type="communication" data-id="cellular"> | |
| <div class="w-8 h-8 bg-purple-100 rounded-full flex items-center justify-center mr-3"> | |
| <i class="fas fa-sim-card text-purple-600"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Сотовая связь</p> | |
| <p class="text-xs text-gray-500">4G, 5G</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="equipment-category"> | |
| <h3 class="font-medium text-gray-700 mb-2 flex items-center justify-between"> | |
| <span>Центры управления</span> | |
| <i class="fas fa-chevron-down text-sm"></i> | |
| </h3> | |
| <div class="space-y-2 pl-4"> | |
| <div class="equipment-card bg-gray-50 p-3 rounded-lg border cursor-pointer flex items-center" data-type="center" data-id="tcc"> | |
| <div class="w-8 h-8 bg-yellow-100 rounded-full flex items-center justify-center mr-3"> | |
| <i class="fas fa-city text-yellow-600"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Транспортный центр</p> | |
| <p class="text-xs text-gray-500">ТЦ-1, ТЦ-2</p> | |
| </div> | |
| </div> | |
| <div class="equipment-card bg-gray-50 p-3 rounded-lg border cursor-pointer flex items-center" data-type="center" data-id="regional"> | |
| <div class="w-8 h-8 bg-yellow-100 rounded-full flex items-center justify-center mr-3"> | |
| <i class="fas fa-globe-americas text-yellow-600"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Региональный центр</p> | |
| <p class="text-xs text-gray-500">РЦ-1</p> | |
| </div> | |
| </div> | |
| <div class="equipment-card bg-gray-50 p-3 rounded-lg border cursor-pointer flex items-center" data-type="center" data-id="cloud"> | |
| <div class="w-8 h-8 bg-yellow-100 rounded-full flex items-center justify-center mr-3"> | |
| <i class="fas fa-cloud text-yellow-600"></i> | |
| </div> | |
| <div> | |
| <p class="font-medium">Облачная платформа</p> | |
| <p class="text-xs text-gray-500">ИТС-Облако</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Основная область конструктора --> | |
| <div class="lg:col-span-3 space-y-6"> | |
| <!-- Панель инструментов --> | |
| <div class="bg-white p-4 rounded-xl shadow-md flex flex-wrap gap-3"> | |
| <button class="bg-blue-100 text-blue-800 px-3 py-1 rounded-lg flex items-center" id="btn-add-node"> | |
| <i class="fas fa-plus mr-2"></i> Добавить узел | |
| </button> | |
| <button class="bg-gray-100 text-gray-800 px-3 py-1 rounded-lg flex items-center" id="btn-add-connection"> | |
| <i class="fas fa-link mr-2"></i> Соединить | |
| </button> | |
| <button class="bg-gray-100 text-gray-800 px-3 py-1 rounded-lg flex items-center" id="btn-delete"> | |
| <i class="fas fa-trash-alt mr-2"></i> Удалить | |
| </button> | |
| <div class="border-l border-gray-300 h-8 mx-2"></div> | |
| <button class="bg-gray-100 text-gray-800 px-3 py-1 rounded-lg flex items-center" id="btn-zoom-in"> | |
| <i class="fas fa-search-plus mr-2"></i> | |
| </button> | |
| <button class="bg-gray-100 text-gray-800 px-3 py-1 rounded-lg flex items-center" id="btn-zoom-out"> | |
| <i class="fas fa-search-minus mr-2"></i> | |
| </button> | |
| <button class="bg-gray-100 text-gray-800 px-3 py-1 rounded-lg flex items-center" id="btn-reset-view"> | |
| <i class="fas fa-expand mr-2"></i> Сброс | |
| </button> | |
| <div class="border-l border-gray-300 h-8 mx-2"></div> | |
| <button class="bg-gray-100 text-gray-800 px-3 py-1 rounded-lg flex items-center" id="btn-simulate"> | |
| <i class="fas fa-play-circle mr-2"></i> Симуляция | |
| </button> | |
| <button class="bg-gray-100 text-gray-800 px-3 py-1 rounded-lg flex items-center" id="btn-validate"> | |
| <i class="fas fa-check-circle mr-2"></i> Проверить | |
| </button> | |
| </div> | |
| <!-- Визуализация онтологии --> | |
| <div class="bg-white p-4 rounded-xl shadow-md"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h2 class="text-xl font-semibold text-gray-800">Визуализация онтологии ИТС</h2> | |
| <div class="flex space-x-2"> | |
| <button class="bg-gray-100 text-gray-800 px-3 py-1 rounded-lg text-sm" id="btn-hierarchical"> | |
| <i class="fas fa-project-diagram mr-1"></i> Иерархия | |
| </button> | |
| <button class="bg-gray-100 text-gray-800 px-3 py-1 rounded-lg text-sm" id="btn-network"> | |
| <i class="fas fa-network-wired mr-1"></i> Сеть | |
| </button> | |
| <button class="bg-blue-100 text-blue-800 px-3 py-1 rounded-lg text-sm" id="btn-ontology"> | |
| <i class="fas fa-sitemap mr-1"></i> Онтология | |
| </button> | |
| </div> | |
| </div> | |
| <div id="ontology-visualization" class="relative"> | |
| <!-- Здесь будет SVG-визуализация --> | |
| <svg id="ontology-svg" width="100%" height="100%"> | |
| <!-- Соединения будут добавляться здесь --> | |
| <g id="connections-layer"></g> | |
| <!-- Узлы будут добавляться здесь --> | |
| <g id="nodes-layer"> | |
| <!-- Пример узла --> | |
| <g class="ontology-node drag-handle" transform="translate(300, 200)" data-node-id="1"> | |
| <rect x="-50" y="-30" width="100" height="60" rx="10" ry="10" fill="#3b82f6" stroke="#1d4ed8" stroke-width="2"></rect> | |
| <text x="0" y="5" text-anchor="middle" fill="white" font-weight="bold" font-size="14">ЦУ ИТС</text> | |
| <text x="0" y="20" text-anchor="middle" fill="#bfdbfe" font-size="10">Центр управления</text> | |
| </g> | |
| <!-- Пример узла --> | |
| <g class="ontology-node drag-handle" transform="translate(150, 350)" data-node-id="2"> | |
| <rect x="-50" y="-30" width="100" height="60" rx="10" ry="10" fill="#10b981" stroke="#047857" stroke-width="2"></rect> | |
| <text x="0" y="5" text-anchor="middle" fill="white" font-weight="bold" font-size="14">Светофор</text> | |
| <text x="0" y="20" text-anchor="middle" fill="#a7f3d0" font-size="10">СК-2М</text> | |
| </g> | |
| <!-- Пример узла --> | |
| <g class="ontology-node drag-handle" transform="translate(450, 350)" data-node-id="3"> | |
| <rect x="-50" y="-30" width="100" height="60" rx="10" ry="10" fill="#8b5cf6" stroke="#6d28d9" stroke-width="2"></rect> | |
| <text x="0" y="5" text-anchor="middle" fill="white" font-weight="bold" font-size="14">Детектор</text> | |
| <text x="0" y="20" text-anchor="middle" fill="#ddd6fe" font-size="10">ИП-12</text> | |
| </g> | |
| </g> | |
| </svg> | |
| </div> | |
| </div> | |
| <!-- Панель свойств --> | |
| <div class="bg-white p-4 rounded-xl shadow-md"> | |
| <h2 class="text-xl font-semibold text-gray-800 mb-4">Свойства элемента</h2> | |
| <div id="properties-panel" class="space-y-4"> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-4"> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Тип оборудования</label> | |
| <select class="w-full border rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| <option>Детектор транспорта</option> | |
| <option>Средство управления</option> | |
| <option>Коммуникационное оборудование</option> | |
| <option>Центр управления</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Модель</label> | |
| <select class="w-full border rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| <option>ИП-12 (Индукционная петля)</option> | |
| <option>ИП-24 (Индукционная петля)</option> | |
| <option>РД-5 (Радарный детектор)</option> | |
| <option>СК-1 (Светофорный контроллер)</option> | |
| </select> | |
| </div> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Наименование</label> | |
| <input type="text" class="w-full border rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Введите название узла"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Описание</label> | |
| <textarea class="w-full border rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" rows="2" placeholder="Дополнительная информация"></textarea> | |
| </div> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-4"> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Производитель</label> | |
| <select class="w-full border rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| <option>Российские системы</option> | |
| <option>Технологии транспорта</option> | |
| <option>Смарт Дороги</option> | |
| <option>Иностранный производитель</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Год установки</label> | |
| <input type="number" min="2010" max="2023" class="w-full border rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" value="2023"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Срок службы</label> | |
| <div class="flex items-center"> | |
| <input type="number" min="1" max="20" class="w-full border rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" value="5"> | |
| <span class="ml-2 text-sm">лет</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="pt-4 border-t"> | |
| <h3 class="font-medium text-gray-700 mb-2">Технические параметры</h3> | |
| <div class="space-y-3"> | |
| <div class="flex justify-between items-center"> | |
| <span class="text-sm text-gray-600">Напряжение питания</span> | |
| <span class="font-medium">220V AC</span> | |
| </div> | |
| <div class="flex justify-between items-center"> | |
| <span class="text-sm text-gray-600">Диапазон температур</span> | |
| <span class="font-medium">-40°C до +60°C</span> | |
| </div> | |
| <div class="flex justify-between items-center"> | |
| <span class="text-sm text-gray-600">Степень защиты</span> | |
| <span class="font-medium">IP67</span> | |
| </div> | |
| <div class="flex justify-between items-center"> | |
| <span class="text-sm text-gray-600">Сертификация</span> | |
| <span class="font-medium">ГОСТ Р, ТР ТС</span> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="pt-4 border-t"> | |
| <h3 class="font-medium text-gray-700 mb-2">Совместимость</h3> | |
| <div class="flex flex-wrap gap-2"> | |
| <span class="bg-blue-100 text-blue-800 px-2 py-1 rounded-full text-xs">СК-1</span> | |
| <span class="bg-blue-100 text-blue-800 px-2 py-1 rounded-full text-xs">СК-2М</span> | |
| <span class="bg-blue-100 text-blue-800 px-2 py-1 rounded-full text-xs">РД-5</span> | |
| <span class="bg-blue-100 text-blue-800 px-2 py-1 rounded-full text-xs">ВД-4К</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <footer class="bg-gray-100 border-t mt-12"> | |
| <div class="container mx-auto px-4 py-6"> | |
| <div class="flex flex-col md:flex-row justify-between items-center"> | |
| <div class="mb-4 md:mb-0"> | |
| <h3 class="font-semibold text-gray-800">Конструктор ИТС</h3> | |
| <p class="text-sm text-gray-600">Веб-онтология транспортных систем России</p> | |
| </div> | |
| <div class="flex space-x-6"> | |
| <a href="#" class="text-gray-600 hover:text-blue-600">Документация</a> | |
| <a href="#" class="text-gray-600 hover:text-blue-600">Оборудование</a> | |
| <a href="#" class="text-gray-600 hover:text-blue-600">Стандарты</a> | |
| <a href="#" class="text-gray-600 hover:text-blue-600">Контакты</a> | |
| </div> | |
| </div> | |
| <div class="mt-6 pt-6 border-t border-gray-200 text-center text-sm text-gray-500"> | |
| <p>© 2023 Министерство транспорта РФ. Все права защищены.</p> | |
| </div> | |
| </div> | |
| </footer> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Инициализация перетаскивания узлов | |
| const nodes = document.querySelectorAll('.ontology-node'); | |
| let selectedNode = null; | |
| nodes.forEach(node => { | |
| // Обработка выбора узла | |
| node.addEventListener('click', function(e) { | |
| // Снимаем выделение со всех узлов | |
| nodes.forEach(n => { | |
| n.querySelector('rect').classList.remove('stroke-4', 'stroke-yellow-400'); | |
| }); | |
| // Выделяем текущий узел | |
| const rect = this.querySelector('rect'); | |
| rect.classList.add('stroke-4', 'stroke-yellow-400'); | |
| selectedNode = this; | |
| updatePropertiesPanel(this); | |
| e.stopPropagation(); | |
| }); | |
| // Инициализация перетаскивания | |
| const dragHandle = node.querySelector('.drag-handle'); | |
| if (dragHandle) { | |
| dragHandle.addEventListener('mousedown', startDrag); | |
| } | |
| }); | |
| // Обработка клика вне узлов | |
| document.addEventListener('click', function() { | |
| if (selectedNode) { | |
| selectedNode.querySelector('rect').classList.remove('stroke-4', 'stroke-yellow-400'); | |
| selectedNode = null; | |
| } | |
| }); | |
| // Обработка выбора оборудования | |
| const equipmentCards = document.querySelectorAll('.equipment-card'); | |
| equipmentCards.forEach(card => { | |
| card.addEventListener('click', function() { | |
| equipmentCards.forEach(c => c.classList.remove('selected-equipment')); | |
| this.classList.add('selected-equipment'); | |
| // Здесь можно добавить логику для предпросмотра оборудования | |
| }); | |
| }); | |
| // Обновление панели свойств | |
| function updatePropertiesPanel(node) { | |
| const nodeId = node.getAttribute('data-node-id'); | |
| const panel = document.getElementById('properties-panel'); | |
| // В реальном приложении здесь будет запрос данных об узле | |
| console.log(`Selected node: ${nodeId}`); | |
| } | |
| // Функции для перетаскивания узлов | |
| let selectedElement = null; | |
| let offset = { x: 0, y: 0 }; | |
| function startDrag(e) { | |
| if (e.target.classList.contains('drag-handle') || e.target.parentElement | |
| </html> |