# Resolution issue affecting coordinates of object

**URL:** <https://forum.inductiveautomation.com/t/resolution-issue-affecting-coordinates-of-object/41012>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [November 27, 2020, 1:24pm UTC](https://forum.inductiveautomation.com/t/resolution-issue-affecting-coordinates-of-object/41012 "2020-11-27T13:24:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexm](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@alexm](https://forum.inductiveautomation.com/u/alexm)\
**Post date:** [November 27, 2020, 1:24pm UTC](https://forum.inductiveautomation.com/t/resolution-issue-affecting-coordinates-of-object/41012/1 "2020-11-27T13:24:31Z")

</div>

Hi,

I am currently facing an issue on a Scada ignition project that is being displayed in both PC and HMI screens of different resolution.

I have a toggle button that is displaying a pop up in the middle of a view when it is pressed. The current issue I’m facing is the fact that the different resolution between the two screens is causing the pop up to be displayed in different coordinates of the view.

My question is is there a way, possibly a script, to bind on that button so the button detects the screen resolution of each screen so it can locate the pop ups coordinates accordingly so the pop up displays in the middle of the screen despites resolution? or is there a different way to implement this?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [November 27, 2020, 1:33pm UTC](https://forum.inductiveautomation.com/t/resolution-issue-affecting-coordinates-of-object/41012/2 "2020-11-27T13:33:37Z")

</div>

I think you should be able to accomplish this by specifying **Relative** coordinates instead of **Exact**

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/2/42017e14eabb7cc5beff97d1df57ab002cb9a058.png)

---

<div class="post-metadata">

**Author:** ![alexm](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@alexm](https://forum.inductiveautomation.com/u/alexm)\
**Post date:** [November 27, 2020, 2:00pm UTC](https://forum.inductiveautomation.com/t/resolution-issue-affecting-coordinates-of-object/41012/3 "2020-11-27T14:00:25Z")

</div>

Thank you for the reply. This feature is not available on version 8.0.4 though and upgrading it is not the case unfortunately. Hence I was thinking more towards scripting perhaps? Thanks

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [November 27, 2020, 2:58pm UTC](https://forum.inductiveautomation.com/t/resolution-issue-affecting-coordinates-of-object/41012/4 "2020-11-27T14:58:21Z")

</div>

I don’t think it’s possible to detect the device resolution via Perspective. But in the case you could, what if the browser is not full screen every time or 2 different browsers are used? I think you’d have the same issue with the popup position being different for those cases.

---

<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:** [November 27, 2020, 6:12pm UTC](https://forum.inductiveautomation.com/t/resolution-issue-affecting-coordinates-of-object/41012/5 "2020-11-27T18:12:24Z")

</div>

> [@code\_skin](#):
>
> I don’t think it’s possible to detect the device resolution via Perspective.

There was discussion about trying to make resolution available to scripts and expressions. It may have been introduced fairly recently. Part of the issue is that browsers deliberately make it difficult to get this information, in order to not disturb assistive technology (like zoom features for those with limited vision) and to minimize the privacy-relevant information available to "fingerprinting" techniques.

Modern web design eschews pixel-based sizing and positioning in favor of relative and/or resolution-independent values. It isn't a Perspective thing.

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [November 27, 2020, 6:27pm UTC](https://forum.inductiveautomation.com/t/resolution-issue-affecting-coordinates-of-object/41012/6 "2020-11-27T18:27:28Z")

</div>

> [@pturmel](#):
>
> There was discussion about trying to make resolution available to scripts and expressions.

That would be useful for sure. But would that help solve OP? I think we'd need to know the browsers size, position, coordinates in the cases it wasn't in full screen (resized and not the device resolution).

---

<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:** [November 27, 2020, 6:28pm UTC](https://forum.inductiveautomation.com/t/resolution-issue-affecting-coordinates-of-object/41012/7 "2020-11-27T18:28:50Z")

</div>

> [@code\_skin](#):
>
> But would that help solve OP?

No idea. I don't do pixel positioning. (:

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 28, 2020, 4:12am UTC](https://forum.inductiveautomation.com/t/resolution-issue-affecting-coordinates-of-object/41012/8 "2020-11-28T04:12:48Z")

</div>

> [@pturmel](#):
>
> I don’t do pixel positioning

Surely you set some flex basis values to pixels?
