Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mirador Video
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 Video
Commits
6cea9853
Commit
6cea9853
authored
Jan 30, 2023
by
Anthony
Browse files
Options
Downloads
Patches
Plain Diff
WIP on components AnnotationManifestAccordion
Accordion opening correctly
parent
b5a0ca6b
No related branches found
No related tags found
2 merge requests
!13
Manifest side to side
,
!11
Draft: 33 8 open an other manifest side by side from an annotation
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/AnnotationManifestsAccordion.js
+10
-4
10 additions, 4 deletions
src/components/AnnotationManifestsAccordion.js
src/components/CanvasAnnotations.js
+7
-6
7 additions, 6 deletions
src/components/CanvasAnnotations.js
with
17 additions
and
10 deletions
src/components/AnnotationManifestsAccordion.js
+
10
−
4
View file @
6cea9853
...
@@ -18,6 +18,7 @@ export class AnnotationManifestsAccordion extends Component {
...
@@ -18,6 +18,7 @@ export class AnnotationManifestsAccordion extends Component {
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
this
.
handleOpenManifestSideToSide
=
this
.
handleOpenManifestSideToSide
.
bind
(
this
);
this
.
handleOpenManifestSideToSide
=
this
.
handleOpenManifestSideToSide
.
bind
(
this
);
this
.
handleOpenAccordion
=
this
.
handleOpenAccordion
.
bind
(
this
);
}
}
/** */
/** */
...
@@ -27,6 +28,11 @@ export class AnnotationManifestsAccordion extends Component {
...
@@ -27,6 +28,11 @@ export class AnnotationManifestsAccordion extends Component {
addWindow
({
manifestId
});
addWindow
({
manifestId
});
}
}
/** */
handleOpenAccordion
(
e
)
{
e
.
stopPropagation
();
}
/** */
/** */
render
()
{
render
()
{
const
{
const
{
...
@@ -40,20 +46,21 @@ export class AnnotationManifestsAccordion extends Component {
...
@@ -40,20 +46,21 @@ export class AnnotationManifestsAccordion extends Component {
);
);
}
}
console
.
log
(
annotation
);
annotation
.
idIsManifest
=
!!
searchManifest
(
annotation
.
id
);
annotation
.
idIsManifest
=
!!
searchManifest
(
annotation
.
id
);
annotation
.
manifestsInContent
=
searchManifest
(
annotation
.
content
);
annotation
.
manifestsInContent
=
searchManifest
(
annotation
.
content
);
if
(
annotation
.
manifestsInContent
===
null
&&
annotation
.
idIsManifest
)
{
if
(
annotation
.
manifestsInContent
===
null
&&
!
annotation
.
idIsManifest
)
{
return
null
;
return
null
;
}
}
return
(
return
(
(
annotation
.
idIsManifest
||
annotation
.
manifestsInContent
)
&&
(
(
annotation
.
idIsManifest
||
annotation
.
manifestsInContent
)
&&
(
<
div
>
<
div
>
{
annotation
.
idIsManifest
}
<
Accordion
>
<
Accordion
>
<
AccordionSummary
<
AccordionSummary
expandIcon
=
{
<
ExpandMoreIcon
/>
}
expandIcon
=
{
<
ExpandMoreIcon
/>
}
onClick
=
{(
e
)
=>
this
.
handleOpenAccordion
(
e
)}
>
>
<
Typography
className
=
{
classes
.
heading
}
>
Manifests
found
:
<
/Typography
>
<
Typography
className
=
{
classes
.
heading
}
>
Manifests
found
:
<
/Typography
>
<
/AccordionSummary
>
<
/AccordionSummary
>
...
@@ -103,7 +110,7 @@ export class AnnotationManifestsAccordion extends Component {
...
@@ -103,7 +110,7 @@ export class AnnotationManifestsAccordion extends Component {
AnnotationManifestsAccordion
.
propsTypes
=
{
AnnotationManifestsAccordion
.
propsTypes
=
{
addResource
:
PropTypes
.
func
.
isRequired
,
addResource
:
PropTypes
.
func
.
isRequired
,
addWindow
:
PropTypes
.
func
.
isRequired
,
addWindow
:
PropTypes
.
func
.
isRequired
,
annotation
:
PropTypes
.
objectOf
(
annotation
:
PropTypes
.
shape
(
{
{
id
:
PropTypes
.
string
.
isRequired
,
id
:
PropTypes
.
string
.
isRequired
,
idIsManifest
:
PropTypes
.
bool
,
idIsManifest
:
PropTypes
.
bool
,
...
@@ -115,7 +122,6 @@ AnnotationManifestsAccordion.propsTypes = {
...
@@ -115,7 +122,6 @@ AnnotationManifestsAccordion.propsTypes = {
};
};
AnnotationManifestsAccordion
.
defaultProps
=
{
AnnotationManifestsAccordion
.
defaultProps
=
{
annotation
:
{},
classes
:
{},
classes
:
{},
htmlSanitizationRuleSet
:
'
iiif
'
,
htmlSanitizationRuleSet
:
'
iiif
'
,
listContainerComponent
:
'
li
'
,
listContainerComponent
:
'
li
'
,
...
...
This diff is collapsed.
Click to expand it.
src/components/CanvasAnnotations.js
+
7
−
6
View file @
6cea9853
...
@@ -57,12 +57,11 @@ export class CanvasAnnotations extends Component {
...
@@ -57,12 +57,11 @@ export class CanvasAnnotations extends Component {
*/
*/
render
()
{
render
()
{
const
{
const
{
annotations
,
autoScroll
,
classes
,
index
,
label
,
selectedAnnotationId
,
t
,
totalSize
,
listContainerComponent
,
htmlSanitizationRuleSet
,
hoveredAnnotationIds
,
listContainerComponent
,
htmlSanitizationRuleSet
,
hoveredAnnotationIds
,
annotations
,
autoScroll
,
classes
,
index
,
label
,
selectedAnnotationId
,
t
,
totalSize
,
containerRef
,
containerRef
,
}
=
this
.
props
;
}
=
this
.
props
;
if
(
annotations
.
length
===
0
)
return
null
;
if
(
annotations
.
length
===
0
)
return
null
;
console
.
log
(
annotations
);
return
(
return
(
<>
<>
<
Typography
className
=
{
classes
.
sectionHeading
}
variant
=
"
overline
"
>
<
Typography
className
=
{
classes
.
sectionHeading
}
variant
=
"
overline
"
>
...
@@ -106,13 +105,15 @@ export class CanvasAnnotations extends Component {
...
@@ -106,13 +105,15 @@ export class CanvasAnnotations extends Component {
<
Chip
size
=
"
small
"
variant
=
"
outlined
"
label
=
{
tag
}
id
=
{
tag
}
className
=
{
classes
.
chip
}
key
=
{
tag
.
toString
()}
/
>
<
Chip
size
=
"
small
"
variant
=
"
outlined
"
label
=
{
tag
}
id
=
{
tag
}
className
=
{
classes
.
chip
}
key
=
{
tag
.
toString
()}
/
>
))
))
}
}
<
/div
>
<
/ListItemText
>
<
/MenuItem
>
<
AnnotationManifestsAccordion
<
AnnotationManifestsAccordion
annotation
=
{
annotation
}
annotation
=
{
annotation
}
t
=
{
t
}
t
=
{
t
}
/
>
/
>
<
/div
>
<
/ListItemText
>
<
/MenuItem
>
<
/ScrollTo
>
<
/ScrollTo
>
))
))
}
}
...
...
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