"Book like" view in Openseadragon (several "2 pages" sequences) - openseadragon

Openseadragon newbbie here !
I'm trying to display images by group of 2 AND keeping sequence mode activated, so I can "turn pages".
I managed to display 2 pages, I managed to read pages 1 by 1 in sequence mode, ...
But I just didn't find a way to do both.
To display 2 pages, I loaded 2 tiles sets and configured "sequenceMode=false". Then I set coordinates, to display visuals aside.
To read pages 1 by 1, I loaded several tiles and configured "sequenceMode = true".
What I would like to do is display two visuals (= tiles sets) aside (like an open book). And then, on "next" button click, display the two next visuals from my "tilesSources" array... and so on !
Thank you for your help !

I recommend keeping sequence mode off, like you did for the two pages, and lay out the entire sequence (in pairs) that way. You should then create your own next/previous buttons and use viewer.viewport.fitBounds to animate the viewer to each pair as needed.
Here's an example of a system that does something like that (plus a lot more):
https://iangilman.com/osd/test/demo/m2/
Press the "book" button at the top to see the "two-page" mode. The code for this is here:
https://github.com/openseadragon/openseadragon/tree/master/test/demo/m2
Of course you don't need all of that code, but hopefully it can be a helpful reference.

Related

CLS over 1 possible?

In our PSI data we are seeing some pages with outrageous CLS numbers which we cannot reproduce or make sense of. In fact, here is an example of one page that has 2.52, but I did not even think it was possible to get over a score of 1.0, which would be a complete shift of everything on the screen, am I right? And is there some problem with the data/chrome, because this is not an isolated incident...our site pages suddenly started suffering terrible CLS data about a month ago and we are bewildered, in Core Web Vitals area of GSC.
Look in the Field Data at the CLS...2.52, but the lab data is .044. PSI Link
Why the difference between lab data and field data?
CLS in the lab tests (synthetic tests) is purely for initial page load and above the fold.
CLS in the field data (real world) is measured from the second the first (well technically second) paint event right until page unload.
So if there are layout shifts happen as someone scrolls the page those keep adding to your CLS.
How can I have a CLS greater than 1?
Imagine you scroll the page and the scroll bar suddenly appears, that would shift the whole page. Now CLS is based on the percentage of the page that moves. So if the whole page shifted to the left by 10px you would get a Layout Shift of almost 1 (think of 1 as 100% of the visible page, 0.5 would be 50% of the visible page moved etc.).
Let's assume that as you scroll the page further the scroll bar suddenly disappears, the whole page now shifts to the right by 10px. This would result in an additional Layout Shift of almost 1.
Now you have had two Layout Shifts of almost 1 - your Cumulative Layout Shift would be almost 2.
I have simplified how layout shift is calculated but I think the principle is easier to understand with the above example.
Real User Metrics (RUM) are the way to capture these sorts of issues.
As for CLS data suddenly changing, I would recommend using something like the web vitals library to pipe the data to either a custom backend or to your analytics so you can see if this is a specific device, screen size etc. causing it.
Spotting Issues with Developer Tools
To see layout shift regions, go to Developer Tools - > Rendering -> Check "Layout Shift Regions" and then load the page a few times, resize it etc.
The only thing I could see is that your mobile menu has some very strange layout shift regions that are particularly bad at large screen sizes. Other than that there is a massive shift when the page loads but that shouldn't take it over 1.
I know the problem is on desktop but I can't remember if they put tablet data in the desktop or the mobile field data...if it is desktop then you may have your answer!

Show cascaded panel (Find and Console) : Sublime 3

Sublime displays one panel at a time. Is there a way to cascade the panels on top of each other. For example when displaying the console, if I do super+f, the find panel should also display along with the console panel.
This is not possible; Sublime only wants to display a single panel at time and so the command that opens a panel implicitly closes any panel that might already be open first (at least logically).
This is part of the original design philosophy. As seen in the excerpt below, a desire to maximize space as much as possible is also one of the reasons why the find panel (for example) is a panel and not a Dialog or something else that would take up unnecessary space.
Unobtrusive, minimal chrome. The focus should be on the text, not fourteen different toolbars.
Don't obscure the text with dialogs.
Use the pixels you've got. Full screen, multi monitor and editing files side by side should all be possible.

ST3: Find text results in panel instead of a buffer

I must have hit a setting in ST3 and caused my program to display results in a panel instead of in a buffer. How do I get it back so that find-text results go into their own tab? I've done some digging around but I can't find what I did.
In the Find in Files panel, there is a series of buttons to the left of the Find field, and the right most one of those is the one that controls whether the find results show up in a panel or in a buffer.
Note that the button may look different in your version as it appears that you're using a different theme (the image below shows the default theme). You can verify that you have the correct button based on the tool tip text.

Cadence Virtuoso Layout L phantom objects

I have a cell (call it A) which is used once in a hierarchically higher cell (call it P). When I place A in P, its borders are rather larger than the actual content of A. When I descend to A and zoom-fit, it is way zoomed out, indicating there is something present way out on the edges.
I may have dragged objects there at one point but currently there is nothing visible. It is driving me crazy in terms of aligning objects, etc.
Is there any way to clean this up or something?
If I recall Cadence used to have a problem with leaving steiners behind when you moved routes. They are not visible but the db treats them as real objects for the bbox calculation. According to Cadence, deleting the objects should not harm anything. Open the layout in edit mode and paste this code into the CIW. This will delete all the steiner objects in your layout. If this was the root cause after saving you should see the bbox return to normal.
cv=geGetEditCellView()
foreach( item cv~>steiners
dbDeleteObject( item )
)
This thread may be considered "dead," but hopefully this helps.
It is possible the layers that are not visible are turned off.
To turn them on, go to the layers pane on the left. (If it is not there you can turn it on by going to Window —> Assistants —> Layers)
You can then click the drop down arrow in the top right corner and click Edit Valid Layers.
Then, click all valid in the Set Valid Layers popup. Click Ok.
Finally, check the Used Layers Only checkbox in the Layers pane. Look for any layers that weren't there before that you don't need.
Usually it happens when you draw the cell in LayoutXL, particularly when you insert pins.
Layer and purpose in these pins are selected separately for some reason, that is why it is easy to enter "impossible" combination.
Nothing happens, then you do it again and continue drawing. But there are several invisible squares that will continuously frustrate your inner perfectionist. You do the following:
Open this cell's layout, switch to Virtuoso window and enter:
lppList=list()
then:
foreach(shape hiGetCurrentWindow()~>cellView~>shapes if( (member(shape~>lpp lppList)==nil) then lppList=cons(shape~>lpp lppList)))
You have created the list with all layers in this layout, you can view it by entering:
lppList
You'll get something like this:
(("NW" "drawing")
("NP" "drawing")
("weird" "guy")
("M1" "pin")
("M3" "pin")
)
If you find a weird guy in this company, just enter the following command:
foreach(shape hiGetCurrentWindow()~>cellView~>shapes if((shape~>lpp == list("weird" "guy")) shape~>lpp = list("prBoundary" "drawing")))
If you see that some squares, labels (or whatever unseen before) appears as prBoundary, just delete it, save, and your layout will be small and shiny again.

Dividing screen in android like frames in html

I am making an android application.
There i want a common navigation menu on every activity like frames in html.
I want the menu at the left (say 20%) area and other navigation screens on the right (say 80% area)
please help me out.
You should use two fragments, that way you keep the menu in one fragment and only change the activity in the other, I should not be difficult to find an example on internet since it is very common in tablets.
http://developer.android.com/guide/components/fragments.html

Resources