Pan Zoom Container

BIJC is pleased to announce its latest module, a Pan Zoom container for Perspective. There have been a number of outstanding examples of Pan Zoom using an XY container but these are very specific and generally require advanced scripting and CSS skills.

BIJC container simplifies this process and allows the XY container to be responsive.

In its simplest deployment, a developed XY container can be placed inside BIJCs Pan Zoom container and it will automatically fit to any screen size. If the developer requires, panning and zooming can be enabled/disabled independently.

Multiple views or components can be placed inside the container and the scale property can be used to change the views path or any other bindable property. Any view or component that is outside of the current viewport is not rendered and therefore the bindings are not evaluated, this is especially important for larger deployments to reduce the load on the server.

You can download the module from here where you can also find the documentation

We have created a video showing a simplistic set of views and how easy it is to use the new container.

YouTube Link

16 Likes

The fit to component feature is very cool.
Great work!

2 Likes

Hi @Chris_Taylor, I downloaded a trial version of this module and installed it in a VM, but when I launch the session, I get the dreaded Component Error - I'm using v8.1.34 or so and I don't see any issues in the logs.

Any thoughts?

EDIT: Some snips of console log:

That's strange, looks like one of our debug defaults is not being read, standby for a fix.

There is a new version due any day now, with improvements for the licencing function and making it more Maker friendly.

2 Likes

Sweet, I'll watch for that! I would like to use this module for Pan/Zoom functionality for a customer - if we can get this resolved, that would be awesome!

FYI, Latest module is released, V1.1.3
Improvements include:
Module defaults to licensed and only displays unlicenced if the licence checks fail, removing the annoying unlicenced display on slower connections
There also a few minor improvements to our debug system.

File it can be downloaded via https://modules.bijc.co.uk/

6 Likes

Hi Chris,

Not sure if this is the right place to comment on this, but I've been using the zoomPanContainer in what you described as the most simplistic way. I have a view that I put in there (using an Embedded View as the only component, the zoomPanContainer is the root container) and this works like a charm. There's an issue I'm running into I can't seem to figure out though.

My buttons inside the Embedded view are clickable. Components that have an OnDoubleClick-script running to navigate to a different page are also working as intended. But the one textbox I have just doesn't seem to be focussable. I've checked if there are other layers in the way and I've checked if the textbox is set-up correctly, that's when noticed that opening the (embedded) view directly at the source in designer and use the live-view functionality, everything works. Opening that same view in the zoomPanContainer, that's when it starts breaking.

To me this appears to be a bug in the module, but I'm happy to be proven wrong!

Kind Regards,

Morning

We can take a look

It would help if you could email an export of your view to module.support@bijc.co.uk

2 Likes

Latest version released. V1.1.4

Documents and download Zoom Pan Container - BIJC Module Support

new feature
alwaysDrawAllChildren Whether to draw children component even when they are not visible

bug fix, click to focus on text boxes corrected.

5 Likes

Hey @Chris_Taylor, is there any way to limit panning to a specific axis? We're looking at using your module to give operators access to P&IDs on mobile devices and this module seems perfect. However I'd like to (possibly) disable zoom and only allow panning horizontally to keep the interface simpler to navigate around in.

Also, is it possible to provide panning bounds, as I noticed that I can pan well beyond the bounds of the display and can get lost in the abyss.

I've tried to write to the props.currentState.posX prop but it seems this is read-only. I just saw the doco has methods available, my bad! setPosition with the onPositionChanged event provides a kinda solution, but you can still keep trying to pan the page beyond the bounds and every few hundred-ish ms you can bring it back to the bounded value. It'd be nice if you could hard-limit the bounds

A few bugs found:

  • when using setPosition the currentState props aren't updated
  • props.minScale isn't honoured when config.fitOnMount is true - it initially loads much smaller than the min (in my testing). Once you use the mouse to zoom in it jumps to the minScale setting
  • I've found a bug where panning sometimes clips the right side of the embedded content, and sometimes clips the entire content and you don't seem to be able to get it back, see video. It could be the settings I've applied? I've attached the view json defintion below as well in case. I can only seem to get it to do this if it's set to fitToMount: true
View Definition
{
  "custom": {},
  "params": {},
  "props": {},
  "root": {
    "children": [
      {
        "meta": {
          "name": "Label"
        },
        "propConfig": {
          "props.text": {
            "binding": {
              "config": {
                "expression": "{../root.props.currentState}"
              },
              "type": "expr"
            }
          }
        },
        "props": {
          "style": {
            "fontSize": "16pt"
          }
        },
        "type": "ia.display.label"
      },
      {
        "children": [
          {
            "meta": {
              "name": "Operational Digram"
            },
            "position": {
              "height": 960,
              "width": 1920
            },
            "props": {
              "path": "Pages/Station A/Operational Digram"
            },
            "type": "ia.display.view"
          }
        ],
        "events": {
          "component": {
            "onDoubleTap": {
              "config": {
                "script": "\tself.setPosition(0,0)"
              },
              "scope": "G",
              "type": "script"
            },
            "onPositionChanged": {
              "config": {
                "script": "#\txLimit \u003d -500\n#\tx \u003d None\n#\t\n#\tif event.newX \u003c xLimit:\n#\t\tx \u003d xLimit\n#\t\n#\tif event.newY !\u003d 0:\n#\t\ty \u003d 0\n#\t\tx \u003d x or event.newX\n#\t\n#\tif x:\n#\t\tself.setPosition(x,y)"
              },
              "scope": "G",
              "type": "script"
            }
          }
        },
        "meta": {
          "name": "root",
          "tooltip": {
            "enabled": true,
            "text": null
          }
        },
        "position": {
          "grow": 1
        },
        "props": {
          "config": {
            "fitOnMount": true,
            "fitOnMountInstantly": true
          },
          "currentState": {
            "posX": 375,
            "posY": -111.2734375,
            "scale": 0.777453125
          },
          "dimensions": {
            "innerHeight": 960,
            "innerWidth": 1920
          },
          "minScale": 0.5
        },
        "type": "bijc.container.zoompan"
      }
    ],
    "meta": {
      "name": "root"
    },
    "props": {
      "direction": "column"
    },
    "type": "ia.container.flex"
  }
}

I don't really understand what the props.dimensions is for. It seems to be able to clip the components within the pan/zoom container, but I don't quite understand why this wouldn't always be set to the size of the components

1 Like

Hi Nick

I like the idea of pan only in one axis. let us take a look and see what we find.

2 Likes

Hello, developer of the module here.

  1. Locking panning to an axis is something that can be added.
  2. Adding bounds to the panning is something I can look into.
  3. The bugs have been added to my task list and I'll work on those when making the above changes. Thank you for pointing them out
  4. The dimensions are the size in pixels of the inner container that holds all of the components that is scaled and moved inside the outer container. Functionally it is basically an XY container without overflow so any components falling outside of it will be clipped.

I cannot be sure on any timelines for this but I should be able to roll out something within the next few weeks.

9 Likes

Testing this on an actual mobile device now and have some other questions:

  • is it possible to add intertia to panning? It feels a bit clunky at the moment as panning just stops immediately after swiping
  • panning also feels a bit jittery on the phone like the FPS is lower than on desktop
1 Like

We are pleased to announce that the 8.3 version is released today.

Transform your Ignition Perspective applications with the Zoom Pan Container – an advanced XY container that brings intuitive zoom and pan capabilities to your HMI interfaces. Perfect for complex process visualizations, facility layouts, and detailed schematics, this module allows operators to seamlessly navigate large-scale views with mouse, scroll wheel, or touch gestures. Configure automatic fitting to key areas, define custom zoom zones for rapid navigation, and provide your users with the smooth, responsive interaction they expect from modern applications. Whether you're displaying sprawling manufacturing lines, multi-floor building systems, or intricate P&IDs, the Zoom Pan Container delivers the flexibility and polish that makes complex data accessible and actionable.

There are some new features like fitZone and zoneToFit

Details here https://modules.bijc.co.uk/?page_id=421

If you already have a licence for our 8.1 version and want to upgrade, email us with the licence details and we will add 8.3 to it FOC.

7 Likes

I am experiencing a bug with the 8.3 version, it appears that no matter what I do, I cannot get the toolbox to show, even with the “alwaysShow” property checked.

During the development of the 8.3 module we began work on a new toolbox feature intended to provide some controls built in to the component itself for step zooming, resetting to initial position and toggling pan/zoom. While this is still in progress and not yet available the associated properties were inadvertently left exposed in the designer interface in this release.

The properties are currently non-functional as the underlying component does not yet act on them. We acknowledge this oversight and are working to get this feature implemented in full in a future update.

In the meantime, we recommend disregarding these properties as they are subject to change as the feature is worked on. They can be hidden from the tree in the designer by adding a property named showToolbox to the props and setting it to false.

1 Like

Understood, thank you for the clarification. Wasn’t sure if i was doing something wrong.

I noticed something interesting while using this with the safari browser. Through my brief research it appears Safari renders differently than a browser like Chrome (blink) and under medium-high zoom conditions, the Safari renderings of Labels, svgs, etc look extremely blurry, whereas Chrome stays sharp. I’ve provided screenshots for reference. I was wondering if this is something I, as a user can fix (CSS?) or is this something else entirely?

Justin

We are looking into this but it does seem to be a known Safari challenge.

We are looking to change the module to using Tramsform:Matrix() which should improve things but unsure of a roll out date for this.