Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-station-module-view
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
station
amos-station-module-view
Commits
4bbe8ed4
Commit
4bbe8ed4
authored
Jun 12, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
9ce53a10
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
View3D.js
mods/components/3dviewConvertor/view/View3D.js
+6
-5
dataProcessor.js
mods/components/3dviewConvertor/view/dataProcessor.js
+2
-2
marker3DFactory.js
...components/3dviewConvertor/view/points/marker3DFactory.js
+1
-1
No files found.
mods/components/3dviewConvertor/view/View3D.js
View file @
4bbe8ed4
...
...
@@ -22,7 +22,8 @@ import {
tirggerPlanTopic
,
tirggerTransTopic
,
cacheObjsSave
,
flyToSubView
flyToSubView
,
convertMarkerType
}
from
'./dataProcessor'
;
import
{
dealTroubleMarkers
,
...
...
@@ -569,7 +570,7 @@ class View3D extends Component {
treeData
.
forEach
(
t
=>
{
if
(
t
.
isRegion
&&
t
.
children
&&
t
.
children
.
length
>
0
){
this
.
getPointLoop
(
{
markers
},
pointType
,
t
.
children
);
}
else
if
(
t
.
position3d
&&
!
t
.
isRegion
){
}
else
if
(
t
.
position3d
&&
t
.
position3d
.
length
>
0
&&
!
t
.
isRegion
){
t
.
position
=
t
.
position3d
;
t
.
key
=
`
${
t
.
type
}
-
${
t
.
id
}
`
;
t
.
label
=
t
.
name
;
...
...
@@ -1336,10 +1337,10 @@ class View3D extends Component {
changeMarkersData
=
(
position
,
type
,
id
)
=>
{
const
me
=
this
;
const
{
markers
,
selectPoints
}
=
me
.
state
;
const
index
=
markers
[
type
].
findIndex
(
e
=>
e
.
id
===
id
);
const
index
=
markers
[
convertMarkerType
(
type
)].
findIndex
(
e
=>
e
.
id
===
id
&&
e
.
type
===
type
);
if
(
index
>=
0
){
markers
[
type
][
index
].
position
=
position
;
markers
[
type
][
index
].
isEdit
=
true
;
markers
[
convertMarkerType
(
type
)
][
index
].
position
=
position
;
markers
[
convertMarkerType
(
type
)
][
index
].
isEdit
=
true
;
selectPoints
.
position
=
position
;
me
.
setState
({
markers
,
...
...
mods/components/3dviewConvertor/view/dataProcessor.js
View file @
4bbe8ed4
...
...
@@ -400,7 +400,7 @@ export const flyToSubView = (instance,obj,LENS_LEVEL) =>{
//改变marker坐标
export
const
changeMarkerPosition
=
(
instance
,
obj
,
data
)
=>
{
const
{
id
,
type
,
position
}
=
data
;
(
instance
.
markerList
[
convertType
(
type
)]
||
[]).
forEach
(
mc
=>
{
(
instance
.
markerList
[
convert
Marker
Type
(
type
)]
||
[]).
forEach
(
mc
=>
{
const
extData
=
mc
.
getExtData
();
if
(
extData
.
id
===
id
&&
extData
.
type
===
type
)
{
mc
.
baseObjHelper
.
position
=
position
;
...
...
@@ -408,7 +408,7 @@ export const changeMarkerPosition = (instance,obj,data) => {
});
};
const
convert
Type
=
(
type
)
=>
{
export
const
convertMarker
Type
=
(
type
)
=>
{
const
fireEquipmentStr
=
'fireCar,fireEquipment,fireChamber,fireFoamRoom,hydrant,pool'
;
return
fireEquipmentStr
.
indexOf
(
type
)
>
-
1
?
'fireEquipment'
:
type
;
};
mods/components/3dviewConvertor/view/points/marker3DFactory.js
View file @
4bbe8ed4
...
...
@@ -134,7 +134,7 @@ export default function marker3DFactory(WrappedComponent = 'div', options) {
planeOptions
:
{
width
:
20
,
height
:
10
,
position
:
[
0
,
2
0
,
0
],
position
:
[
0
,
1
0
,
0
],
doubleSide
:
true
},
canvasOptions
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment