Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-convertor-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-convertor-view
Commits
d7043e7c
Commit
d7043e7c
authored
Apr 10, 2020
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.代码提交错误
parent
479eddb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
94 deletions
+0
-94
StageActuator.js
src/view/planMgmt/view/pubview/StageActuator.js
+0
-94
No files found.
src/view/planMgmt/view/pubview/StageActuator.js
View file @
d7043e7c
...
...
@@ -257,32 +257,6 @@ class StageActuator extends Component {
// if (evt.object && evt.object._boh){
// evt.object._boh.style.color = 0xff00ff;
// }
=======
//单击
this
.
r3d
.
on
(
'click'
,
(
evt
)
=>
{
console
.
log
(
'click'
);
if
(
evt
.
object
&&
evt
.
object
.
type
===
'Mesh'
)
{
const
realObj
=
evt
.
object
.
parent
;
const
userData
=
realObj
.
userData
;
if
(
userData
&&
userData
.
dataConfig
&&
userData
.
dataConfig
.
dataDetailUrl
){
fetch
(
userData
.
dataConfig
.
dataDetailUrl
)
.
then
(
response
=>
response
.
json
())
.
then
(
data
=>
this
.
setState
({
modelModal
:
true
,
detailData
:
data
.
dataList
}));
}
if
(
userData
.
bubbleConfig
&&
userData
.
bubbleConfig
.
displayMode
==
'click'
){
//该模型之前顶牌展示状态
userData
.
clickShow
=
userData
.
clickShow
==
undefined
?
true
:
!
userData
.
clickShow
;
if
(
userData
.
clickShow
){
//判断之前是否显示
this
.
state
.
objs
.
find
(
e
=>
e
.
uuid
==
realObj
.
uuid
).
baseObjHelper
.
title
=
userData
.
displayName
||
null
;
}
else
{
this
.
state
.
objs
.
find
(
e
=>
e
.
uuid
==
realObj
.
uuid
).
baseObjHelper
.
title
=
null
;
}
}
}
>>>>>>>
8
fb9a8945dbc9b22583d592d76bcad99c63fb840
});
// 鼠标移出
this
.
r3d
.
on
(
EVENT_TYPE_CORE
.
MouseLeave
,
evt
=>
{
...
...
@@ -291,7 +265,6 @@ class StageActuator extends Component {
// evt.object._boh.style.color = null;
// }
});
<<<<<<<
HEAD
//单击
this
.
r3d
.
on
(
EVENT_TYPE_CORE
.
Click
,
(
evt
)
=>
{
if
(
evt
.
button
===
0
&&
evt
.
object
&&
evt
.
object
.
type
===
'Mesh'
)
{
...
...
@@ -305,54 +278,20 @@ class StageActuator extends Component {
console
.
error
(
userData
.
dataConfig
.
dataDetailUrl
+
'请求元素详情失败'
);
}
);
=======
// 鼠标移入事件
this
.
r3d
.
on
(
'mouseover'
,
(
evt
)
=>
{
if
(
evt
.
object
&&
evt
.
object
.
type
===
'Mesh'
)
{
const
realObj
=
evt
.
object
.
parent
;
const
userData
=
realObj
.
userData
;
//清除其他
this
.
state
.
objs
.
forEach
(
o
=>
{
if
(
o
.
userData
.
bubbleConfig
&&
o
.
userData
.
bubbleConfig
.
displayMode
==
'hover'
){
o
.
baseObjHelper
.
title
=
null
;
}
});
if
(
userData
.
bubbleConfig
&&
userData
.
bubbleConfig
.
displayMode
==
'hover'
){
this
.
state
.
objs
.
find
(
e
=>
e
.
uuid
==
realObj
.
uuid
).
baseObjHelper
.
title
=
userData
.
displayName
||
null
;
}
}
});
// 鼠标移出事件
this
.
r3d
.
on
(
'mouseout'
,
(
evt
)
=>
{
// console.log('mouseout');
if
(
evt
.
object
&&
evt
.
object
.
type
===
'Mesh'
)
{
const
realObj
=
evt
.
object
.
parent
;
const
userData
=
realObj
.
userData
;
if
(
userData
.
bubbleConfig
&&
userData
.
bubbleConfig
.
displayMode
==
'hover'
){
this
.
state
.
objs
.
find
(
e
=>
e
.
uuid
==
realObj
.
uuid
).
baseObjHelper
.
title
=
null
;
>>>>>>>
8
fb9a8945dbc9b22583d592d76bcad99c63fb840
}
}
});
};
<<<<<<<
HEAD
onComplete
=
obj
=>
{
const
boh
=
new
BaseObjHelper
({
obj
});
obj
.
_boh
=
boh
;
};
=======
>>>>>>>
8
fb9a8945dbc9b22583d592d76bcad99c63fb840
afterRender
=
()
=>
{
}
handleModelParserData
=
(
parser
,
fmtData
)
=>
{
<<<<<<<
HEAD
// 将 fmtData 绑定到 parser 的 node.userData 上
// Object.assign(parser.obj.userData, fmtData)
parser
.
bindUserData
(
fmtData
);
...
...
@@ -380,39 +319,6 @@ class StageActuator extends Component {
image
:
imageUrl
};
parser
.
objHelper
.
title
=
displayName
;
=======
// 将 eid 绑定到 parser 的 node 上
// Object.assign(parser.obj.userData, { eid: fmtData.eid, displayName: fmtData.displayName })
// or
parser
.
bindUserData
(
deepCopy
(
fmtData
));
//为模型添加顶牌属性
let
obj
=
parser
.
obj
;
const
boh
=
new
BaseObjHelper
({
obj
});
obj
.
baseObjHelper
=
boh
;
obj
.
baseObjHelper
.
titleConfig
=
{
// 顶牌平面参数
planeOptions
:
{
...
obj
.
userData
.
displayName
,
width
:
256
*
0.1
,
height
:
128
*
0.1
,
position
:{
x
:
0
,
y
:
30
,
z
:
0
},
},
canvasOptions
:
{
fillStyle
:
'rgb(51, 51, 51)'
,
font
:
'32px sans-serif'
,
textBaseline
:
'middle'
,
},
imgWidth
:
256
,
imgHeight
:
128
,
// 设置顶牌 图片路径
image
:
`/src/assets/planMgmt/center.png`
};
if
(
obj
.
userData
.
displayName
&&
obj
.
userData
.
bubbleConfig
&&
obj
.
userData
.
bubbleConfig
.
displayMode
==
'show'
){
obj
.
baseObjHelper
.
title
=
obj
.
userData
.
displayName
;
}
else
{
obj
.
baseObjHelper
.
title
=
null
;
>>>>>>>
8
fb9a8945dbc9b22583d592d76bcad99c63fb840
}
this
.
objs
.
push
(
parser
.
obj
);
}
...
...
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