Skip to content

Commit

Permalink
Fix upable to paint in 2D editor
Browse files Browse the repository at this point in the history
Fix hover issue with menu item side menu
  • Loading branch information
JannisX11 committed May 27, 2023
1 parent a275be5 commit 64caffa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion js/interface/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,14 @@ class Menu {
node.addClass('hybrid_parent');
let more_button = Interface.createElement('div', {class: 'menu_more_button'}, Blockbench.getIconNode('more_horiz'));
node.append(more_button);
$(more_button).mouseenter(e => {
more_button.addEventListener('mouseenter', e => {
scope.hover(node.get(0), e, true);
})
more_button.addEventListener('mouseleave', e => {
if (node.is(':hover') && !childlist.is(':hover')) {
scope.hover(node, e);
}
})
}
} else {
node.addClass('parent');
Expand Down
4 changes: 3 additions & 1 deletion js/texturing/painter.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,9 @@ const Painter = {
let softness = BarItems.slider_brush_softness.get()/100;
let b_opacity = BarItems.slider_brush_opacity.get()/255;
let tool = Toolbox.selected;
let matrix_id = Painter.current.element.uuid + Painter.current.face;
let matrix_id = Painter.current.element
? (Painter.current.element.uuid + Painter.current.face)
: Painter.current.face;

ctx.clip()
if (Painter.current.element instanceof Mesh) {
Expand Down

0 comments on commit 64caffa

Please sign in to comment.