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