-
-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with fullscreen feature with Web Component/Shadow DOM #1677
Comments
The 'move' bug happens with |
[I've updated the issue title to better reflect the issue, and I edited the description comment to fix the formatting.] Yes, OpenSeadragon doesn't really support Web Components yet… I imagine there are a few things that need fixing to get it to work in that context. The problem here, with full screen, probably has to do with the fact that for historical reasons, the full-screen mode actually moves things around in the DOM. More discussion here: #1127 and #1050. Perhaps Web Components would be a reason to finally untangle the full-page mode from the full-screen mode. I'm not sure what to do on mobile platforms that don't have full screen; maybe disable full-page entirely for web components on those platforms? Anyway, unfortunately it's probably not a trivial fix. I'm happy to point you in the right direction if you're interested in taking a whack at it, though. |
In fact there are 2 bugs that have to do with Web Components ( that I know ) I could solve the 'Full Screen' by not showing the Button ( How ?) |
What do you mean by "move"? Are you talking about panning (dragging the image around)? That seems to work just fine. Are you referring to some other kind of "move" feature? To disable the fullscreen button, include |
First thanks for showFullPageControl: false
Yes panning is what I wanted to say ( sorry, I didn't know that word )
but the bug ( may be a bug of mine ) occurs when clicking on the image
it is caused by the layout of my <div> container
the page is made of 3 elments stacked verticaly ( openseadragon container
at the bottom )
and I have the property height = '100vh' in that container
at first ( when opening the page : in my case click on Zoomify tab ) I can
see the 3 elements
and the container fills all bottom height
if I click, It takes the full viewport height and hides the 2 top elments
as you can see at
http://prenomsfrancais.free.fr/showcase/s0.html
Zoomify tab
It happens with chrome opera an avast secure webbrowser not netscape
changing the height to '90vh' solves the problem but the behaviour is
strange !
It doesn't' happen on the openlayers tab ( Cartes )
and the fullscreen works in the openlayers tab ( which is in a
Web Component/Shadow DOM too.
Le jeu. 18 juil. 2019 à 23:11, Ian Gilman <notifications@github.com> a
écrit :
… What do you mean by "move"? Are you talking about panning (dragging the
image around)? That seems to work just fine. Are you referring to some
other kind of "move" feature?
To disable the fullscreen button, include showFullPageControl: false in
the options when you create your viewer.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1677?email_source=notifications&email_token=ALGAL4VW3WWOXR3UPTTLFJ3QADL67A5CNFSM4IENFKGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2JZP5A#issuecomment-512989172>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALGAL4TPUOC736EODTDGS5DQADL67ANCNFSM4IENFKGA>
.
|
Oh, I see! I was testing on Mac Firefox, which doesn't have that problem. Mac Chrome does have it, though. It's very odd. My suggestion would be to try to isolate the conditions further. Clearly there's some browser specific weirdness happening. One thing you might try is turning off OpenSeadragon mouse handling entirely:
...And see if it still happens. |
viewer.setMouseNavEnabled(false);
It works, but it hides the buttons ( takes about 1 second to hide )
and theres is no zoom
I'v activated it on
http://prenomsfrancais.free.fr/showcase/s0.html
Zoomify tab (Image and Collection ) from the ComboBox
Le ven. 19 juil. 2019 à 20:50, Ian Gilman <notifications@github.com> a
écrit :
… Oh, I see! I was testing on Mac Firefox, which doesn't have that problem.
Mac Chrome does have it, though. It's very odd. My suggestion would be to
try to isolate the conditions further. Clearly there's some browser
specific weirdness happening.
One thing you might try is turning off OpenSeadragon mouse handling
entirely:
viewer.setMouseNavEnabled(false);
...And see if it still happens.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1677?email_source=notifications&email_token=ALGAL4WDRRONMX55GO5PFSDQAIEH5A5CNFSM4IENFKGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2MOTEA#issuecomment-513337744>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALGAL4SDPFJ5B53DF64BYPDQAIEH5ANCNFSM4IENFKGA>
.
|
Ok, so now we know the "move issue" has something to do with the OSD mouse handling. We need to continue narrowing it down. If you use Basically, we just need to narrow it down to find where the problem is; it's some combination of the OSD mouse handling plus certain browsers plus how you've set up your page (possibly having to do with the shadow DOM, but maybe having to do with other aspects). One thing I'm noticing is that you're using flex and your |
I as said in one of my posts, it is not really a 'move issue' but a 'click
issue' , as it is triggered even if the mouse is not moved.
I said too that by reducing to '95vh' it works.
But 100vh is a trick I'v been using tha is supported by all browsers tested
and allow to have a div that uses all avaiable space,
that is all viewport area not used by other div
( on the example it is used on all tabs without problem )
with opensea dragon it is displayed as I want as long as i don't click (
the zoom is working )
I alrady tested panHorizontal: false, panVertical: false , but as It is
triggered by the click .....
Thanks anyway to try to help
P.Cailly
Le mar. 23 juil. 2019 à 00:01, Ian Gilman <notifications@github.com> a
écrit :
… Ok, so now we know the "move issue" has something to do with the OSD mouse
handling. We need to continue narrowing it down. If you use panHorizontal:
false, panVertical: false in your options when you create the viewer, you
can separate the mouse handling from the actual panning to see which it is
that causes the issue.
Basically, we just need to narrow it down to find where the problem is;
it's some combination of the OSD mouse handling plus certain browsers plus
how you've set up your page (possibly having to do with the shadow DOM, but
maybe having to do with other aspects).
One thing I'm noticing is that you're using flex and your pc-openseadragon
element is height="100vh". That's likely to cause problems no matter
what, since you're trying to fit more stuff than just that one element.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1677?email_source=notifications&email_token=ALGAL4WHXD5QZVELYEW3OFTQAYU3HA5CNFSM4IENFKGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2RJM2Q#issuecomment-513971818>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALGAL4SSY6WTWQ63JNT47TLQAYU3HANCNFSM4IENFKGA>
.
|
Oh yes, sorry, lost track of the conversation. I do think it probably comes down to the 100vh thing. Even if it does work in some browsers and some circumstances, it still seems like a hack (to me). I think the proper way to do that sort of thing with Flexbox is to have the tab panel and the combo box row have fixed heights and have the Anyway, let me know if there's more I can be help with. |
I agree that the 100vh trick is a hack but it works with all browsers I've
tested and ( to me ) only fails with openseadragon and
NOT on first display ( loading Images or whathever collection or strip )
NOT on zoom ( on my test page I can zoom out then zoom in to have details
of an image or collecion ) .
A shame because OpenseaDragon is a real marvel!
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Garanti
sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Le mar. 23 juil. 2019 à 22:25, Ian Gilman <notifications@github.com> a
écrit :
… Oh yes, sorry, lost track of the conversation.
I do think it probably comes down to the 100vh thing. Even if it does work
in some browsers and some circumstances, it still seems like a hack (to
me). I think the proper way to do that sort of thing with Flexbox is to
have the tab panel and the combo box row have fixed heights and have the
pc-openseadragon have flex-grow: 1.
Anyway, let me know if there's more I can be help with.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1677?email_source=notifications&email_token=ALGAL4RGPLCJCYWRL7GE7SDQA5SM5A5CNFSM4IENFKGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2UKUUY#issuecomment-514370131>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALGAL4QJ3BKDXYMZEKR262TQA5SM5ANCNFSM4IENFKGA>
.
|
I don't understand what the "trick" is. To me all that does is obscure (off the bottom of the viewport) part of the 100vh height element. You can see this on an iPhone, for example, which lets you scroll your vertically-oversized viewport (100vh + the heights of the two header rows) into view. For the issue, the only thing that "should" be happening when you click or zoom on the image is either the OpenSeadragon canvas "moves" (drag/pan), or in the case of a click, it zooms which increases the canvas size. Depending on the user agent and/or your CSS/styles, the OpenSeadragon canvas change may be displayed over the top of neighbor elements. Have you tried setting the OpenSeadragon containing DIV's overflow to hidden? |
For what it's worth, here's an example of what has worked well for me across user agents. Never used in shadow DOM though, but I would expect my user agent to handle it correctly because, as we all know, all browsers act the same ;-D Note: The important thing here is the extra OpenSeadragon DIV with width and height 100%. The DIV with the class "viewer-container" would be your DIV that has a height 100vh. Using two DIVs, one with overflow:hidden and one with width/height 100%, seems to contain the OpenSeadragon viewer correctly across all browsers I've tested
If there's dev tools with DOM element inspector available on the browser(s) it's not working in, you should be able to see what element is covering the header row elements. I'd bet it's the OpenSeadragon canvas... |
I tried
http://prenomsfrancais.free.fr/showcase/s0.html ( zoomyfy TAB then
combobox image )
Doesn't change the behaviour
Thanks Anyway
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Garanti
sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Le mer. 24 juil. 2019 à 17:07, Mark Salsbery <notifications@github.com> a
écrit :
… @PCailly <https://github.com/PCailly>
For what it's worth, here's an example of what has worked well for me
across user agents. Never used in shadow DOM though, but I would expect my
user agent to handle it correctly because, as we all know, all browsers act
the same ;-D
*Note the DIV with the class "viewer-container" would be your DIV that has
a height 100vh*
<div class="viewer-container">
<div id="osd" class="openseadragon"></div>
</div>
.viewer-container
{
/*
this really should be something like calc(100vh - 90px)
so the DIV doesn't extend outside the viewport
*/
height: 100vh;
overflow: hidden;
}
.openseadragon
{
height: 100%;
width: 100%;
}
var viewer = OpenSeadragon({
id: 'osd',
...
});
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1677?email_source=notifications&email_token=ALGAL4QEX7XKRMZV65DOOTDQBBV2ZA5CNFSM4IENFKGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2WUL6Y#issuecomment-514672123>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALGAL4VIPCLYWN6NSF6OBUTQBBV2ZANCNFSM4IENFKGA>
.
|
Bummer. The example at the link is a good test...it’s broken on Safari iOS (the version yesterday had pointer events disabled). I’ll take a look and try to figure out what’s going on... |
For what it's worth, I'm thinking something more like this:
|
I can control that by changing 100vh to 96vh ( no change to other elements
that are in their own shadowDom : the nav-bar and the combobox )
I had a look at the openseadragon source code and noticed that it uses
'document.getElementById' at a few points and that doesn't work with
ShadowDOM.
I don't know if they aree used when clicking though.
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Garanti
sans virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Le jeu. 25 juil. 2019 à 20:10, Ian Gilman <notifications@github.com> a
écrit :
… For what it's worth, I'm thinking something more like this:
<div class="page-content">
<div class="top-nav"></div>
<div class="openseadragon"></div>
</div>
.page-content {
display: flex;
flex-direction: column;
width: 100vw;
height: 100vh;
}
.top-nav {
height: 20px;
flex-shrink: 0;
}
.openseadragon {
flex-grow: 1;
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1677?email_source=notifications&email_token=ALGAL4UOLF5RTW4JJ4X2CELQBHT73A5CNFSM4IENFKGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD22KDFA#issuecomment-515154324>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALGAL4SA36JISER5YQRKGBTQBHT73ANCNFSM4IENFKGA>
.
|
I'm guessing the At any rate, it definitely should be sorted out for full shadow DOM support. I imagine some of it has to do with places where we will accept an ID or an element. Of course we need Good to have these notes for whoever might take on this task! |
You're right ( i've tested ) OSD doesn't call document.getElementById
when clicking !
Le ven. 26 juil. 2019 à 22:53, Ian Gilman <notifications@github.com> a
écrit :
… I'm guessing the document.getElementById stuff is unrelated to the
clicking issue, but who knows?
At any rate, it definitely should be sorted out for full shadow DOM
support. I imagine some of it has to do with places where we will accept an
ID or an element. Of course we need getElementById for the ID option, but
anyone using the shadow DOM would need to use the element option. We just
need to find places where you're forced into using getElementById and you
have no other option.
Good to have these notes for whoever might take on this task!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1677?email_source=notifications&email_token=ALGAL4VFCUTRJXMTER7BJCDQBNP6JA5CNFSM4IENFKGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD25WAHQ#issuecomment-515596318>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALGAL4SYHR7Q3WKO5NHKMH3QBNP6JANCNFSM4IENFKGA>
.
|
I created a custom element using openseadragon
displayed in a
<div>
works perfectly as long as do not move the Image
I can display Images sequences , collections
and zoom in and out,
but when move the image, it still works but is not displaye in the
<div>
anymore,it seems that it is reinjected somewhere else and displayed "fullpage" in the browser.
The togglebutton works but getting back is a complete mess
Here is a test page ( Zoomify tab )
http://prenomsfrancais.free.fr/showcase/s0.html
The text was updated successfully, but these errors were encountered: