Fixing series quick switch hovering issue
This commit is contained in:
parent
af611109c0
commit
c1d500a92b
@ -10,12 +10,8 @@
|
||||
<div class="study-modality-text" style="{{modalityStyle studyData.modalities}}">{{studyData.modalities}}</div>
|
||||
</div>
|
||||
<div class="study-text">
|
||||
{{#if isLoaded}}
|
||||
<div class="study-date">{{formatDA studyData.studyDate 'D-MMM-YYYY'}}</div>
|
||||
<div class="study-description">{{studyData.studyDescription}}</div>
|
||||
{{else}}
|
||||
<div class="study-availability">{{#if eq studyAvailable false}}N/A{{else}}Click to load{{/if}}</div>
|
||||
{{/if}}
|
||||
<div class="study-date">{{formatDA studyData.studyDate 'D-MMM-YYYY'}}</div>
|
||||
<div class="study-description">{{studyData.studyDescription}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/let}}
|
||||
|
||||
@ -114,9 +114,21 @@ Template.seriesQuickSwitch.events({
|
||||
'mouseenter .series-switch, rescale .series-switch'(event, instance) {
|
||||
// Control the width of the series browser
|
||||
const $switch = $(event.currentTarget);
|
||||
const browserWidth = $switch.offset().left + $switch.outerWidth();
|
||||
const $seriesBrowser = $switch.find('.series-browser');
|
||||
$seriesBrowser.width(browserWidth - (browserWidth % 237));
|
||||
const $seriesQuickSwitch = $switch.closest('.series-quick-switch');
|
||||
|
||||
const isRight = $seriesQuickSwitch.hasClass('right');
|
||||
const switchOffsetLeft = $switch.offset().left;
|
||||
const switchOuterWidth = $switch.outerWidth();
|
||||
|
||||
let browserWidth;
|
||||
if (isRight) {
|
||||
browserWidth = $(window).width() - switchOffsetLeft;
|
||||
} else {
|
||||
browserWidth = switchOffsetLeft + switchOuterWidth;
|
||||
}
|
||||
|
||||
$seriesBrowser.width(browserWidth - (browserWidth % 240));
|
||||
|
||||
const $quickSwitch = instance.$('.series-quick-switch');
|
||||
if ($quickSwitch.is(':hover')) {
|
||||
|
||||
@ -87,7 +87,7 @@
|
||||
|
||||
.series-browser
|
||||
max-height: 100vh
|
||||
max-width: 711px
|
||||
max-width: 720px
|
||||
right: 0
|
||||
transform-origin(calc(100% - 1em) calc(1em + 15px))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user