Pinching in an Embedded Module

Find and share HowTos to various installations / configurations!
Search

Post Reply
9 posts • Page 1 of 1
marcvelarodino
Posts: 16
Joined: Wed Nov 09, 2011 4:36 pm

Pinching in an Embedded Module

Post by marcvelarodino »

Hi Everyone,

I have a panel (I will call main) with an embedded module inside, where I open panels larger in size than the embedded module.
What I want is to pinch (zoom in/out with two fingers) the panels inside the embedded module, but the only I get is zoom in/out the main panel.

I am missing something but I don't know what. ¿Could you help me please?

I am working in Windows 10 with version 3.15 P007

Thanks a lot!

Marc

User avatar
leoknipp
Posts: 2926
Joined: Tue Aug 24, 2010 7:28 pm

Re: Pinching in an Embedded Module

Post by leoknipp »

I tested it with an embedded module but the described behaviour did not occur.
Only the panel inside the embedded module was zoomed.

The test was made with the Mobile-UI running at an iPad.
On which device did you start the UI?

Best Regards
Leopold Knipp
Senior Support Specialist

marcvelarodino
Posts: 16
Joined: Wed Nov 09, 2011 4:36 pm

Re: Pinching in an Embedded Module

Post by marcvelarodino »

The device is a laptop with touchscreen (Dell inspiron 13) and Windows 10.

User avatar
leoknipp
Posts: 2926
Joined: Tue Aug 24, 2010 7:28 pm

Re: Pinching in an Embedded Module

Post by leoknipp »

I have tested it on a touch screen monitor.
During the test we have seen that sometimes "zoom to pinch" is made for the outside modules and not only for the embedded one.
The problem was reported to our development department with low priority.

If the panel which has the embedded module is loaded in another embedded module, e.g. as panel in the main area when using one of the panel topology templates, it is working correctly.

Best Regards
Leopold Knipp
Senior Support Specialist

marcvelarodino
Posts: 16
Joined: Wed Nov 09, 2011 4:36 pm

Re: Pinching in an Embedded Module

Post by marcvelarodino »

I have more information on this topic.

If I try to pinch in the embedded module slowly (I mean the normal way) the zoom is applied to the main panel.
If I perform a quick and short pinch, then the zoom is only applied to the embedde module.

On the other hand, I found that if I configure the two finger panel navigation (panelGridMode), then the other gestures (zoom and panning) doesn't work at all.

¿Is it the expected behaviour?

Marc

Nuno
Posts: 8
Joined: Wed Oct 19, 2016 3:13 pm

Re: Pinching in an Embedded Module

Post by Nuno »

Hi guys,

It's possible to stop the base panels from zoom in & out when pinching by setting the "size", "Maximum Size" & "Minimum Size" all to the same x and y values. Apply this rule to the all static Embedded Modules.
At least this is working for me with a SIMATIC IPC277E multi touch.

My problems start when trying to limit the zoom factor applied when pinching!!!
The help files describe how to use the mouse wheel to change the zoom factor. This method can be easily adjusted to limit the zoom factor.
But I couldn't find any information about how to limit the zoom factor when pinching?

Thank you
Nuno

User avatar
mkoller
Posts: 741
Joined: Fri Sep 17, 2010 9:03 am

Re: Pinching in an Embedded Module

Post by mkoller »

set the module to not zoomable via setScaleStyle(SCALE_NONE)

Nuno
Posts: 8
Joined: Wed Oct 19, 2016 3:13 pm

Re: Pinching in an Embedded Module

Post by Nuno »

Hi Martin,

Thanks for your reply. Let me explain in more detail my issue.

I have set my global zoom factor limits in the config file:
minZoomFactor = 0.5
maxZoomFactor = 5
These limits are OK to the majority of my panels. But I have one specific panel where I need to limit my zoom factor window to interval [0.5, 2].

When using the mouse wheel to apply zoom I can easily achieve this using the following code in Wheel event script:
main(mapping event){
float minFactor, maxFactor, f;
getZoomRange(minFactor, maxFactor);

getZoomFactor(f);
float factor = (event.angleDelta.y / 120.0) * 1.1;

if ( factor > 0.0 ){
if (f< 2) panelZoomIn(myModuleName(), factor, event.localPos);
}
else{
if (f> 0.5) panelZoomOut(myModuleName(), -factor, event.localPos);
}
}

Is there a method to achieve similar results with pinching?

Thank you
Nuno

User avatar
mkoller
Posts: 741
Joined: Fri Sep 17, 2010 9:03 am

Re: Pinching in an Embedded Module

Post by mkoller »

I see. Sorry to say, but you can not set the limits via script.
I put this on our feature wish list

Post Reply
9 posts • Page 1 of 1