LT-251: Making studies switch behave like demonstrated in the design video
This commit is contained in:
parent
c8fdf0522e
commit
b6e95b567b
@ -1,7 +1,7 @@
|
|||||||
<template name="studySeriesQuickSwitch">
|
<template name="studySeriesQuickSwitch">
|
||||||
<div class="quickSwitchWrapper {{side}}">
|
<div class="quickSwitchWrapper {{side}}">
|
||||||
<div class="quickSwitch js-quick-switch clearfix rp-t-1 {{#if eq side 'left'}}rp-r-3{{else}}rp-l-3{{/if}}">
|
<div class="quickSwitch js-quick-switch clearfix rp-t-1 {{#if eq side 'left'}}rp-r-3{{else}}rp-l-3{{/if}}">
|
||||||
<div class="switchSection switchSectionStudy rm-x-1 {{#if eq side 'left'}}pull-right{{else}}pull-left{{/if}}">
|
<div class="switchSection switchSectionStudy rp-x-1 {{#if eq side 'left'}}pull-right{{else}}pull-left{{/if}}">
|
||||||
<div class="label">Study</div>
|
<div class="label">Study</div>
|
||||||
<div class="studySwitch">
|
<div class="studySwitch">
|
||||||
<div class="studyBox"></div>
|
<div class="studyBox"></div>
|
||||||
@ -12,7 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="switchSection switchSectionSeries rm-x-1 {{#if eq side 'left'}}pull-right{{else}}pull-left{{/if}}">
|
<div class="switchSection switchSectionSeries rp-x-1 {{#if eq side 'left'}}pull-right{{else}}pull-left{{/if}}">
|
||||||
{{#let thumbnailsList=(studyThumbnails currentStudy)}}
|
{{#let thumbnailsList=(studyThumbnails currentStudy)}}
|
||||||
<div class="label">Series</div>
|
<div class="label">Series</div>
|
||||||
<div class="seriesSwitch clearfix">
|
<div class="seriesSwitch clearfix">
|
||||||
|
|||||||
@ -35,10 +35,12 @@ Template.studySeriesQuickSwitch.onCreated(() => {
|
|||||||
|
|
||||||
Template.studySeriesQuickSwitch.events({
|
Template.studySeriesQuickSwitch.events({
|
||||||
'mouseenter .js-quick-switch, mouseenter .js-quick-switch .switchSectionSeries'(event, instance) {
|
'mouseenter .js-quick-switch, mouseenter .js-quick-switch .switchSectionSeries'(event, instance) {
|
||||||
|
instance.$('.quickSwitchWrapper').addClass('overlay');
|
||||||
$(event.currentTarget).addClass('hover');
|
$(event.currentTarget).addClass('hover');
|
||||||
},
|
},
|
||||||
'mouseleave .js-quick-switch'(event, instance) {
|
'mouseleave .js-quick-switch'(event, instance) {
|
||||||
instance.$('.js-quick-switch, .switchSectionSeries').removeClass('hover');
|
instance.$('.js-quick-switch, .switchSectionSeries').removeClass('hover');
|
||||||
|
instance.$('.quickSwitchWrapper').removeClass('overlay');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -6,16 +6,41 @@ $seriesSpacing = 2px
|
|||||||
.quickSwitchWrapper
|
.quickSwitchWrapper
|
||||||
position: absolute
|
position: absolute
|
||||||
top: 0
|
top: 0
|
||||||
|
|
||||||
&.middle
|
&.middle
|
||||||
left: 50%
|
left: 50%
|
||||||
transform(translateX(-50%))
|
transform(translateX(-50%))
|
||||||
|
|
||||||
&.left
|
&.left
|
||||||
border-right: 1px solid $uiBorderColor
|
border-right: 1px solid $uiBorderColor
|
||||||
right: 50%
|
right: 50%
|
||||||
|
|
||||||
&.right
|
&.right
|
||||||
left: 50%
|
left: 50%
|
||||||
|
|
||||||
|
&.overlay .quickSwitch
|
||||||
|
z-index: 1
|
||||||
|
|
||||||
|
&:before
|
||||||
|
background-color: $primaryBackgroundColor
|
||||||
|
bottom: 0
|
||||||
|
content: ''
|
||||||
|
left: 0
|
||||||
|
opacity: 0
|
||||||
|
position: fixed
|
||||||
|
right: 0
|
||||||
|
top: 0
|
||||||
|
transition(opacity 0.3s ease\, visibility 0s linear 0.3s)
|
||||||
|
visibility: hidden
|
||||||
|
z-index: 1
|
||||||
|
|
||||||
|
&.overlay:before
|
||||||
|
opacity: 0.8
|
||||||
|
transition(opacity 0.3s ease\, visibility 0s linear 0s)
|
||||||
|
visibility: visible
|
||||||
|
|
||||||
.quickSwitch
|
.quickSwitch
|
||||||
|
position: relative
|
||||||
|
|
||||||
.switchSection
|
.switchSection
|
||||||
display: inline-block
|
display: inline-block
|
||||||
@ -27,7 +52,7 @@ $seriesSpacing = 2px
|
|||||||
.studySwitch .studyBox, .seriesSwitch .seriesItem
|
.studySwitch .studyBox, .seriesSwitch .seriesItem
|
||||||
opacity: 0
|
opacity: 0
|
||||||
.switchHover
|
.switchHover
|
||||||
opacity: 0.8
|
opacity: 1
|
||||||
.studyHover
|
.studyHover
|
||||||
transform(scale(1))
|
transform(scale(1))
|
||||||
|
|
||||||
@ -35,7 +60,7 @@ $seriesSpacing = 2px
|
|||||||
.seriesHover
|
.seriesHover
|
||||||
.thumbnailsWrapper
|
.thumbnailsWrapper
|
||||||
transition(all 0.3s ease)
|
transition(all 0.3s ease)
|
||||||
transform(scale(0.8) translateY($switchSize))
|
transform(scale(0.9) translateY($switchSize*1.5))
|
||||||
.thumbnailEntry .seriesDetails
|
.thumbnailEntry .seriesDetails
|
||||||
opacity: 0
|
opacity: 0
|
||||||
visibility: hidden
|
visibility: hidden
|
||||||
@ -61,6 +86,8 @@ $seriesSpacing = 2px
|
|||||||
position: relative
|
position: relative
|
||||||
|
|
||||||
.studySwitch
|
.studySwitch
|
||||||
|
.studyTimepointBrowser
|
||||||
|
background-color: transparent
|
||||||
.studyTimepointStudy.active .studyModality
|
.studyTimepointStudy.active .studyModality
|
||||||
box-shadow: inset 0 0 0 3px $activeColor
|
box-shadow: inset 0 0 0 3px $activeColor
|
||||||
.studyBox
|
.studyBox
|
||||||
@ -105,7 +132,6 @@ $seriesSpacing = 2px
|
|||||||
text-transform: uppercase
|
text-transform: uppercase
|
||||||
|
|
||||||
.switchHover
|
.switchHover
|
||||||
background: black
|
|
||||||
border: 10px solid transparent
|
border: 10px solid transparent
|
||||||
border-radius: 5px
|
border-radius: 5px
|
||||||
margin: -10px
|
margin: -10px
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user