Fixes to new masonry right-click selection.

This commit is contained in:
mateuswetah 2022-08-08 11:33:25 -03:00
parent ee74e63c8f
commit 3e747d502f
2 changed files with 10 additions and 5 deletions

View File

@ -327,7 +327,9 @@
:class="{
'selected-masonry-item': getSelectedItemChecked(item.id) == true
}"
class="tainacan-masonry-item">
class="tainacan-masonry-item"
@click.left="onClickItem($event, item)"
@click.right="onRightClickItem($event, item)">
<!-- Checkbox -->
<!-- TODO: Remove v-if="collectionId" from this element when the bulk edit in repository is done -->
<div
@ -359,8 +361,6 @@
:style="{
'padding-left': !collectionId || !($adminOptions.itemsSingleSelectionMode || $adminOptions.itemsMultipleSelectionMode || (collection && collection.current_user_can_bulk_edit)) || $adminOptions.itemsSearchSelectionMode ? '0 !important' : (isOnAllItemsTabs ? '0.5em' : '1em')
}"
@click.left="onClickItem($event, item)"
@click.right="onRightClickItem($event, item)"
class="metadata-title">
<p>
<span
@ -383,8 +383,6 @@
<!-- Thumbnail -->
<blur-hash-image
@click.left="onClickItem($event, item)"
@click.right="onRightClickItem($event, item)"
v-if="item.thumbnail != undefined"
class="tainacan-masonry-item-thumbnail"
:width="$thumbHelper.getWidth(item['thumbnail'], shouldUseLegacyMasonyCols ? 'tainacan-medium-full' : 'tainacan-large-full', 280)"
@ -1727,6 +1725,10 @@ export default {
this.clearContextMenu();
},
onClickItem($event, item) {
if ($event && $event.target && ($event.target.className == 'check' || $event.target.tagName == 'INPUT') )
return;
if ($event.ctrlKey) {
this.setSelectedItemChecked(item.id);
} else if ($event.shiftKey) {

View File

@ -7,12 +7,14 @@
flex-grow: 1;
flex-shrink: 1;
justify-content: space-evenly;
list-style: none;
animation-name: appear;
animation-duration: 0.5s;
&:not(.tainacan-masonry-container--legacy){
&>li,
&>.tainacan-masonry-grid-sizer {
list-style-type: none;
width: calc(14.285% - 25px);
@media screen and (max-width: 2560px) {
@ -38,6 +40,7 @@
&.tainacan-masonry-container--legacy {
&>li,
&>.tainacan-masonry-grid-sizer {
list-style-type: none;
width: calc(14.285% - 25px);
@media screen and (max-width: 1920px) {