Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
c7835704
Commit
c7835704
authored
May 18, 2015
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore PDF.js highlight color overrides
parent
b1bedc79
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
24 deletions
+8
-24
pdf.coffee
h/static/scripts/annotator/plugin/pdf.coffee
+3
-0
pdfjs-overrides.scss
h/static/styles/annotator/pdfjs-overrides.scss
+5
-24
No files found.
h/static/scripts/annotator/plugin/pdf.coffee
View file @
c7835704
...
...
@@ -9,6 +9,9 @@ class PDF extends Annotator.Plugin
documentPromise
:
null
pluginInit
:
->
viewer
=
PDFViewerApplication
.
pdfViewer
.
viewer
viewer
.
classList
.
add
(
'has-transparent-text-layer'
)
if
PDFViewerApplication
.
loading
@
documentLoaded
=
new
Promise
(
resolve
)
->
finish
=
(
evt
)
->
...
...
h/static/styles/annotator/pdfjs-overrides.scss
View file @
c7835704
@import
"../variables"
;
// Newer versions of PDFjs use apply a transparency to the textLayer element.
// In order for our highlights to be visible we need to use solid colors. The
// PDFjs plugin provides a compatibility class to the PDFjs container that
// we can use to detect this.
.has-transparent-text-layer
{
.annotator-highlights-always-on
&
.annotator-hl
{
background
:
rgba
(
$highlight-color
,
1
);
.annotator-hl
{
background-color
:
rgba
(
$highlight-color-second
,
1
);
}
.annotator-hl
.annotator-hl
{
background-color
:
rgba
(
$highlight-color-third
,
1
);
}
}
.annotator-hl.annotator-hl-focused
{
background-color
:
rgb
(
192
,
236
,
253
);
.annotator-hl
{
background-color
:
transparent
!
important
;
}
}
// In order for our highlights to be visible we need to use solid colors.
#viewer
.has-transparent-text-layer
.textLayer
{
opacity
:
1
;
::selection
{
background
:
rgba
(
0
,
0
,
255
,
.2
);
}
::-moz-selection
{
background
:
rgba
(
0
,
0
,
255
,
.2
);
}
}
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