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
79f12125
Commit
79f12125
authored
Nov 08, 2013
by
Anton Ryzhov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't call iterate DOM several times in handlers
parent
5a4fe7db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
shower.js
shower.js
+10
-6
No files found.
shower.js
View file @
79f12125
...
...
@@ -42,7 +42,7 @@ window.shower = window.shower || (function(window, document, undefined) {
},
isLast
:
function
()
{
return
shower
.
slideList
.
length
===
this
.
number
+
1
return
shower
.
slideList
.
length
===
this
.
number
+
1
;
},
/**
...
...
@@ -889,11 +889,13 @@ window.shower = window.shower || (function(window, document, undefined) {
shower
.
init
();
document
.
addEventListener
(
'click'
,
function
(
e
)
{
var
slideNumber
=
shower
.
getSlideNumber
(
shower
.
_getSlideIdByEl
(
e
.
target
)),
var
slideId
=
shower
.
_getSlideIdByEl
(
e
.
target
),
slideNumber
,
slide
;
// Click on slide in List mode
if
(
shower
.
isListMode
()
&&
shower
.
_getSlideIdByEl
(
e
.
target
))
{
if
(
slideId
&&
shower
.
isListMode
())
{
slideNumber
=
shower
.
getSlideNumber
(
slideId
);
// Warning: go must be before enterSlideMode.
// Otherwise there is a bug in Chrome
shower
.
go
(
slideNumber
);
...
...
@@ -908,11 +910,12 @@ window.shower = window.shower || (function(window, document, undefined) {
},
false
);
document
.
addEventListener
(
'touchstart'
,
function
(
e
)
{
var
slideNumber
=
shower
.
getSlideNumber
(
shower
.
_getSlideIdByEl
(
e
.
target
)),
var
slideId
=
shower
.
_getSlideIdByEl
(
e
.
target
),
slideNumber
,
slide
,
x
;
if
(
s
hower
.
_getSlideIdByEl
(
e
.
target
)
)
{
if
(
s
lideId
)
{
if
(
shower
.
isSlideMode
()
&&
!
shower
.
_checkInteractiveElement
(
e
))
{
x
=
e
.
touches
[
0
].
pageX
;
...
...
@@ -924,9 +927,10 @@ window.shower = window.shower || (function(window, document, undefined) {
}
if
(
shower
.
isListMode
())
{
slideNumber
=
shower
.
getSlideNumber
(
slideId
);
// Warning: go must be before enterSlideMode.
// Otherwise there is a bug in Chrome
shower
.
go
(
s
hower
.
getSlideNumber
(
shower
.
_getSlideIdByEl
(
e
.
target
))
);
shower
.
go
(
s
lideNumber
);
shower
.
enterSlideMode
();
shower
.
showPresenterNotes
(
slideNumber
);
...
...
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