Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
slideshow-s9-config
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hague Matthew UXAC009
slideshow-s9-config
Commits
12a47154
Commit
12a47154
authored
2 years ago
by
Han DongGyun ULAC154
Browse files
Options
Downloads
Patches
Plain Diff
add keyboard shortcuts
parent
d10660d0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
templates/impress.cs/js/slide-drawing.js
+26
-6
26 additions, 6 deletions
templates/impress.cs/js/slide-drawing.js
templates/impress.cs/slides.html
+69
-62
69 additions, 62 deletions
templates/impress.cs/slides.html
with
95 additions
and
68 deletions
templates/impress.cs/js/slide-drawing.js
+
26
−
6
View file @
12a47154
...
@@ -71,12 +71,16 @@ function slide_drawing_init(paneId) {
...
@@ -71,12 +71,16 @@ function slide_drawing_init(paneId) {
canvas
.
isDrawingMode
=
false
canvas
.
isDrawingMode
=
false
}
}
new
Array
(
"
red
"
,
"
blue
"
,
"
black
"
).
forEach
(
col
=>
{
function
initBrush
(
col
)
{
document
.
getElementById
(
"
fabric-
"
+
col
).
onclick
=
function
()
{
canvas
.
isDrawingMode
=
true
canvas
.
isDrawingMode
=
true
canvas
.
freeDrawingBrush
.
color
=
col
canvas
.
freeDrawingBrush
.
color
=
col
canvas
.
freeDrawingBrush
.
width
=
3
canvas
.
freeDrawingBrush
.
width
=
3
}
}
new
Array
(
"
red
"
,
"
blue
"
,
"
black
"
).
forEach
(
col
=>
{
document
.
getElementById
(
"
fabric-
"
+
col
).
addEventListener
(
"
click
"
,
(
e
)
=>
{
initBrush
(
col
);
})
})
})
document
.
getElementById
(
"
fabric-delete
"
).
onclick
=
function
()
{
document
.
getElementById
(
"
fabric-delete
"
).
onclick
=
function
()
{
...
@@ -88,4 +92,20 @@ function slide_drawing_init(paneId) {
...
@@ -88,4 +92,20 @@ function slide_drawing_init(paneId) {
document
.
getElementById
(
"
fabric-clear
"
).
onclick
=
function
()
{
document
.
getElementById
(
"
fabric-clear
"
).
onclick
=
function
()
{
canvas
.
clear
()
canvas
.
clear
()
}
}
document
.
addEventListener
(
'
keydown
'
,
(
e
)
=>
{
switch
(
e
.
key
)
{
case
"
ArrowLeft
"
:
case
"
ArrowRight
"
:
case
"
c
"
:
lowerCanvas
();
canvas
.
clear
();
break
;
case
"
r
"
:
raiseCanvas
();
initBrush
(
"
red
"
);
break
;
}
});
}
}
This diff is collapsed.
Click to expand it.
templates/impress.cs/slides.html
+
69
−
62
View file @
12a47154
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<!doctype html>
<!doctype html>
<html
lang=
"en"
>
<html
lang=
"en"
>
<head>
<head>
<base
target=
"_blank"
/>
<base
target=
"_blank"
/>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
...
@@ -98,8 +99,14 @@ MathJax.Hub.Config({
...
@@ -98,8 +99,14 @@ MathJax.Hub.Config({
function
initialisePage
()
{
function
initialisePage
()
{
console
.
log
(
"
Creating TOC
"
)
console
.
log
(
"
Creating TOC
"
)
createTOC
()
createTOC
()
document
.
addEventListener
(
'
keydown
'
,
(
e
)
=>
{
if
(
e
.
key
==
"
s
"
)
{
startPresentation
();
}
});
}
}
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment