Skip to content

Commit 0a172ed

Browse files
committed
Merge branch 'dev-2.1' of https://github.com/iMobileforJavaScript/iTablet into dev-2.1
2 parents e15d993 + 8d221e1 commit 0a172ed

2 files changed

Lines changed: 19 additions & 15 deletions

File tree

src/containers/workspace/components/PlotAnimationView/PlotAnimationView.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
import { ConstToolType, TouchType } from '../../../../constants'
1212
import { TableList } from '../../../../components'
1313
import { color } from '../../../../styles'
14-
import { Toast, scaleSize, setSpText } from '../../../../utils'
14+
import { scaleSize, setSpText } from '../../../../utils'
1515
import { getLanguage } from '../../../../language/index'
1616
// import { getPublicAssets } from '../../../../assets'
1717
import { 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) {

src/containers/workspace/pages/mapView/MapView.js

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff 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:

0 commit comments

Comments
 (0)