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
Show 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;
...
@@ -267,48 +267,37 @@ $baseFontSize: 14px;
//CONTROLBAR STUFF////////////////////////////////
//CONTROLBAR STUFF////////////////////////////////
.annotator-toolbar
{
.annotator-toolbar
{
@include
transition
(
height
.25s
,
min-height
.25s
,
max-height
.25s
);
position
:
absolute
;
position
:
absolute
;
overflow
:
hidden
;
height
:
200px
;
left
:
-
(
$heatmap-width
+
18px
-
7px
);
left
:
-
(
$heatmap-width
+
18px
-
7px
);
right
:
0
;
right
:
0
;
width
:
37px
;
z-index
:
2
;
z-index
:
2
;
ul
{
height
:
100%
;
}
ul
,
li
{
ul
,
li
{
@include
box-sizing
(
border-box
);
@include
box-sizing
(
border-box
);
@include
reset-box-model
;
@include
reset-box-model
;
@include
reset-list-style
;
@include
reset-list-style
;
}
}
li
{
border-width
:
1px
;
max-height
:
30px
;
margin-bottom
:
5px
;
min-height
:
30px
;
}
}
}
.annotator-toolbar.annotator-hide
{
.annotator-toolbar.annotator-hide
{
@include
transition-delay
(
.25s
);
display
:
initial
;
display
:
initial
;
height
:
37px
;
// 30px height + 2px (top+bottom border) + 5px shadow
visibility
:
initial
;
visibility
:
initial
;
li
{
li
{
@include
transition-delay
(
.2s
,
0
,
0
);
@include
transition-delay
(
.75s
);
border-width
:
0
;
@include
transition-timing-function
(
cubic-bezier
(
1
,
.1
,
.55
,
0
));
height
:
0
;
left
:
34px
;
margin-bottom
:
0
;
margin-bottom
:
0
;
max-height
:
0
;
min-height
:
0
;
&
:first-child
,
&
.pushed
{
&
:first-child
,
&
.pushed
{
border-width
:
1px
;
@include
transition-delay
(
0
);
max-height
:
30px
;
left
:
3px
;
height
:
30px
;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
}
}
}
}
...
@@ -317,9 +306,14 @@ $baseFontSize: 14px;
...
@@ -317,9 +306,14 @@ $baseFontSize: 14px;
.annotator-toolbar
li
{
.annotator-toolbar
li
{
@include
border-radius
(
4px
);
@include
border-radius
(
4px
);
@include
smallshadow
;
@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
;
background
:
$white
;
border
:
solid
1px
$grayLighter
;
border
:
solid
1px
$grayLighter
;
left
:
0
;
margin-bottom
:
5px
;
overflow
:
hidden
;
overflow
:
hidden
;
position
:
relative
;
position
:
relative
;
height
:
30px
;
height
:
30px
;
...
@@ -329,12 +323,18 @@ $baseFontSize: 14px;
...
@@ -329,12 +323,18 @@ $baseFontSize: 14px;
@include
border-radius
(
4px
0
0
4px
);
@include
border-radius
(
4px
0
0
4px
);
@include
box-shadow
(
none
);
@include
box-shadow
(
none
);
border-right-style
:
none
;
border-right-style
:
none
;
left
:
0
;
width
:
36px
;
width
:
36px
;
z-index
:
1
;
}
}
&
.pushed
{
&
.pushed
{
@include
box-shadow
(
none
);
@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
{
a
,
a
:hover
,
a
:active
,
a
:visited
,
a
:link
,
a
:link:hover
{
...
@@ -349,26 +349,20 @@ $baseFontSize: 14px;
...
@@ -349,26 +349,20 @@ $baseFontSize: 14px;
color
:
rgba
(
200
,
200
,
200
,
.3
);
color
:
rgba
(
200
,
200
,
200
,
.3
);
text-decoration
:
none
;
text-decoration
:
none
;
&
:focus
{
outline
:
0
;
}
&
.tri-icon
{
text-shadow
:
text-shadow
:
0
0
2px
$grayLightest
,
0
0
2px
$grayLightest
,
0
0
0
$gray
;
0
0
0
$gray
;
&
:hover
{
&
:focus
{
outline
:
0
;
}
color
:
fade-out
(
$grayLightest
,
.9
);
&
:hover
{
color
:
$linkColorHover
;
}
}
}
&
.
alwaysonhighlights-icon
,
&
.highlighter-icon
,
&
.commenter
-icon
{
&
.
tri
-icon
{
text-shadow
:
text-shadow
:
0
0
2px
$grayLightest
,
0
0
2px
$grayLightest
,
0
0
0
$gray
;
0
0
0
$gray
;
&
:hover
{
&
:hover
{
color
:
$linkColorHover
;
color
:
fade-out
(
$grayLightest
,
.9
)
;
}
}
}
}
}
}
...
...
h/js/plugin/toolbar.coffee
View file @
7f25b15f
...
@@ -2,7 +2,7 @@ $ = Annotator.$
...
@@ -2,7 +2,7 @@ $ = Annotator.$
class
Annotator
.
Plugin
.
Toolbar
extends
Annotator
.
Plugin
class
Annotator
.
Plugin
.
Toolbar
extends
Annotator
.
Plugin
events
:
events
:
'.annotator-toolbar
li:first-child
mouseenter'
:
'show'
'.annotator-toolbar mouseenter'
:
'show'
'.annotator-toolbar mouseleave'
:
'hide'
'.annotator-toolbar mouseleave'
:
'hide'
'setTool'
:
'onSetTool'
'setTool'
:
'onSetTool'
'setVisibleHighlights'
:
'onSetVisibleHighlights'
'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