fix some ds problems
This commit is contained in:
parent
0ef4a40375
commit
1e0e1bd542
File diff suppressed because one or more lines are too long
22
ui-ngx/package-lock.json
generated
22
ui-ngx/package-lock.json
generated
@ -1816,7 +1816,8 @@
|
||||
"@types/geojson": {
|
||||
"version": "7946.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.7.tgz",
|
||||
"integrity": "sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ=="
|
||||
"integrity": "sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/glob": {
|
||||
"version": "7.1.1",
|
||||
@ -1880,6 +1881,7 @@
|
||||
"version": "1.5.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.5.12.tgz",
|
||||
"integrity": "sha512-61HRMIng+bWvnnAIqUWLBlrd/TQZc4gU+gN1JL4K47EDtwIrcMEhWgi7PdcpbG1YmpH4F0EfOimkvV82gJIl9w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/geojson": "*"
|
||||
}
|
||||
@ -1888,6 +1890,7 @@
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/leaflet-markercluster/-/leaflet-markercluster-1.0.3.tgz",
|
||||
"integrity": "sha1-ZBUb5FP2SQ6HUVAEgt65YQZOeCw=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/leaflet": "*"
|
||||
}
|
||||
@ -1901,15 +1904,6 @@
|
||||
"@types/leaflet": "*"
|
||||
}
|
||||
},
|
||||
"@types/leaflet.markercluster": {
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/leaflet.markercluster/-/leaflet.markercluster-1.4.2.tgz",
|
||||
"integrity": "sha512-QQ//hevAxMH2dlRQdRre7V/1G+TbtuDtZnZF/75TNwVIgklrsQVCIcS/cvLsl7UUryfPJ6xmoYHfFzK5iGVgpg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/leaflet": "*"
|
||||
}
|
||||
},
|
||||
"@types/lodash": {
|
||||
"version": "4.14.150",
|
||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.150.tgz",
|
||||
@ -5129,7 +5123,8 @@
|
||||
"es6-promise": {
|
||||
"version": "4.2.8",
|
||||
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
|
||||
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w=="
|
||||
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
|
||||
"dev": true
|
||||
},
|
||||
"es6-promisify": {
|
||||
"version": "5.0.0",
|
||||
@ -10504,11 +10499,6 @@
|
||||
"integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=",
|
||||
"dev": true
|
||||
},
|
||||
"promise-polyfill": {
|
||||
"version": "8.1.3",
|
||||
"resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.1.3.tgz",
|
||||
"integrity": "sha512-MG5r82wBzh7pSKDRa9y+vllNHz3e3d4CNj1PQE4BQYxLme0gKYYBm9YENq+UkEikyZ0XbiGWxYlVw3Rl9O/U8g=="
|
||||
},
|
||||
"promise-retry": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz",
|
||||
|
||||
@ -64,7 +64,7 @@ export function mergeSchemes(schemes: JsonSettingsSchema[]): JsonSettingsSchema
|
||||
|
||||
export function addCondition(schema: JsonSettingsSchema, condition: string, exclude: string[] = []): JsonSettingsSchema {
|
||||
schema.form = schema.form.map(element => {
|
||||
if (!exclude.includes(element)) {
|
||||
if (!exclude.includes(element) && !exclude.includes(element.key)) {
|
||||
if (typeof element === 'string') {
|
||||
return {
|
||||
key: element,
|
||||
|
||||
@ -464,7 +464,7 @@ export function parseArray(input: any[]): any[] {
|
||||
time: el[0],
|
||||
deviceType: null
|
||||
};
|
||||
entityArray.forEach(entity => {
|
||||
entityArray.filter(el=>el.data.length).forEach(entity => {
|
||||
obj[entity?.dataKey?.label] = entity?.data[i][1];
|
||||
obj[entity?.dataKey?.label + '|ts'] = entity?.data[0][0];
|
||||
if (entity?.dataKey?.label === 'type') {
|
||||
@ -485,7 +485,7 @@ export function parseData(input: any[]): any[] {
|
||||
dsIndex: i,
|
||||
deviceType: null
|
||||
};
|
||||
entityArray.forEach(el => {
|
||||
entityArray.filter(el=>el.data.length).forEach(el => {
|
||||
obj[el?.dataKey?.label] = el?.data[0][1];
|
||||
obj[el?.dataKey?.label + '|ts'] = el?.data[0][0];
|
||||
if (el?.dataKey?.label === 'type') {
|
||||
|
||||
@ -229,8 +229,7 @@ export default abstract class LeafletMap {
|
||||
|
||||
// Markers
|
||||
updateMarkers(markersData) {
|
||||
markersData.forEach(data => {
|
||||
if (this.convertPosition(data)) {
|
||||
markersData.filter(mdata => !!this.convertPosition(mdata)).forEach(data => {
|
||||
if (data.rotationAngle || data.rotationAngle === 0) {
|
||||
this.options.icon = L.divIcon({
|
||||
html: `<div class="arrow" style="transform: translate(-10px, -10px) rotate(${data.rotationAngle}deg);"><div>`
|
||||
@ -245,7 +244,6 @@ export default abstract class LeafletMap {
|
||||
else {
|
||||
this.createMarker(data.entityName, data, markersData, this.options as MarkerSettings);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -130,6 +130,7 @@ export class ImageMap extends LeafletMap {
|
||||
}
|
||||
|
||||
convertPosition(expression): L.LatLng {
|
||||
if (isNaN(expression[this.options.xPosKeyName]) || isNaN(expression[this.options.yPosKeyName])) return null;
|
||||
return this.pointToLatLng(
|
||||
expression[this.options.xPosKeyName] * this.width,
|
||||
expression[this.options.yPosKeyName] * this.height);
|
||||
|
||||
@ -434,8 +434,7 @@ export const commonMapSettingsSchema =
|
||||
type: 'image'
|
||||
}
|
||||
]
|
||||
},
|
||||
'showPolygon',
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user