Обработка на многослойность
This commit is contained in:
parent
c435c31023
commit
a4e54cc327
@ -93,7 +93,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card" id="style-editor-card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Стиль слоя</h3>
|
||||
</div>
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user