Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Quack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
commul
Zeit.shift
Quack
Commits
d84b4701
Commit
d84b4701
authored
11 years ago
by
Toke Eskildsen
Browse files
Options
Downloads
Patches
Plain Diff
Closes #32 (Indicate linked segments with different colors)
parent
cf88e403
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web/quack.css
+130
-7
130 additions, 7 deletions
web/quack.css
web/quack.js
+25
-2
25 additions, 2 deletions
web/quack.js
with
155 additions
and
9 deletions
web/quack.css
+
130
−
7
View file @
d84b4701
...
@@ -126,21 +126,30 @@ div.openseadragon-canvas canvas {
...
@@ -126,21 +126,30 @@ div.openseadragon-canvas canvas {
.highlight
{
.highlight
{
opacity
:
0.4
;
opacity
:
0.4
;
filter
:
alpha
(
opacity
=
40
);
filter
:
alpha
(
opacity
=
40
);
margin
:
-2px
;
border
:
2px
solid
#BE3333
;
border
:
2px
solid
#BE3333
;
background-color
:
transparent
;
background-color
:
transparent
;
}
}
.highlight
:hover
,
.highlight
:focus
{
.highlight
:hover
,
.highlight
:focus
{
filter
:
alpha
(
opacity
=
70
);
/* filter: alpha(opacity=70);
opacity
:
0.7
;
opacity: 0.7;*/
border
:
4px
solid
#FF3333
;
/* margin: -10px;
border: 10px solid #0000FF;*/
}
}
.group
{
background-color
:
#9999FF
;
/* All elements in a selected group */
.group_disabled
{
/* background-color: #9999FF;*/
margin
:
-10px
;
border
:
10px
solid
#0000FF
;
}
}
.next
{
.next
{
background-color
:
#3333FF
;
/*
background-color: #3333FF;
opacity: 0.8;
opacity: 0.8;
filter
:
alpha
(
opacity
=
80
);
filter: alpha(opacity=80);*/
margin
:
-10px
;
border
:
10px
solid
#000088
;
outline
:
2px
solid
#000000
;
}
}
.illustration
{
.illustration
{
opacity
:
0.4
;
opacity
:
0.4
;
...
@@ -149,6 +158,7 @@ div.openseadragon-canvas canvas {
...
@@ -149,6 +158,7 @@ div.openseadragon-canvas canvas {
background-color
:
transparent
;
background-color
:
transparent
;
}
}
.illustration.group
{
.illustration.group
{
margin
:
-3px
;
border
:
3px
solid
#9999FF
;
border
:
3px
solid
#9999FF
;
opacity
:
1.0
;
opacity
:
1.0
;
filter
:
alpha
(
opacity
=
100
);
filter
:
alpha
(
opacity
=
100
);
...
@@ -227,3 +237,116 @@ div.thumbs a {
...
@@ -227,3 +237,116 @@ div.thumbs a {
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
}
}
/* Linked articles */
.g1
{
background-color
:
#FF0000
;
}
.g2
{
background-color
:
#00FF00
;
}
.g3
{
background-color
:
#0000FF
;
}
.g4
{
background-color
:
#FFFF00
;
}
.g5
{
background-color
:
#00FFFF
;
}
.g6
{
background-color
:
#FF00FF
;
}
.g7
{
background-color
:
#FFAA00
;
}
.g8
{
background-color
:
#AAFF00
;
}
.g9
{
background-color
:
#AA00FF
;
}
.g10
{
background-color
:
#FFFFAA
;
}
.g11
{
background-color
:
#AAFFFF
;
}
.g12
{
background-color
:
#FFAAFF
;
}
.
.g13
{
background-color
:
#FF00AA
;
}
.g14
{
background-color
:
#00FFAA
;
}
.g15
{
background-color
:
#00AAFF
;
}
.g16
{
background-color
:
#FF5500
;
}
.g17
{
background-color
:
#55FF00
;
}
.g18
{
background-color
:
#5500FF
;
}
.g19
{
background-color
:
#FFFF55
;
}
.g20
{
background-color
:
#55FFFF
;
}
.g21
{
background-color
:
#FF55FF
;
}
.
.g22
{
background-color
:
#FF0055
;
}
.g23
{
background-color
:
#00FF55
;
}
.g24
{
background-color
:
#0055FF
;
}
.g25
{
background-color
:
#FFAAAA
;
}
.g26
{
background-color
:
#AAFFAA
;
}
.g27
{
background-color
:
#AAAAFF
;
}
.g25
{
background-color
:
#FF5555
;
}
.g26
{
background-color
:
#55FF55
;
}
.g27
{
background-color
:
#5555FF
;
}
.g28
{
background-color
:
#550000
;
}
.g29
{
background-color
:
#005500
;
}
.g30
{
background-color
:
#000055
;
}
.g31
{
background-color
:
#555500
;
}
.g32
{
background-color
:
#005555
;
}
.g33
{
background-color
:
#550055
;
}
.g34
{
background-color
:
#555500
;
}
.g35
{
background-color
:
#555500
;
}
.g36
{
background-color
:
#550055
;
}
.g37
{
background-color
:
#555555
;
}
.g38
{
background-color
:
#555555
;
}
.g39
{
background-color
:
#555555
;
}
.
.g40
{
background-color
:
#550055
;
}
.g41
{
background-color
:
#005555
;
}
.g42
{
background-color
:
#005555
;
}
.g43
{
background-color
:
#55AA00
;
}
.g44
{
background-color
:
#AA5500
;
}
.g45
{
background-color
:
#AA0055
;
}
.g46
{
background-color
:
#5555AA
;
}
.g47
{
background-color
:
#AA5555
;
}
.g48
{
background-color
:
#55AA55
;
}
.
.g49
{
background-color
:
#5500AA
;
}
.g50
{
background-color
:
#0055AA
;
}
.g51
{
background-color
:
#00AA55
;
}
.g52
{
background-color
:
#555555
;
}
.g53
{
background-color
:
#555555
;
}
.g54
{
background-color
:
#555555
;
}
.g55
{
background-color
:
#55AAAA
;
}
.g56
{
background-color
:
#AA55AA
;
}
.g57
{
background-color
:
#AAAA55
;
}
.g58
{
background-color
:
#AA0000
;
}
.g59
{
background-color
:
#00AA00
;
}
.g60
{
background-color
:
#0000AA
;
}
.g61
{
background-color
:
#AAAA00
;
}
.g62
{
background-color
:
#00AAAA
;
}
.g63
{
background-color
:
#AA00AA
;
}
.g64
{
background-color
:
#AA5500
;
}
.g65
{
background-color
:
#55AA00
;
}
.g66
{
background-color
:
#5500AA
;
}
.g67
{
background-color
:
#AAAA55
;
}
.g68
{
background-color
:
#55AAAA
;
}
.g69
{
background-color
:
#AA55AA
;
}
.
.g70
{
background-color
:
#AA0055
;
}
.g71
{
background-color
:
#00AA55
;
}
.g72
{
background-color
:
#0055AA
;
}
.g73
{
background-color
:
#AAAA00
;
}
.g74
{
background-color
:
#AAAA00
;
}
.g75
{
background-color
:
#AA00AA
;
}
.g76
{
background-color
:
#AAAAAA
;
}
.g77
{
background-color
:
#AAAAAA
;
}
.g78
{
background-color
:
#AAAAAA
;
}
.
.g79
{
background-color
:
#AA00AA
;
}
.g80
{
background-color
:
#00AAAA
;
}
.g81
{
background-color
:
#00AAAA
;
}
.g82
{
background-color
:
#AA5555
;
}
.g83
{
background-color
:
#55AA55
;
}
.g84
{
background-color
:
#5555AA
;
}
.g85
{
background-color
:
#AAAAAA
;
}
.g86
{
background-color
:
#AAAAAA
;
}
.g87
{
background-color
:
#AAAAAA
;
}
This diff is collapsed.
Click to expand it.
web/quack.js
+
25
−
2
View file @
d84b4701
...
@@ -77,7 +77,9 @@ var prevs = {};
...
@@ -77,7 +77,9 @@ var prevs = {};
function
addForward
(
overlay
,
className
)
{
function
addForward
(
overlay
,
className
)
{
if
(
!
document
.
getElementById
(
overlay
))
return
;
if
(
!
document
.
getElementById
(
overlay
))
return
;
document
.
getElementById
(
overlay
).
className
=
document
.
getElementById
(
overlay
).
className
+
'
'
+
className
;
document
.
getElementById
(
overlay
).
className
=
document
.
getElementById
(
overlay
).
className
+
'
'
+
className
;
// console.log("Overlay " + overlay + " now has className " + document.getElementById(overlay).className);
if
(
overlay
in
nexts
)
{
if
(
overlay
in
nexts
)
{
// console.log("Adding to next " + nexts[overlay] + " for " + overlay);
addForward
(
nexts
[
overlay
],
className
);
addForward
(
nexts
[
overlay
],
className
);
}
}
}
}
...
@@ -193,15 +195,36 @@ function addResultBoxes() {
...
@@ -193,15 +195,36 @@ function addResultBoxes() {
}
}
}
}
// Mark all groups (articles linked with IDNEXT) with class g$COUNT, starting from 1
function
colorGroups
()
{
console
.
log
(
'
Coloring groups started
'
);
var
count
=
1
for
(
var
i
=
0
;
i
<
myDragon
.
overlays
.
length
;
i
++
)
{
var
id
=
myDragon
.
overlays
[
i
].
id
;
var
element
=
document
.
getElementById
(
id
);
// element.className = element.className + ' g' + count;
// count++;
// continue;
if
((
'
highlight
'
==
element
.
className
)
&&
(
id
in
nexts
))
{
// console.log('id ' + id + ' was in nextx: ' + id + " " + nexts[id] + " with old className=" + element.className);
addForward
(
id
,
"
g
"
+
count
);
count
++
;
}
}
console
.
log
(
'
Coloring groups finished
'
);
}
function
setupJS
()
{
function
setupJS
()
{
// TODO: Check if this is an image page and if not, exit immediately
// TODO: Check if this is an image page and if not, exit immediately
colorGroups
();
toggleGrid
();
toggleGrid
();
toggleTextBlock
();
toggleTextBlock
();
toggleBlown
();
toggleBlown
();
addResultBoxes
();
addResultBoxes
();
//
!
Create a callback for eack overlay with the overlay-ID as argument
// Create a callback for eack overlay with the overlay-ID as argument
for
(
var
i
=
0
;
i
<
myDragon
.
overlays
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
myDragon
.
overlays
.
length
;
i
++
)
{
id
=
myDragon
.
overlays
[
i
].
id
;
id
=
myDragon
.
overlays
[
i
].
id
;
shortid
=
id
.
split
(
"
/
"
).
pop
();
shortid
=
id
.
split
(
"
/
"
).
pop
();
...
...
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