@@ -1139,7 +1139,7 @@ export default class ToolBar extends React.Component {
11391139 : table ,
11401140 } ,
11411141 ( ) => {
1142- if ( this . height < newHeight ) {
1142+ if ( this . height <= newHeight ) {
11431143 this . height = newHeight
11441144 this . showToolbarAndBox ( isShow , type )
11451145 ! isShow && this . props . existFullMap && this . props . existFullMap ( )
@@ -1149,7 +1149,7 @@ export default class ToolBar extends React.Component {
11491149 )
11501150 } . bind ( this )
11511151
1152- if ( this . height >= newHeight ) {
1152+ if ( this . height > newHeight && this . height > 0 ) {
11531153 this . height = newHeight
11541154 this . showToolbarAndBox ( isShow , type )
11551155 ! isShow && this . props . existFullMap && this . props . existFullMap ( )
@@ -1228,13 +1228,6 @@ export default class ToolBar extends React.Component {
12281228
12291229 close = ( type = this . state . type ) => {
12301230 GLOBAL . currentToolbarType = ''
1231- // 关闭采集, type 为number时为采集类型,若有冲突再更改
1232- if (
1233- typeof type === 'number' ||
1234- ( typeof type === 'string' && type . indexOf ( 'MAP_COLLECTION_' ) >= 0 )
1235- ) {
1236- SCollector . stopCollect ( )
1237- }
12381231 if ( type === ConstToolType . MAP_EDIT_TAGGING ) {
12391232 SMap . setAction ( Action . PAN )
12401233 } else if (
@@ -1267,6 +1260,13 @@ export default class ToolBar extends React.Component {
12671260 }
12681261 this . props . existFullMap && this . props . existFullMap ( )
12691262 }
1263+ // 关闭采集, type 为number时为采集类型,若有冲突再更改
1264+ if (
1265+ typeof type === 'number' ||
1266+ ( typeof type === 'string' && type . indexOf ( 'MAP_COLLECTION_' ) >= 0 )
1267+ ) {
1268+ SCollector . stopCollect ( )
1269+ }
12701270 }
12711271
12721272 clearCurrentLabel = ( ) => {
@@ -1362,7 +1362,14 @@ export default class ToolBar extends React.Component {
13621362 // this.showToolbar(false)
13631363 if ( typeof type === 'string' && type . indexOf ( 'MAP_EDIT_' ) >= 0 ) {
13641364 SMap . submit ( )
1365- SMap . setAction ( Action . PAN )
1365+ if (
1366+ type !== ConstToolType . MAP_EDIT_DEFAULT &&
1367+ type !== ConstToolType . MAP_EDIT_TAGGING
1368+ ) {
1369+ SMap . setAction ( Action . SELECT )
1370+ } else {
1371+ SMap . setAction ( Action . PAN )
1372+ }
13661373 }
13671374 // this.props.existFullMap && this.props.existFullMap()
13681375 }
@@ -1525,27 +1532,32 @@ export default class ToolBar extends React.Component {
15251532 this . state . type === ConstToolType . MAP_THEME_PARAM_CREATE_DATASETS
15261533 ) {
15271534 //新建专题图数据集列表
1528- ( async function ( ) {
1529- let data = await SThemeCartography . getThemeExpressByDatasetName ( item . title )
1535+ ( async function ( ) {
1536+ let data = await SThemeCartography . getThemeExpressByDatasetName (
1537+ item . title ,
1538+ )
15301539 let dataset = data . dataset
1531- let datalist = [ {
1532- title : dataset . datasetName ,
1533- data : data . list ,
1534- } ]
1535- this . setState ( {
1536- themeDatasetName : item . title ,
1537- isFullScreen : false ,
1538- isTouchProgress : false ,
1539- isSelectlist : false ,
1540- containerType : 'list' ,
1541- data : datalist ,
1542- buttons : [ ToolbarBtnType . THEME_CANCEL ] ,
1543- type : ConstToolType . MAP_THEME_PARAM_CREATE_EXPRESSION ,
1544- } ,
1545- ( ) => {
1546- this . height = ConstToolType . THEME_HEIGHT [ 6 ]
1547- this . scrollListToLocation ( )
1548- } ,
1540+ let datalist = [
1541+ {
1542+ title : dataset . datasetName ,
1543+ data : data . list ,
1544+ } ,
1545+ ]
1546+ this . setState (
1547+ {
1548+ themeDatasetName : item . title ,
1549+ isFullScreen : false ,
1550+ isTouchProgress : false ,
1551+ isSelectlist : false ,
1552+ containerType : 'list' ,
1553+ data : datalist ,
1554+ buttons : [ ToolbarBtnType . THEME_CANCEL ] ,
1555+ type : ConstToolType . MAP_THEME_PARAM_CREATE_EXPRESSION ,
1556+ } ,
1557+ ( ) => {
1558+ this . height = ConstToolType . THEME_HEIGHT [ 6 ]
1559+ this . scrollListToLocation ( )
1560+ } ,
15491561 )
15501562 } . bind ( this ) ( ) )
15511563 } else if (
0 commit comments