Skip to content

Commit

Permalink
Use popovers to show a bigger picture of the part image.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbtronics committed Feb 6, 2020
1 parent 7434234 commit 6cb34ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 0 additions & 6 deletions assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,6 @@ btn-xs
margin-right: auto;
}

.hoverpic:hover {
transform: scale(6);
background: white;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.darkmode--activated .hoverpic:hover {
background: black;
}
Expand Down
11 changes: 9 additions & 2 deletions assets/ts_src/event_listeners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,15 @@ $(document).on("ajaxUI:reload ajaxUI:start", function () {
* Load the higher resolution version of hover pictures.
*/
$(document).on("ajaxUI:reload ajaxUI:start ajaxUI:dt_loaded", function () {
$(".hoverpic[data-thumbnail]").mouseenter(function() {
$(this).attr('src', $(this).data('thumbnail'));

$('.hoverpic[data-thumbnail]').popover({
html: true,
trigger: 'hover',
placement: 'right',
container: 'body',
content: function () {
return '<img class="img-fluid" src="' + $(this).data('thumbnail') + '" />';
}
});
});

Expand Down

0 comments on commit 6cb34ed

Please sign in to comment.