Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
shower-presentation
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
Шардт Максим Александрович
shower-presentation
Commits
5094e983
Commit
5094e983
authored
Jul 16, 2011
by
Vadim Makeev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resize events reverted
parent
1bbce711
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
script.js
scripts/script.js
+9
-7
No files found.
scripts/script.js
View file @
5094e983
...
@@ -12,12 +12,12 @@
...
@@ -12,12 +12,12 @@
}
}
function
resizeFull
(
p
)
{
function
resizeFull
(
p
)
{
if
(
p
)
{
if
(
typeof
p
==
'boolean'
&&
!
p
)
{
var
transform
=
'none'
;
}
else
{
var
sx
=
body
.
clientWidth
/
window
.
innerWidth
,
var
sx
=
body
.
clientWidth
/
window
.
innerWidth
,
sy
=
body
.
clientHeight
/
window
.
innerHeight
,
sy
=
body
.
clientHeight
/
window
.
innerHeight
,
transform
=
'scale('
+
(
1
/
Math
.
max
(
sx
,
sy
))
+
')'
;
transform
=
'scale('
+
(
1
/
Math
.
max
(
sx
,
sy
))
+
')'
;
}
else
{
var
transform
=
'none'
;
}
}
body
.
style
.
MozTransform
=
transform
;
body
.
style
.
MozTransform
=
transform
;
body
.
style
.
WebkitTransform
=
transform
;
body
.
style
.
WebkitTransform
=
transform
;
...
@@ -71,16 +71,18 @@
...
@@ -71,16 +71,18 @@
function
enterFull
(
e
)
{
function
enterFull
(
e
)
{
body
.
className
=
'full'
;
body
.
className
=
'full'
;
resizeFull
(
1
);
resizeFull
(
true
);
turnSlide
(
e
);
turnSlide
(
e
);
if
(
!
isFull
())
history
.
pushState
(
null
,
null
,
url
.
pathname
+
'?full'
+
url
.
hash
);
if
(
!
isFull
())
history
.
pushState
(
null
,
null
,
url
.
pathname
+
'?full'
+
url
.
hash
);
window
.
addEventListener
(
'resize'
,
resizeFull
,
false
);
document
.
addEventListener
(
'keyup'
,
exitFullEsc
,
false
);
document
.
addEventListener
(
'keyup'
,
exitFullEsc
,
false
);
}
}
function
exitFull
()
{
function
exitFull
()
{
body
.
className
=
'list'
;
body
.
className
=
'list'
;
resizeFull
(
0
);
resizeFull
(
false
);
history
.
pushState
(
null
,
null
,
url
.
href
.
replace
(
'?full'
,
''
));
history
.
pushState
(
null
,
null
,
url
.
href
.
replace
(
'?full'
,
''
));
window
.
removeEventListener
(
'resize'
,
resizeFull
,
false
);
document
.
removeEventListener
(
'keyup'
,
exitFullEsc
,
false
);
document
.
removeEventListener
(
'keyup'
,
exitFullEsc
,
false
);
}
}
...
...
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