Commit 4039ba6d authored by Randall Leeds's avatar Randall Leeds

switch to CSS for hover effects

parent 65a5d9a8
...@@ -204,17 +204,11 @@ class Hypothesis extends Annotator ...@@ -204,17 +204,11 @@ class Hypothesis extends Annotator
.on 'mouseover', => .on 'mouseover', =>
d3.event.stopPropagation() d3.event.stopPropagation()
d3.select(d3.event.currentTarget).select('.annotator-controls') d3.select(d3.event.currentTarget).classed('hyp-hover', true)
.transition()
.style('display', '')
.style('opacity', 1)
.on 'mouseout', => .on 'mouseout', =>
d3.event.stopPropagation() d3.event.stopPropagation()
d3.select(d3.event.currentTarget).select('.annotator-controls') d3.select(d3.event.currentTarget).classed('hyp-hover', false)
.transition()
.style('display', 'none')
.style('opacity', 1e-6)
.on 'click', => .on 'click', =>
event = d3.event event = d3.event
...@@ -249,10 +243,6 @@ class Hypothesis extends Annotator ...@@ -249,10 +243,6 @@ class Hypothesis extends Annotator
editor.on('hide', => item.remove()) editor.on('hide', => item.remove())
.select('.annotator-controls')
.style('display', 'none')
.style('opacity', 1e-6)
context = items context = items
@editor.hide() @editor.hide()
......
...@@ -448,16 +448,32 @@ $threadexp-width: 1em; ...@@ -448,16 +448,32 @@ $threadexp-width: 1em;
} }
//ANNOTATION DETAIL //ANNOTATION DETAIL
.hyp-detail {
@include single-transition(all, 0.6s, ease-in-out);
margin-left: -$thread-padding / 2;
.annotator-controls {
@include single-transition(all, 0.25s, ease-in-out);
opacity: 0;
}
&.hyp-hover {
@include box-shadow(-.25em 0 1em -.25em #999);
outline-left: thin solid $gray-lighter;
& > .hyp-reply > .hyp-meta > .annotator-controls {
opacity: 1;
}
}
}
//ANNOTATION REPLY
.hyp-reply { .hyp-reply {
border-left: 1px dotted #999999; border-left: 1px dotted #999999;
padding-left: $thread-padding; padding-left: $thread-padding;
padding-top: 1em; padding-top: 1em;
margin-left: $thread-padding / 2; margin-left: $thread-padding / 2;
.hyp-detail {
margin-left: -$thread-padding / 2;
}
.hyp-body { .hyp-body {
margin-top: 0.6em; margin-top: 0.6em;
position: relative; position: relative;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment