# How to intercept on-click on entities (and remove green square) ?

**URL:** <https://community.cesium.com/t/how-to-intercept-on-click-on-entities-and-remove-green-square/8694>\
**Category:** CesiumJS\
**Created:** [September 19, 2019, 6:39pm UTC](https://community.cesium.com/t/how-to-intercept-on-click-on-entities-and-remove-green-square/8694 "2019-09-19T18:39:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniele\_Suppo](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/daniele_suppo/32/2143_2.png) [@Daniele\_Suppo](https://community.cesium.com/u/Daniele_Suppo)\
**Post date:** [September 19, 2019, 6:39pm UTC](https://community.cesium.com/t/how-to-intercept-on-click-on-entities-and-remove-green-square/8694/1 "2019-09-19T18:39:36Z")

</div>

**1. A concise explanation of the problem you’re experiencing.**

When I click on labels, or billboards, Cesium show a green square on the center of the entity.

1. How can I remove it?

2. How can I intercept the on-click event?

**2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.**

**3. Context. Why do you need to do this? We might know a better way to accomplish your goal.**

**4. The Cesium version you’re using, your operating system and browser.**

1.61

---

<div class="post-metadata">

**Author:** ![ZhefengJin](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/zhefengjin/32/11504_2.png) [@ZhefengJin](https://community.cesium.com/u/ZhefengJin)\
**Post date:** [March 3, 2021, 1:50am UTC](https://community.cesium.com/t/how-to-intercept-on-click-on-entities-and-remove-green-square/8694/2 "2021-03-03T01:50:12Z")

</div>

Try this.

viewer.selectedEntityChanged.addEventListener(function(newEntity) {  
console.log(newEntity);

```
viewer.selectedEntity = undefined;  

// to do your custom logic

```

});
