Skip to content

Commit

Permalink
Merge branch 'patch' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisX11 committed Nov 2, 2023
2 parents 734f280 + eba0c09 commit 4b1ae74
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
7 changes: 5 additions & 2 deletions css/dialogs.css
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,10 @@ dialog#edit_bedrock_binding > .dialog_wrapper > .dialog_content {
background-color: transparent;
}
#bar_item_list li {
padding: 4px;
padding: 4px;
height: 32px;
display: flex;
gap: 8px;
}
#bar_item_list li:hover {
color: var(--color-light);
Expand All @@ -1525,7 +1528,7 @@ dialog#edit_bedrock_binding > .dialog_wrapper > .dialog_content {
height: 26px;
vertical-align: text-top;
}
#bar_item_list li:not(:hover) div.icon_wrapper.add, #bar_item_list li:hover div.icon_wrapper.normal {
#bar_item_list li:not(:hover) div.icon_wrapper.add, #bar_item_list li:hover > .icon {
display: none;
}
#bar_items_current {
Expand Down
2 changes: 1 addition & 1 deletion js/display_mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -2146,7 +2146,7 @@ BARS.defineActions(function() {
Project.model_3d.position.set(-20, 21, 0);
Project.model_3d.rotation.set(
Math.degToRad(-95),
Math.degToRad(44),
Math.degToRad(45),
Math.degToRad(115),
'ZYX'
);
Expand Down
1 change: 1 addition & 0 deletions js/interface/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class Menu {
this.onClose = this.options.onClose;
}
hover(node, event, expand) {
if (node.classList.contains('focused')) return;
if (event) event.stopPropagation()
$(open_menu.node).find('li.focused').removeClass('focused')
$(open_menu.node).find('li.opened').removeClass('opened')
Expand Down
3 changes: 1 addition & 2 deletions js/io/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,7 @@ new Property(ModelProject, 'array', 'timeline_setups', {
condition: () => Format.animation_mode,
});
new Property(ModelProject, 'object', 'unhandled_root_fields', {
exposed: false,
default: {}
exposed: false
});


Expand Down
6 changes: 6 additions & 0 deletions js/util/property.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Property {
case 'number': this.default = 0; break;
case 'boolean': this.default = false; break;
case 'array': this.default = []; break;
case 'object': this.default = {}; break;
case 'instance': this.default = null; break;
case 'vector': this.default = [0, 0, 0]; break;
case 'vector2': this.default = [0, 0]; break;
Expand All @@ -31,6 +32,7 @@ class Property {
case 'number': this.isNumber = true; break;
case 'boolean': this.isBoolean = true; break;
case 'array': this.isArray = true; break;
case 'object': this.isObject = true; break;
case 'instance': this.isInstance = true; break;
case 'vector': this.isVector = true; break;
case 'vector2': this.isVector2 = true; break;
Expand Down Expand Up @@ -68,6 +70,10 @@ class Property {
getDefault(instance) {
if (typeof this.default == 'function') {
return this.default(instance);
} else if (this.isArray) {
return this.default.slice();
} else if (this.isObject) {
return Object.keys(this.default).length ? JSON.parse(JSON.stringify(this.default)) : {};
} else {
return this.default;
}
Expand Down

0 comments on commit 4b1ae74

Please sign in to comment.