# onPointerMove action, pen or touch

**URL:** <https://forum.inductiveautomation.com/t/onpointermove-action-pen-or-touch/102422>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 17, 2025, 12:11pm UTC](https://forum.inductiveautomation.com/t/onpointermove-action-pen-or-touch/102422 "2025-02-17T12:11:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SBL](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbl/32/56813_2.png) [@SBL](https://forum.inductiveautomation.com/u/SBL)\
**Post date:** [February 17, 2025, 12:11pm UTC](https://forum.inductiveautomation.com/t/onpointermove-action-pen-or-touch/102422/1 "2025-02-17T12:11:33Z")

</div>

Hello everyone,

I'm working with a pan tool for Perspective views, and using the onPointerMove action along with event.movementX and event.movementY.

This works fine with mouse, but when moving to tablet using touch its not working as smooth anymore. The movement is slower, this I can adjust in my script checking event.pointerType - but it also limits the length of the movement. I have to grab and drag many times to move the same amount of pixels as with the mouse.

Is this a known issue, and is there any workarounds?

Thanks in advance.

---

<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:** [February 17, 2025, 1:26pm UTC](https://forum.inductiveautomation.com/t/onpointermove-action-pen-or-touch/102422/2 "2025-02-17T13:26:35Z")

</div>

> [@SBL](#):
>
> with a pan tool for Perspective views

Is this a 3rd-party module? If so, you may want to ask the author for help.

Otherwise:

> [@SBL](#):
>
> using the onPointerMove action along with event.movementX and event.movementY

This is always going to perform poorly, as every event notification has to make a round trip to the gateway. (Perspective event scripts do not run in the browser.)

---

<div class="post-metadata">

**Author:** ![SBL](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sbl/32/56813_2.png) [@SBL](https://forum.inductiveautomation.com/u/SBL)\
**Post date:** [February 17, 2025, 5:15pm UTC](https://forum.inductiveautomation.com/t/onpointermove-action-pen-or-touch/102422/3 "2025-02-17T17:15:01Z")

</div>

Hi Turmel, thanks for replying.

I'm using Perspective-components only. When grabbing with a mouse pointer I can move back and forth in all directions with no issues. The view follows my movement all the way.

Pressing F12 and entering developer mode and touch type changes it all. When dragging in one direction it stops after a short movement. Also, the speed is affected. if pointerType != "mouse" i'm multiplying the movement to get better response.

I tested on my android phone, and its the same there.
