File tree Expand file tree Collapse file tree
components/PlotAnimationView Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111import { ConstToolType , TouchType } from '../../../../constants'
1212import { TableList } from '../../../../components'
1313import { color } from '../../../../styles'
14- import { Toast , scaleSize , setSpText } from '../../../../utils'
14+ import { scaleSize , setSpText } from '../../../../utils'
1515import { getLanguage } from '../../../../language/index'
1616// import { getPublicAssets } from '../../../../assets'
1717import { getThemeAssets } from '../../../../assets'
@@ -69,12 +69,6 @@ export default class PlotAnimationView extends React.Component {
6969 this . props . layerName ,
7070 this . props . geoId ,
7171 )
72- if ( type == - 1 ) {
73- Toast . show ( getLanguage ( global . language ) . Prompt . PLEASE_SELECT_PLOT_SYMBOL )
74- this . cancle ( )
75- return
76- }
77-
7872 let data = this . getData ( )
7973 let subData = [ ]
8074 switch ( type ) {
Original file line number Diff line number Diff line change @@ -529,7 +529,7 @@ export default class MapView extends React.Component {
529529 this . _addMap ( )
530530 }
531531
532- geometrySelected = event => {
532+ geometrySelected = async event => {
533533 this . props . setSelection &&
534534 this . props . setSelection ( [
535535 {
@@ -587,13 +587,23 @@ export default class MapView extends React.Component {
587587 break
588588 }
589589 case ConstToolType . PLOT_ANIMATION_START : {
590- let type = ConstToolType . PLOT_ANIMATION_NODE_CREATE
591- this . toolBox . setVisible ( true , type , {
592- isFullScreen : true ,
593- height : ConstToolType . TOOLBAR_HEIGHT [ 5 ] ,
594- containerType : 'createPlotAnimation' ,
595- cb : ( ) => { } ,
596- } )
590+ let type = await SMap . getGeometryTypeById (
591+ event . layerInfo . name ,
592+ event . id ,
593+ )
594+ if ( type == - 1 ) {
595+ Toast . show (
596+ getLanguage ( global . language ) . Prompt . PLEASE_SELECT_PLOT_SYMBOL ,
597+ )
598+ } else {
599+ let type = ConstToolType . PLOT_ANIMATION_NODE_CREATE
600+ this . toolBox . setVisible ( true , type , {
601+ isFullScreen : true ,
602+ height : ConstToolType . TOOLBAR_HEIGHT [ 5 ] ,
603+ containerType : 'createPlotAnimation' ,
604+ cb : ( ) => { } ,
605+ } )
606+ }
597607 break
598608 }
599609 default :
You can’t perform that action at this time.
0 commit comments