File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -53,10 +53,11 @@ export class L7Layer {
5353
5454 setVisibility ( visibility ) {
5555 if ( this . animateStatus ) {
56- this . scene . layerService . stopAnimate ( this . l7layer . id ) ;
56+ this . scene . layerService . stopAnimate ( ) ;
57+ this . animateStatus = false ;
5758 }
5859 visibility ? this . l7layer . show ( ) : this . l7layer . hide ( ) ;
59- this . map . style . setLayoutProperty ( this . id , 'visibility' , visibility ? 'visible' : 'none' ) ;
60+ this . map . style . setLayoutProperty ( this . id , 'visibility' , visibility ? 'visible' : 'none' ) ;
6061 }
6162 addSceneLayer ( scene ) {
6263 this . scene = scene ;
@@ -79,14 +80,16 @@ export class L7Layer {
7980 this . scene && this . scene . removeLayer ( this . l7layer ) ;
8081 }
8182 onRemove ( ) {
82- this . scene && this . scene . layerService . stopAnimate ( this . l7layer . id ) ;
83+ this . scene && this . scene . layerService . stopAnimate ( ) ;
8384 this . scene && this . scene . removeLayer ( this . l7layer ) ;
8485 }
8586
8687 render ( ) {
8788 if ( this . scene && this . scene . getLayer ( this . l7layer . id ) ) {
8889 if ( this . l7layer . animateStatus || ( this . l7layer . layerModel && this . l7layer . layerModel . spriteAnimate ) ) {
89- this . scene . layerService . startAnimate ( this . l7layer . id ) ;
90+ if ( ! this . animateStatus ) {
91+ this . scene . layerService . startAnimate ( ) ;
92+ }
9093 this . animateStatus = true ;
9194 this . map . triggerRepaint ( ) ;
9295 } else {
You can’t perform that action at this time.
0 commit comments