mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 13:49:46 +02:00
Fix hiding of properties in Create
This commit is contained in:
parent
20766da624
commit
556aec9412
2 changed files with 19 additions and 7 deletions
|
@ -1559,7 +1559,9 @@ input.rename-entity {
|
||||||
|
|
||||||
.container > label {
|
.container > label {
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
width: 200px;
|
width: 160px;
|
||||||
|
min-width: 160px;
|
||||||
|
max-width: 160px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container > div.checkbox {
|
.container > div.checkbox {
|
||||||
|
@ -1650,3 +1652,11 @@ input.number-slider {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.spacemode-hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#placeholder-property-type {
|
||||||
|
min-width: 0px;
|
||||||
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ const ICON_FOR_TYPE = {
|
||||||
|
|
||||||
const DEGREES_TO_RADIANS = Math.PI / 180.0;
|
const DEGREES_TO_RADIANS = Math.PI / 180.0;
|
||||||
|
|
||||||
const NO_SELECTION = "w";
|
const NO_SELECTION = ",";
|
||||||
|
|
||||||
const PROPERTY_SPACE_MODE = {
|
const PROPERTY_SPACE_MODE = {
|
||||||
ALL: 0,
|
ALL: 0,
|
||||||
|
@ -1244,8 +1244,9 @@ const GROUPS = [
|
||||||
showPropertyRule: { "collisionless": "false" },
|
showPropertyRule: { "collisionless": "false" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Collision sound URL",
|
label: "Collision Sound",
|
||||||
type: "string",
|
type: "string",
|
||||||
|
placeholder: "URL",
|
||||||
propertyID: "collisionSoundURL",
|
propertyID: "collisionSoundURL",
|
||||||
showPropertyRule: { "collisionless": "false" },
|
showPropertyRule: { "collisionless": "false" },
|
||||||
},
|
},
|
||||||
|
@ -1500,7 +1501,7 @@ function disableProperties() {
|
||||||
|
|
||||||
function showPropertyElement(propertyID, show) {
|
function showPropertyElement(propertyID, show) {
|
||||||
let elProperty = properties[propertyID].elContainer;
|
let elProperty = properties[propertyID].elContainer;
|
||||||
elProperty.style.display = show ? "flex" : "none";
|
elProperty.style.display = show ? "" : "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetProperties() {
|
function resetProperties() {
|
||||||
|
@ -1622,10 +1623,11 @@ function updateVisibleSpaceModeProperties() {
|
||||||
if (properties.hasOwnProperty(propertyID)) {
|
if (properties.hasOwnProperty(propertyID)) {
|
||||||
let property = properties[propertyID];
|
let property = properties[propertyID];
|
||||||
let propertySpaceMode = property.spaceMode;
|
let propertySpaceMode = property.spaceMode;
|
||||||
if (propertySpaceMode !== PROPERTY_SPACE_MODE.ALL) {
|
let elProperty = properties[propertyID].elContainer;
|
||||||
showPropertyElement(propertyID, propertySpaceMode === currentSpaceMode);
|
if (propertySpaceMode !== PROPERTY_SPACE_MODE.ALL && propertySpaceMode !== currentSpaceMode) {
|
||||||
|
elProperty.classList.add('spacemode-hidden');
|
||||||
} else {
|
} else {
|
||||||
showPropertyElement(propertyID, true);
|
elProperty.classList.remove('spacemode-hidden');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue