Commit 0b1501a4 authored by 李维's avatar 李维

修复单元页没有标题的问题

parent 107e6107
...@@ -14013,7 +14013,7 @@ ...@@ -14013,7 +14013,7 @@
"__id__": 308 "__id__": 308
} }
], ],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 310 "__id__": 310
...@@ -18820,7 +18820,7 @@ ...@@ -18820,7 +18820,7 @@
"__id__": 416 "__id__": 416
} }
], ],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 418 "__id__": 418
......
...@@ -60,8 +60,9 @@ export default class NewClass extends cc.Component { ...@@ -60,8 +60,9 @@ export default class NewClass extends cc.Component {
initScrollEvent() { initScrollEvent() {
const sv = cc.find("middleLayer/Views/UnitPage/unit_list_node/scrollView") const sv = cc.find("middleLayer/Views/UnitPage/unit_list_node/scrollView")
const canvas = cc.find("Canvas"); const canvas = cc.find("Canvas");
sv.off("scrolling")
sv.on("scrolling", (e)=>{ sv.on("scrolling", (e)=>{
this.allListItemNodes.forEach((node, i)=>{ this.allListItemNodes.forEach((node)=>{
const worldPos = node.parent.convertToWorldSpaceAR(cc.v2(node.x, node.y)); const worldPos = node.parent.convertToWorldSpaceAR(cc.v2(node.x, node.y));
if(worldPos.x >= -node.width && worldPos.x <= canvas.width) { if(worldPos.x >= -node.width && worldPos.x <= canvas.width) {
node.opacity = 255 node.opacity = 255
......
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