From a4e54cc3279ad2954d7b774e4506b6ff13050f52 Mon Sep 17 00:00:00 2001 From: zakhy <=> Date: Wed, 5 Mar 2025 09:56:19 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BD=D0=B0=20=D0=BC=D0=BD=D0=BE=D0=B3=D0=BE?= =?UTF-8?q?=D1=81=D0=BB=D0=BE=D0=B9=D0=BD=D0=BE=D1=81=D1=82=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/main/templates/create_layer.html | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/main/templates/create_layer.html b/apps/main/templates/create_layer.html index b77eaab..4787f0a 100644 --- a/apps/main/templates/create_layer.html +++ b/apps/main/templates/create_layer.html @@ -93,7 +93,7 @@ -
+

Стиль слоя

@@ -436,8 +436,7 @@ input.id = property; input.value = rgbToHex(style[property]) || DEFAULT_STYLE[property]; input.className = "form-control"; - } - else if (property === "fill-color") { + } else if (property === "fill-color") { input = document.createElement("input"); input.type = "color"; input.id = property; @@ -551,7 +550,16 @@ function dxfToGeoJSON(dxf) { console.log(dxf); const normalizedEntities = normalizeCoordinates(dxf.entities, dxf.header); + + let prevLayer = null + let manyLayers = false const features = normalizedEntities.map(entity => { + let currentLayer = entity.layer + if (prevLayer && (currentLayer !== prevLayer) && manyLayers === false) { + manyLayers = true + document.getElementById("style-editor-card").style.display = 'none' + } + prevLayer = currentLayer if (entity.type === 'LINE') { return createFeature('LineString', entity.normalizedCoords,