Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Buttons are not working on mobile #232

Open
3 of 12 tasks
Ferdric-AVPL opened this issue May 19, 2020 · 4 comments
Open
3 of 12 tasks

Buttons are not working on mobile #232

Ferdric-AVPL opened this issue May 19, 2020 · 4 comments
Assignees

Comments

@Ferdric-AVPL
Copy link

Ferdric-AVPL commented May 19, 2020

Description

Hi there. I tried adding "top widget buttons". To do that, I followed the following code snippet:

<div id="wrapper">
<!-- all your pop-up divs here-->
</div>

I tested my web page on my web browser, and it is working as expected.

However, when I tried opening it on my mobile phone, specifically Samsung Galaxy Note 9, the buttons do not work anymore.

Below is a link to my source code on codepen.io:
https://codepen.io/ferdric-avpl/pen/oNjQOYK

Panolens version
  • Master
  • Dev
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
@Ferdric-AVPL
Copy link
Author

Update: I followed the following workaround by @dustinkerstein from a related issue (#117)

I also ran into that issue with touch events. I worked around it by using Panolens' widget.createCustomItem like this:

var tourToggleButton = viewer.widget.createCustomItem({onTap: function() {toggleTour()}, style: {'color': 'white', 'background-color': 'transparent', 'border': 'none', 'position': 'absolute', 'bottom': '0px', 'left': '0px', 'outline': 'none', 'filter': 'none', 'height': '42px', 'width': '42px', 'display': 'inline-grid', 'align-items': 'center', 'background-size': '100%'}});
document.getElementById("container").appendChild(tourToggleButton);

However, the buttons inside the "tour panel" still do not work. Must I do the same for them?

Is it also possible to place the tourToggleButton on the top-left corner of the screen?

Here is my source code, after following your workaround: https://codepen.io/ferdric-avpl/pen/MWaZpNz

Thank you very much.

@dustinkerstein
Copy link

Getting the button to the top left can be done by changing: 'bottom': '0px' to 'top': '0px'

As for the other buttons, you probably could fix them by doing the same thing, but you may also be able to write your own touch event handler.

@dustinkerstein
Copy link

Using jQuery, something like this should work:

$('#buttonID').on('click touchend', function(event) {
   // Your code here
});   

@OleksiiBrylin
Copy link

Scroll doesn't work too on mobile in fullscreen mode(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants