Commit 8fb96ed7 authored by Randall Leeds's avatar Randall Leeds

improve threading overflow and animation

parent edc4bd30
...@@ -286,6 +286,7 @@ class Hypothesis extends Annotator ...@@ -286,6 +286,7 @@ class Hypothesis extends Annotator
parent.classed('hyp-collapsed', !collapsed) parent.classed('hyp-collapsed', !collapsed)
parent.select('.annotator-listing').selectAll(-> this.children) parent.select('.annotator-listing').selectAll(-> this.children)
.transition().duration(600) .transition().duration(600)
.style('overflow', 'hidden')
.style 'height', -> .style 'height', ->
if collapsed if collapsed
"#{$(this).find('.hyp-reply').outerHeight(true)}px" "#{$(this).find('.hyp-reply').outerHeight(true)}px"
...@@ -295,6 +296,7 @@ class Hypothesis extends Annotator ...@@ -295,6 +296,7 @@ class Hypothesis extends Annotator
if collapsed if collapsed
d3.select(this) d3.select(this)
.style('height', null) .style('height', null)
.style('overflow', null)
when '#reply' when '#reply'
d3.event.preventDefault() d3.event.preventDefault()
......
...@@ -256,7 +256,8 @@ $threadexp-width: 1em; ...@@ -256,7 +256,8 @@ $threadexp-width: 1em;
height: $threadexp-width; height: $threadexp-width;
width: $threadexp-width; width: $threadexp-width;
position: absolute; position: absolute;
margin-left: (-$threadexp-width / 2) - $thread-padding; top: 1em;
left: -$threadexp-width / 2;
outline: 1px dotted #aaaaaa; outline: 1px dotted #aaaaaa;
background-image: url("../images/minus_1.png"); background-image: url("../images/minus_1.png");
...@@ -483,15 +484,14 @@ $threadexp-width: 1em; ...@@ -483,15 +484,14 @@ $threadexp-width: 1em;
& > .hyp-reply > .hyp-meta > .hyp-user { & > .hyp-reply > .hyp-meta > .hyp-user {
font-size: 0.9em; font-size: 0.9em;
} }
& > .hyp-reply > .annotator-listing {
overflow: hidden;
}
} }
.hyp-detail { .hyp-detail {
@include transition( &.hyp-hover > .hyp-reply {
(max-height .6s ease),
(box-shadow .1s ease .125s));
overflow: hidden;
&.hyp-hover {
@include smallshadow(2px, 2px, .2); @include smallshadow(2px, 2px, .2);
z-index: 10; z-index: 10;
} }
...@@ -500,10 +500,15 @@ $threadexp-width: 1em; ...@@ -500,10 +500,15 @@ $threadexp-width: 1em;
//ANNOTATION REPLY //ANNOTATION REPLY
.hyp-reply { .hyp-reply {
background-color: white; @include transition(
(max-height .6s ease),
(box-shadow .1s ease .125s),
(z-index .1 ease .125s));
border-left: 1px dotted #999999; border-left: 1px dotted #999999;
margin-left: $thread-padding / 2; margin-left: $thread-padding;
padding: .5em 0 .5em $thread-padding; padding: 1em 1em 0 1em;
margin-right: -1em;
position: relative;
.hyp-body { .hyp-body {
margin-top: 0.6em; margin-top: 0.6em;
......
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