修改一些eslint的问题
This commit is contained in:
@@ -82,7 +82,6 @@ export class CesiumViewerManager {
|
|||||||
containerId: options.containerId,
|
containerId: options.containerId,
|
||||||
shouldAnimate: true,
|
shouldAnimate: true,
|
||||||
baseLayerPicker: false,
|
baseLayerPicker: false,
|
||||||
imageryProvider: false,
|
|
||||||
timeline: false,
|
timeline: false,
|
||||||
animation: false,
|
animation: false,
|
||||||
infoBox: false,
|
infoBox: false,
|
||||||
|
|||||||
@@ -260,12 +260,21 @@ export class EntityManager {
|
|||||||
* @param attributes 属性对象
|
* @param attributes 属性对象
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
#applyAttributesToEntity(entity: Entity, attributes: Record<string, unknown>, entityType?: string): void {
|
#applyAttributesToEntity(
|
||||||
|
entity: Entity,
|
||||||
|
attributes: Record<string, unknown>,
|
||||||
|
entityType?: string
|
||||||
|
): void {
|
||||||
if (!attributes || Object.keys(attributes).length === 0) {
|
if (!attributes || Object.keys(attributes).length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let targetGraphics: any = null;
|
let targetGraphics:
|
||||||
|
| PointGraphics
|
||||||
|
| BillboardGraphics
|
||||||
|
| PolylineGraphics
|
||||||
|
| PolygonGraphics
|
||||||
|
| null = null;
|
||||||
|
|
||||||
if (entityType === 'point' && entity.point) {
|
if (entityType === 'point' && entity.point) {
|
||||||
targetGraphics = entity.point;
|
targetGraphics = entity.point;
|
||||||
@@ -280,13 +289,13 @@ export class EntityManager {
|
|||||||
if (targetGraphics) {
|
if (targetGraphics) {
|
||||||
Object.entries(attributes).forEach(([key, value]) => {
|
Object.entries(attributes).forEach(([key, value]) => {
|
||||||
if (value !== undefined && value !== null) {
|
if (value !== undefined && value !== null) {
|
||||||
(targetGraphics as any)[key] = value;
|
(targetGraphics as unknown as Record<string, unknown>)[key] = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Object.entries(attributes).forEach(([key, value]) => {
|
Object.entries(attributes).forEach(([key, value]) => {
|
||||||
if (value !== undefined && value !== null) {
|
if (value !== undefined && value !== null) {
|
||||||
(entity as any)[key] = value;
|
(entity as unknown as Record<string, unknown>)[key] = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user