Commit e9bea779 authored by 田翔's avatar 田翔

fix: 点击图片没显示问题

parent 0ee5e3ac
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "3.0.8", "version": "3.0.9",
"description": "3.0.8: 只读形态只读取值不读取默认值, 图片参数添加site", "description": "3.0.9: 点击图片没显示问题",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -8,7 +8,8 @@ import { ...@@ -8,7 +8,8 @@ import {
Drawtool as drawTool, Drawtool as drawTool,
Graphic, Graphic,
GraphicsLayer, GraphicsLayer,
Point Point,
geomUtils,
} from '@wisdom-map/arcgismap' } from '@wisdom-map/arcgismap'
import Drag from '../../../components/Drag' import Drag from '../../../components/Drag'
import { isObject, mercatorToLngLat } from '../../../../utils' import { isObject, mercatorToLngLat } from '../../../../utils'
...@@ -45,7 +46,7 @@ const Coordinate = (props) => { ...@@ -45,7 +46,7 @@ const Coordinate = (props) => {
viewObject.map.add(coordGetLayer); viewObject.map.add(coordGetLayer);
if (value) { if (value) {
coordGetLayer.removeAll(); coordGetLayer.removeAll();
const newVal = value.split(","); const newVal = value.split(',');
const defalutGraphic = createGraphic(new Point({ const defalutGraphic = createGraphic(new Point({
x: newVal[0], x: newVal[0],
y: newVal[1], y: newVal[1],
...@@ -54,6 +55,12 @@ const Coordinate = (props) => { ...@@ -54,6 +55,12 @@ const Coordinate = (props) => {
} }
})); }));
coordGetLayer.add(defalutGraphic); coordGetLayer.add(defalutGraphic);
setTimeout(() => {
viewObject.goTo({
center: geomUtils.toGeometry({ x: Number(newVal[0]), y: Number(newVal[1]) }),
scale: viewObject.scale - 1,
})
}, 2000)
} }
setCoordGetLayers(coordGetLayer); setCoordGetLayers(coordGetLayer);
getPoints(viewObject, coordGetLayer); getPoints(viewObject, coordGetLayer);
......
...@@ -27,6 +27,9 @@ const getFileType = (fileName) => { ...@@ -27,6 +27,9 @@ const getFileType = (fileName) => {
if (fileName.includes('svg')) { if (fileName.includes('svg')) {
return 'svg' return 'svg'
} }
if (fileName.includes('jpeg')) {
return 'jpeg'
}
//文档 //文档
if (fileName.includes('docx')) { if (fileName.includes('docx')) {
return 'docx' return 'docx'
......
...@@ -119,7 +119,7 @@ const ComboBox = (props) => { ...@@ -119,7 +119,7 @@ const ComboBox = (props) => {
showArrow={!disabled} showArrow={!disabled}
showSearch={isSearch} showSearch={isSearch}
value={valueShow} value={valueShow}
placeholder={placeholder} placeholder={disabled ? null : placeholder}
onChange={handleChange} onChange={handleChange}
allowClear allowClear
getPopupContainer={(targterNode) => targterNode.parentElement || document.body} getPopupContainer={(targterNode) => targterNode.parentElement || document.body}
......
...@@ -25,7 +25,7 @@ const TextArea = (props) => { ...@@ -25,7 +25,7 @@ const TextArea = (props) => {
disabled={disabled} disabled={disabled}
value={value} value={value}
rows={rows} rows={rows}
placeholder={placeholder} placeholder={disabled ? null : placeholder}
onChange={handleChange} onChange={handleChange}
/> />
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment