Skip to content

Commit

Permalink
fix button styling issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ishubin committed Oct 28, 2023
1 parent 75f23ac commit d74d657
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ ul.tabs li .tab.disabled, ul.tabs li .tab.disabled:hover {
border-radius: var(--control-border-radius);
text-decoration: none;
transition: background-color 0.5s ease;
box-sizing: border-box;
line-height: 1.0;
}
.btn:hover {
background: var(--faint-weak);
Expand Down
7 changes: 5 additions & 2 deletions src/ui/components/editor/ItemSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,10 @@ export default {
let dropAbove = event.clientY < bbox.top + bbox.height/2;

//searching for item index in the filtered list

let found = false;
for (let idx = 0; idx < this.filteredItems.length && !found; idx++) {
if (this.filteredItems[idx].id === overItem.id) {
found = true;
// overItem = this.filteredItems[idx - 1];
this.dragging.previewIdx = idx;
}
}
Expand All @@ -314,6 +312,11 @@ export default {
this.dragging.destinationId = overItem.id;
this.dragging.dropInside = xDiff > 35;

// if (!dropAbove && !this.dragging.dropInside) {

// }


if (xDiff < 0 && overItem.meta.ancestorIds.length > 0) {
const ancestorsBack = myMath.clamp(Math.ceil(Math.abs(xDiff / 25)), 1, overItem.meta.ancestorIds.length);
this.dragging.destinationId = overItem.meta.ancestorIds[overItem.meta.ancestorIds.length - ancestorsBack];
Expand Down

0 comments on commit d74d657

Please sign in to comment.