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
7f25b15f
Commit
7f25b15f
authored
Jul 16, 2014
by
Randall Leeds
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1316 from hypothesis/toolbar-usability
Improve the usability and transitions of toolbar
parents
4a604b5d
d0331036
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
36 deletions
+30
-36
inject.scss
h/css/inject.scss
+29
-35
toolbar.coffee
h/js/plugin/toolbar.coffee
+1
-1
No files found.
h/css/inject.scss
View file @
7f25b15f
...
...
@@ -267,48 +267,37 @@ $baseFontSize: 14px;
//CONTROLBAR STUFF////////////////////////////////
.annotator-toolbar
{
@include
transition
(
height
.25s
,
min-height
.25s
,
max-height
.25s
);
position
:
absolute
;
overflow
:
hidden
;
height
:
200px
;
left
:
-
(
$heatmap-width
+
18px
-
7px
);
right
:
0
;
width
:
37px
;
z-index
:
2
;
ul
{
height
:
100%
;
}
ul
,
li
{
@include
box-sizing
(
border-box
);
@include
reset-box-model
;
@include
reset-list-style
;
}
li
{
border-width
:
1px
;
max-height
:
30px
;
margin-bottom
:
5px
;
min-height
:
30px
;
}
}
.annotator-toolbar.annotator-hide
{
@include
transition-delay
(
.25s
);
display
:
initial
;
height
:
37px
;
// 30px height + 2px (top+bottom border) + 5px shadow
visibility
:
initial
;
li
{
@include
transition-delay
(
.2s
,
0
,
0
);
border-width
:
0
;
@include
transition-delay
(
.75s
);
@include
transition-timing-function
(
cubic-bezier
(
1
,
.1
,
.55
,
0
));
height
:
0
;
left
:
34px
;
margin-bottom
:
0
;
max-height
:
0
;
min-height
:
0
;
&
:first-child
,
&
.pushed
{
border-width
:
1px
;
max-height
:
30px
;
@include
transition-delay
(
0
);
left
:
3px
;
height
:
30px
;
margin-bottom
:
5px
;
}
}
...
...
@@ -317,9 +306,14 @@ $baseFontSize: 14px;
.annotator-toolbar
li
{
@include
border-radius
(
4px
);
@include
smallshadow
;
@include
transition
(
max-height
.25s
);
@include
transition-property
(
left
,
height
,
margin-bottom
);
@include
transition-duration
(
.25s
);
@include
transition-delay
(
0
);
@include
transition-timing-function
(
cubic-bezier
(
0
,
.55
,
.1
,
1
));
background
:
$white
;
border
:
solid
1px
$grayLighter
;
left
:
0
;
margin-bottom
:
5px
;
overflow
:
hidden
;
position
:
relative
;
height
:
30px
;
...
...
@@ -329,12 +323,18 @@ $baseFontSize: 14px;
@include
border-radius
(
4px
0
0
4px
);
@include
box-shadow
(
none
);
border-right-style
:
none
;
left
:
0
;
width
:
36px
;
z-index
:
1
;
}
&
.pushed
{
@include
box-shadow
(
none
);
left
:
3px
;
z-index
:
1
;
a
,
a
:hover
,
a
:active
,
a
:visited
,
a
:link
,
a
:link:hover
{
color
:
$linkColor
;
}
}
a
,
a
:hover
,
a
:active
,
a
:visited
,
a
:link
,
a
:link:hover
{
...
...
@@ -349,8 +349,12 @@ $baseFontSize: 14px;
color
:
rgba
(
200
,
200
,
200
,
.3
);
text-decoration
:
none
;
text-shadow
:
0
0
2px
$grayLightest
,
0
0
0
$gray
;
&
:focus
{
outline
:
0
;
}
&
:hover
{
color
:
$linkColorHover
;
}
&
.tri-icon
{
text-shadow
:
...
...
@@ -361,16 +365,6 @@ $baseFontSize: 14px;
color
:
fade-out
(
$grayLightest
,
.9
);
}
}
&
.alwaysonhighlights-icon
,
&
.highlighter-icon
,
&
.commenter-icon
{
text-shadow
:
0
0
2px
$grayLightest
,
0
0
0
$gray
;
&
:hover
{
color
:
$linkColorHover
;
}
}
}
}
...
...
h/js/plugin/toolbar.coffee
View file @
7f25b15f
...
...
@@ -2,7 +2,7 @@ $ = Annotator.$
class
Annotator
.
Plugin
.
Toolbar
extends
Annotator
.
Plugin
events
:
'.annotator-toolbar
li:first-child
mouseenter'
:
'show'
'.annotator-toolbar mouseenter'
:
'show'
'.annotator-toolbar mouseleave'
:
'hide'
'setTool'
:
'onSetTool'
'setVisibleHighlights'
:
'onSetVisibleHighlights'
...
...
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