# Trick to cluttering in Perspective

**URL:** <https://forum.inductiveautomation.com/t/trick-to-cluttering-in-perspective/35271>\
**Category:** Ignition\
**Created:** [June 2, 2020, 9:05pm UTC](https://forum.inductiveautomation.com/t/trick-to-cluttering-in-perspective/35271 "2020-06-02T21:05:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [June 2, 2020, 9:05pm UTC](https://forum.inductiveautomation.com/t/trick-to-cluttering-in-perspective/35271/1 "2020-06-02T21:05:21Z")

</div>

Hi,  
I’d like to share a trick to implement some sort of simple cluttering effect in Perspective.

 ![cluttering](https://us1.discourse-cdn.com/inductiveautomation/original/2X/d/d0959248bd67ce1e048b5f91bae33d4d1c134a9c.gif)

As it shown in above the root container of your view should has a zoom property under style.  
The value of this property can be adjust by a slider from 1(100%) to 0.6(60%). This cause every things only in this view zoom in/out.(Not whole page like browser zoom)  
As we know the current user zoom level now, we can simply use it as condition of visibility of any object in the view.

```auto
if({parent.props.style.zoom}>0.9,True,False)

```

You can put your zoom slider in dock view so the size of your slider size doesn’t change while you change view zoom level.  
This is very useful in large overview diagram or SLD diagram that has a lot of details and can not be fit in your view at 100% zoom.  
At startup script I set the zoom level to something like 0.6, so all of my objects seen in the view and user can zoom in to see additional details.

I hope in near future IA add a special container to support this like map component.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [June 4, 2020, 1:53am UTC](https://forum.inductiveautomation.com/t/trick-to-cluttering-in-perspective/35271/2 "2020-06-04T01:53:41Z")

</div>

Any idea on how to get user browser level zoom into perspective? For example an event.

---

<div class="post-metadata">

**Author:** ![silverbacknet](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/silverbacknet/32/7385_2.png) [@silverbacknet](https://forum.inductiveautomation.com/u/silverbacknet)\
**Post date:** [June 9, 2020, 4:17pm UTC](https://forum.inductiveautomation.com/t/trick-to-cluttering-in-perspective/35271/3 "2020-06-09T16:17:12Z")

</div>

Getting the zoom level is not possible in a desktop browser. It’s an incredibly frustrating thing that web designers regularly beat their heads over.

You can get it in mobile with window.visualViewport.scale, across all major mobile browsers, and VisualViewport.onResize() as the event. No one seems to care about making it work on desktop.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 9, 2020, 4:34pm UTC](https://forum.inductiveautomation.com/t/trick-to-cluttering-in-perspective/35271/4 "2020-06-09T16:34:12Z")

</div>

> [@silverbacknet](#):
>
> It’s an incredibly frustrating thing that web designers regularly beat their heads over.

That's because it is intended _explicitly_ to disregard what the web developer _thinks_ the user wants. Accessibility technology absolutely needs it to work this way. Any time you, the web developer, thinks stuff should appear and disappear with zoom, you are [expletive]ing everyone using screen readers or other eyesight assistive technologies. Provide alternate means to perform that kind zoom-based decluttering--don't use the native browser zoom.

Here in the U.S., you can get your employer/client in big trouble with the Americans with Disabilities Act. IANAL, yada yada.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [June 9, 2020, 8:12pm UTC](https://forum.inductiveautomation.com/t/trick-to-cluttering-in-perspective/35271/5 "2020-06-09T20:12:14Z")

</div>

So you should think of creating module something like map component.  
Is it technically possible and easy to create a container with zoom capability?  
I think map component use the same method for this.
