Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] VcPrimitiveGround组件加载的图层无法被VcCollectionPrimitive管理到 #350

Closed
ShenWeiQun opened this issue Feb 14, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@ShenWeiQun
Copy link

VueCesium version

3.1.3

OS/Browsers version

Google Chrome 110.0.5481.78

Vue version

3.2.47

Cesium version

1.102.0

Reproduction Link

https://codepen.io/shenweiqun/pen/wvEvzrK

Steps to reproduce

vc-collection-primitive :show="false" @click="onClick"
在示例页面上给组件vc-collection-primitive增加属性不会生效
例如
属性 :show="false"
时间 @click="onClick"

What is Expected?

属性设置正常
操作设置正常

What is actually happening?

属性设置异常
操作设置异常

@ShenWeiQun
Copy link
Author

When the component VcCollectionPrimitive of a component is VcPrimitiveGround, Unable to manage child components
In file packages\composables\use-primitives\index.ts,I found

const primitives = vcInstance.cesiumClass.includes('Ground') ? commonState.$services.groundPrimitives : commonState.$services.primitives

I think it's affecting you here

@zouyaoji
Copy link
Owner

我测试了,确实改成
const primitives = commonState.$services.primitives

就能管理到,想请教一下你清楚
viewer.scene.groundPrimitives 和 viewe.scene.primitives 有啥区别不。

我之前就简单的把带‘ground’的放到groundPrimitives 中了。

@ShenWeiQun
Copy link
Author

搜索了一下没找到直接的解释
根据issues
CesiumGS/cesium#6316
CesiumGS/cesium#2960
推测,增加groundPrimitives的目的是为了贴地的primitive排序方便
根据issues
CesiumGS/cesium#7639
推测,在未来的计划中该属性可能会被移除

@ShenWeiQun
Copy link
Author

不论原始目的如何,如果组件VcPrimitiveGroundVcCollectionPrimitive的子组件,状态应该能被父组件管理到

@zouyaoji zouyaoji added the bug Something isn't working label Feb 15, 2023
@zouyaoji zouyaoji self-assigned this Feb 15, 2023
@zouyaoji
Copy link
Owner

嗯,下个版本改一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants