Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mirador annotations
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
IIIF
Mirador
Mirador annotations
Commits
2202c8fb
Commit
2202c8fb
authored
Nov 30, 2023
by
Antoine Roy
Browse files
Options
Downloads
Patches
Plain Diff
Deleted arrows that incremented the timer and binded there comportement with arrow key
parent
b78e56b3
No related branches found
No related tags found
1 merge request
!7
Change on the slide bar's UI from pluggin annotation
Pipeline
#1613
failed
Nov 30, 2023
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/AnnotationCreation.js
+9
-1
9 additions, 1 deletion
src/AnnotationCreation.js
src/HMSInput.js
+52
-11
52 additions, 11 deletions
src/HMSInput.js
with
61 additions
and
12 deletions
src/AnnotationCreation.js
+
9
−
1
View file @
2202c8fb
...
@@ -404,16 +404,20 @@ class AnnotationCreation extends Component {
...
@@ -404,16 +404,20 @@ class AnnotationCreation extends Component {
max
=
{
2000
}
max
=
{
2000
}
/
>
/
>
<
/Grid
>
<
/Grid
>
<
Grid
item
xs
=
{
12
}
className
=
{
classes
.
paper
}
>
<
Grid
item
xs
=
{
6
}
className
=
{
classes
.
paper
}
>
<
ToggleButton
value
=
"
true
"
title
=
"
Set current time
"
size
=
"
small
"
onClick
=
{
this
.
setTstartNow
}
className
=
{
classes
.
timecontrolsbutton
}
>
<
ToggleButton
value
=
"
true
"
title
=
"
Set current time
"
size
=
"
small
"
onClick
=
{
this
.
setTstartNow
}
className
=
{
classes
.
timecontrolsbutton
}
>
<
Alarm
/>
<
Alarm
/>
<
/ToggleButton
>
<
/ToggleButton
>
<
HMSInput
seconds
=
{
tstart
}
onChange
=
{
this
.
updateTstart
}
/
>
<
HMSInput
seconds
=
{
tstart
}
onChange
=
{
this
.
updateTstart
}
/
>
<
Grid
item
xs
=
{
12
}
className
=
{
classes
.
paper
}
>
<
/Grid
>
<
Grid
item
xs
=
{
6
}
className
=
{
classes
.
paper
}
>
<
ToggleButton
value
=
"
true
"
title
=
"
Set current time
"
size
=
"
small
"
onClick
=
{
this
.
setTendNow
}
className
=
{
classes
.
timecontrolsbutton
}
>
<
ToggleButton
value
=
"
true
"
title
=
"
Set current time
"
size
=
"
small
"
onClick
=
{
this
.
setTendNow
}
className
=
{
classes
.
timecontrolsbutton
}
>
<
Alarm
/>
<
Alarm
/>
<
/ToggleButton
>
<
/ToggleButton
>
<
HMSInput
seconds
=
{
tend
}
onChange
=
{
this
.
updateTend
}
/
>
<
HMSInput
seconds
=
{
tend
}
onChange
=
{
this
.
updateTend
}
/
>
<
/Grid
>
<
/Grid
>
<
/Grid
>
<
/
>
<
/
>
)}
)}
<
Grid
item
xs
=
{
12
}
>
<
Grid
item
xs
=
{
12
}
>
...
@@ -620,7 +624,11 @@ const styles = (theme) => ({
...
@@ -620,7 +624,11 @@ const styles = (theme) => ({
marginLeft
:
'
0
'
,
marginLeft
:
'
0
'
,
marginRight
:
'
5px
'
,
marginRight
:
'
5px
'
,
width
:
'
30px
'
,
width
:
'
30px
'
,
border
:
'
none
'
,
},
},
leftSidePanel
:
{
minWidth
:
'
800px
'
,
}
});
});
AnnotationCreation
.
propTypes
=
{
AnnotationCreation
.
propTypes
=
{
...
...
This diff is collapsed.
Click to expand it.
src/HMSInput.js
+
52
−
11
View file @
2202c8fb
...
@@ -22,6 +22,9 @@ class HMSInput extends Component {
...
@@ -22,6 +22,9 @@ class HMSInput extends Component {
this
.
someChange
=
this
.
someChange
.
bind
(
this
);
this
.
someChange
=
this
.
someChange
.
bind
(
this
);
this
.
addOneSec
=
this
.
addOneSec
.
bind
(
this
);
this
.
addOneSec
=
this
.
addOneSec
.
bind
(
this
);
this
.
subOneSec
=
this
.
subOneSec
.
bind
(
this
);
this
.
subOneSec
=
this
.
subOneSec
.
bind
(
this
);
this
.
modifySec
=
this
.
modifySec
.
bind
(
this
);
this
.
modifyMinute
=
this
.
modifyMinute
.
bind
(
this
);
this
.
modifyHours
=
this
.
modifyHours
.
bind
(
this
);
}
}
/** update */
/** update */
...
@@ -56,6 +59,52 @@ class HMSInput extends Component {
...
@@ -56,6 +59,52 @@ class HMSInput extends Component {
this
.
someChange
({
target
:
{
name
:
'
seconds
'
,
value
:
seconds
-
1
}
});
this
.
someChange
({
target
:
{
name
:
'
seconds
'
,
value
:
seconds
-
1
}
});
}
}
// Bind arrow key up and down to call subOneSec or AddOneSec
modifySec
(
event
){
if
(
event
.
key
===
'
ArrowUp
'
){
this
.
addOneSec
();
}
else
if
(
event
.
key
===
'
ArrowDown
'
){
this
.
subOneSec
();
}
}
/** Add one minute by simulating an input change */
addOneMinute
(){
const
{
minutes
}
=
this
.
state
;
this
.
someChange
(
{
target
:
{
name
:
'
minutes
'
,
value
:
minutes
+
1
}
});
}
/** Substract one minute by simulation an input change*/
subOneMinute
()
{
const
{
minutes
}
=
this
.
state
;
this
.
someChange
({
target
:
{
name
:
'
minutes
'
,
value
:
minutes
-
1
}
});
}
// Bind arrow key up and down to call subOneMinute or AddOneMinute
modifyMinute
(
event
){
if
(
event
.
key
===
'
ArrowUp
'
){
this
.
addOneMinute
();
}
else
if
(
event
.
key
===
'
ArrowDown
'
){
this
.
subOneMinute
();
}
}
addOneHour
(){
const
{
hours
}
=
this
.
state
;
this
.
someChange
({
target
:
{
name
:
'
hours
'
,
value
:
hours
+
1
}})
}
subOneHour
(){
const
{
hours
}
=
this
.
state
;
this
.
someChange
({
target
:
{
name
:
'
hours
'
,
value
:
hours
-
1
}})
}
modifyHours
(
event
){
if
(
event
.
key
===
'
ArrowUp
'
){
this
.
addOneHour
();
}
else
if
(
event
.
key
===
'
ArrowDown
'
){
this
.
subOneHour
();
}
}
/** Render */
/** Render */
render
()
{
render
()
{
const
{
hours
,
minutes
,
seconds
}
=
this
.
state
;
const
{
hours
,
minutes
,
seconds
}
=
this
.
state
;
...
@@ -63,17 +112,9 @@ class HMSInput extends Component {
...
@@ -63,17 +112,9 @@ class HMSInput extends Component {
return
(
return
(
<
div
className
=
{
classes
.
root
}
>
<
div
className
=
{
classes
.
root
}
>
<
div
className
=
{
classes
.
root
}
>
<
div
className
=
{
classes
.
root
}
>
<
Input
className
=
{
classes
.
input
}
name
=
"
hours
"
value
=
{
hours
}
onChange
=
{
this
.
someChange
}
/
>
<
Input
className
=
{
classes
.
input
}
name
=
"
hours
"
value
=
{
hours
}
onKeyDown
=
{
this
.
modifyHours
}
onChange
=
{
this
.
someChange
}
/
>
<
Input
className
=
{
classes
.
input
}
name
=
"
minutes
"
value
=
{
minutes
}
onChange
=
{
this
.
someChange
}
/
>
<
Input
className
=
{
classes
.
input
}
name
=
"
minutes
"
value
=
{
minutes
}
onKeyDown
=
{
this
.
modifyMinute
}
onChange
=
{
this
.
someChange
}
/
>
<
Input
className
=
{
classes
.
input
}
name
=
"
seconds
"
value
=
{
seconds
}
onChange
=
{
this
.
someChange
}
/
>
<
Input
className
=
{
classes
.
input
}
name
=
"
seconds
"
value
=
{
seconds
}
onKeyDown
=
{
this
.
modifySec
}
onChange
=
{
this
.
someChange
}
/
>
<
/div
>
<
div
className
=
{
classes
.
flexcol
}
>
<
IconButton
size
=
"
small
"
onClick
=
{
this
.
addOneSec
}
>
<
ArrowUpward
/>
<
/IconButton
>
<
IconButton
size
=
"
small
"
onClick
=
{
this
.
subOneSec
}
>
<
ArrowDownward
/>
<
/IconButton
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
);
...
...
This diff is collapsed.
Click to expand it.
Antoine Roy
@antoine
mentioned in issue
#13 (closed)
·
Nov 30, 2023
mentioned in issue
#13 (closed)
mentioned in issue #13
Toggle commit list
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