make buttons visible in mobile version of presentation mode in slides

Slides hides the buttons needed for navigation and exiting in presentation
mode. This makes sense because when doing a presentation, a user would
prefer to not have button icons all over their presentation content. When
a user hovers on the presentation, the needed buttons become visible
again.

This commit makes mobile touch act similarily to hovering over the
presentation.
This commit is contained in:
Ahmed Mazen 2023-07-06 17:51:35 +08:00
parent a5d5dba9f2
commit dcaa6888b9

View File

@ -205,14 +205,23 @@ define([
var addEvent = function () {
console.log($modal);
var icon_to;
$modal.mousemove(function () {
var mousemove = function () {
console.log($modal);
var $buttons = $modal.find('.cp-app-slide-modal-button');
$buttons.show();
if (icon_to) { window.clearTimeout(icon_to); }
icon_to = window.setTimeout(function() {
$buttons.fadeOut();
}, 1000);
});
}
$modal.mousemove(mousemove);
$modal.on('touchstart', mousemove);
$modal.on('touchend', mousemove);
$modal.on('touchcancel', mousemove);
$modal.on('touchmove', mousemove);
$modal.find('#cp-app-slide-modal-exit').click(function () {
var ev = $.Event("keyup");
ev.which = 27;