# How to remove extended mixins from viewer?

**URL:** <https://community.cesium.com/t/how-to-remove-extended-mixins-from-viewer/21084>\
**Category:** CesiumJS\
**Created:** [November 4, 2022, 2:17pm UTC](https://community.cesium.com/t/how-to-remove-extended-mixins-from-viewer/21084 "2022-11-04T14:17:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![basant1431](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/basant1431/32/3476_2.png) [@basant1431](https://community.cesium.com/u/basant1431)\
**Post date:** [November 4, 2022, 2:17pm UTC](https://community.cesium.com/t/how-to-remove-extended-mixins-from-viewer/21084/1 "2022-11-04T14:17:00Z")

</div>

Hi Cesium Team,

I have added some of the mixins in viewer using extend method. I want to remove the mixins from viewer as per some conditions, How can I remove mixins, like we remove entities and primitives ?

Please help me.

Thank you  
Basant Lal

---

<div class="post-metadata">

**Author:** ![mdc9001](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/mdc9001/32/15919_2.png) [@mdc9001](https://community.cesium.com/u/mdc9001)\
**Post date:** [November 7, 2022, 7:50pm UTC](https://community.cesium.com/t/how-to-remove-extended-mixins-from-viewer/21084/2 "2022-11-07T19:50:50Z")

</div>

Are the conditions set before the viewer is created? The easiest way would be to just not add the mixins that you do not need when you create the viewer.

There isn’t a standard way to remove mixins after they have been added. The [ViewerMixin](https://cesium.com/learn/cesiumjs/ref-doc/Viewer.html#.ViewerMixin) is just a function that takes a viewer object and options object. It does not provide any way to disable or remove the functionality later. Depending on what mixins you are using, there might be a way to turn the functionality they provide on or off. But that would depend on the logic of the mix in.

---

<div class="post-metadata">

**Author:** ![basant1431](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/basant1431/32/3476_2.png) [@basant1431](https://community.cesium.com/u/basant1431)\
**Post date:** [November 10, 2022, 1:26pm UTC](https://community.cesium.com/t/how-to-remove-extended-mixins-from-viewer/21084/3 "2022-11-10T13:26:28Z")

</div>

@mdc9001 thank you so much for your valuable reply,  
No, conditions are set after the viewer gets created. Btw I don’t need to remove any of the mixins since i changed the conditions and everything is working as per my expectations.  
Thank you
