diff --git a/packages/core/src/services/layer/LayerService.ts b/packages/core/src/services/layer/LayerService.ts index 9e8934ad93..c9fa78d28a 100644 --- a/packages/core/src/services/layer/LayerService.ts +++ b/packages/core/src/services/layer/LayerService.ts @@ -131,12 +131,12 @@ export default class LayerService implements ILayerService { // 渲染检测 private renderTest(renderType: string | undefined): boolean { - const now = new Date().getTime() + const now = new Date().getTime(); const betweenPickRenderTime = now - this.lastPickRenderTime; - if(renderType === 'picking') { + if (renderType === 'picking') { this.lastPickRenderTime = new Date().getTime(); } - + // 继续渲染事件 if (renderType) { switch (renderType) { @@ -149,7 +149,7 @@ export default class LayerService implements ILayerService { ) { this.lastRenderType = 'picking'; // 如果上一次触发的事件在 48 ms 以上,则这一次不放弃触发 - if(betweenPickRenderTime > 48) { + if (betweenPickRenderTime > 48) { return true; } else { return false; diff --git a/stories/MapPerformance/components/Map.tsx b/stories/MapPerformance/components/Map.tsx index 0199164ce8..ad7ea9f9fd 100644 --- a/stories/MapPerformance/components/Map.tsx +++ b/stories/MapPerformance/components/Map.tsx @@ -163,9 +163,9 @@ export default class PointTest extends React.Component { .style({ opacity: 1.0, }) - .select(true) - // .animate(true) - // .active(true); + .select(true); + // .animate(true) + // .active(true); scene.on('loaded', () => { scene.addLayer(layer);