-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
knockout tracking the 'viewer.selectedEntity' return null #2734
Comments
It should work if you change it to In the future, please use the forum to ask questions and get support. Your questions will be seen by more people and you'll hear from other users who have solved similar problems. We try and only open GitHub issues for confirmed bugs or enhancements. Thanks. |
It's works !! |
Are we sure this isn't a bug? |
I suspect this maybe was unplanned API breakage. |
Yeah, this is an unfortunate side effect of using the knockout-es5 plugin. You have to know the real variable name of the observable to get it back. |
We could fix this by using That being said, longer term I think the knockout subscription approach is a bit obtuse. I'd rather users never have to know that Ed, if you feel strongly about it, I'd be happy to merge a pull that uses |
I'm re-opening this since it was discussed again on the forum. We should consider implementing @mramato's suggestion above. |
Is there any news on the status of this issue? I am facing exactly the same problem: I want to know when var evt = viewer.selectedEntity.definitionChanged;
evt.addEventListener(function (property) {
alert("Definition changed: " + property);
}); Maybe this is this another issue? |
This is fixed in #5043. |
Hello ~
After I update my Cesium from v1.4 to v1.9, the entity selected event tracking function can't working anymore. When I subscribe the tracking function at the Cesium's startup as below :
browser console throw a exception :
Uncaught TypeError: Cannot read property 'subscribe' of null
The text was updated successfully, but these errors were encountered: