Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
my-cucumbers-ru-github-io
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Лотуга Данила Сергеевич
my-cucumbers-ru-github-io
Commits
a648e9ca
Commit
a648e9ca
authored
Jun 24, 2021
by
Vadim Makeev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates
parent
ac099fb0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
presentation.zip
presentation.zip
+0
-0
shower.js
shower/shower.js
+37
-1
No files found.
presentation.zip
View file @
a648e9ca
No preview for this file type
shower/shower.js
View file @
a648e9ca
/**
* Core for Shower HTML presentation engine
* @shower/core v3.
0
.0, https://github.com/shower/core
* @shower/core v3.
1
.0, https://github.com/shower/core
* @copyright 2010–2021 Vadim Makeev, https://pepelsbey.net
* @license MIT
*/
...
...
@@ -561,6 +561,41 @@
window
.
addEventListener
(
'resize'
,
updateScale
);
};
var
touch
=
(
shower
)
=>
{
let
exitFullScreen
=
false
;
let
clickable
=
false
;
document
.
addEventListener
(
'touchstart'
,
(
event
)
=>
{
if
(
event
.
touches
.
length
===
1
)
{
const
touch
=
event
.
touches
[
0
];
const
x
=
touch
.
clientX
;
const
{
target
}
=
touch
;
clickable
=
target
.
tabIndex
!==
-
1
;
if
(
!
clickable
)
{
if
(
shower
.
isFullMode
)
{
if
(
event
.
cancelable
)
event
.
preventDefault
();
if
(
window
.
innerWidth
/
2
<
x
)
{
shower
.
next
();
}
else
{
shower
.
prev
();
}
}
}
}
else
if
(
event
.
touches
.
length
===
3
)
{
exitFullScreen
=
true
;
}
});
shower
.
container
.
addEventListener
(
'touchend'
,
(
event
)
=>
{
if
(
exitFullScreen
)
{
event
.
preventDefault
();
exitFullScreen
=
false
;
shower
.
exitFullMode
();
}
else
if
(
event
.
touches
.
length
===
1
&&
!
clickable
&&
shower
.
isFullMode
)
event
.
preventDefault
();
});
};
var
installModules
=
(
shower
)
=>
{
a11y
(
shower
);
progress
(
shower
);
...
...
@@ -570,6 +605,7 @@
title
(
shower
);
location$1
(
shower
);
// should come after `title`
view
(
shower
);
touch
(
shower
);
// maintains invariant: active slide always exists in `full` mode
if
(
shower
.
isFullMode
&&
!
shower
.
activeSlide
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment