Browser zoom in doesn't play nicely with dspsplf find

Use this board to ask questions or have discussions with other Genie users.
Post Reply
Larelyn
Profound User
Posts: 30
Joined: Thu Mar 20, 2014 2:31 pm
First Name: Lisa
Last Name: Lawrence
Company Name: The Scoular Company
Contact:

Browser zoom in doesn't play nicely with dspsplf find

Post by Larelyn »

Hi,
We just stumbled across an "unexpected feature" when using the Find function in Display Spooled Files with the hybrid skin. The found string (class=A22) in the display file will shift right and break the columnar layout.
To recreate:
+ use any browser - we tested in Chrome, Firefox, and IE with similar results
+ log into hybrid skin
+ display any spooled file
+ use the Find function to find a string within the file. Finding a string in the middle of a row will give you the best results
+ once found, the string will display with class A22 (bold blue)
+ Zoom in using the browser's zoom control
+ you should see the highlighted field (and any additional fields to the right) will shift to the right, breaking the columnar layout.

Is this fixable? In our shop, we use a copy of the hybrid skin in Chrome with most of our users zoomed in. This feature not mission critical, but I don't really know where I would begin to start fixing it.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Browser zoom in doesn't play nicely with dspsplf find

Post by Scott Klement »

The way Genie works... In the configuration, you are able to specify a "multiplier" for the X,Y coordinates. This is how Genie knows where to start a field, it multiplies this multiplier by the column/row numbers.
7-17-2014 10-50-35 AM.png
7-17-2014 10-50-35 AM.png (9.54 KiB) Viewed 884 times
For example, lets say you have the X multiplier set to 8, and the Y multiplier set to 12. If the system asks Genie to print a field on row 5, column 10, it will figure out the starting coordinates of that field by multiplying the column minus one by the X multiplier ((10-1) x 8 = 72) and the row minus one by the Y multiplier ((5-1) x 12 = 48). And will position the field at top=60px, left=80px.

Remember that web browser displays are not organized into rows & columns... just pixel positions. That's why Genie works the way it does.

Now... how this relates to your problem. When you haven't searched for a string yet, the IBM i DSPSPLF screen outputs the entire row of the spooled file as a single field. So it outputs a field that's 80 or 132 columns wide, starting at column 1. Since it's all a single field, Genie just calculates the left position as 0, since it's column 1... And the rest of the text is spaced by the browser itself, based on the font used. However, when you do a search, IBM i outputs multiple fields for that row so that one of them can be given a different display attribute (allowing the boldness, color change, etc). In this case, Genie is calculating different coordinates for each of the fields.

So, if the columns don't line up anymore, it means that the multiplier you are using doesn't match the font size you are using. The positions end up wrong because when it outputs multiple fields for the highlighted line, they don't line up with the single fields that are above/below the highlighted line, because the X multiplier doesn't match the spacing used by the font.

Try tweaking your X multiplier... set it slightly higher or lower (depending on which way it's off.) that should solve the problem.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests