mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:17:43 +02:00
Remove dead code and cleanup JS styling for entity properties redesign
This commit is contained in:
parent
a020a09e8c
commit
a787f55506
2 changed files with 6 additions and 45 deletions
|
@ -1411,29 +1411,6 @@ th#entity-hasScript {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
#properties-base #div-property-locked {
|
|
||||||
position: absolute;
|
|
||||||
top: 6px;
|
|
||||||
right: 140px;
|
|
||||||
display: table-cell;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
#properties-base #div-property-visible {
|
|
||||||
position: absolute;
|
|
||||||
top: 26px;
|
|
||||||
right: 20px;
|
|
||||||
display: table-cell;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
#properties-base #div-property-locked label,
|
|
||||||
#properties-base #div-property-visible label {
|
|
||||||
background-position-y: 1px;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#properties-base .checkbox label span {
|
#properties-base .checkbox label span {
|
||||||
font-family: HiFi-Glyphs;
|
font-family: HiFi-Glyphs;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
|
|
@ -1116,7 +1116,6 @@ const GROUPS = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Clone Lifetime",
|
label: "Clone Lifetime",
|
||||||
indentedLabel: true,
|
|
||||||
type: "number",
|
type: "number",
|
||||||
unit: "s",
|
unit: "s",
|
||||||
propertyID: "cloneLifetime",
|
propertyID: "cloneLifetime",
|
||||||
|
@ -1124,21 +1123,18 @@ const GROUPS = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Clone Limit",
|
label: "Clone Limit",
|
||||||
indentedLabel: true,
|
|
||||||
type: "number",
|
type: "number",
|
||||||
propertyID: "cloneLimit",
|
propertyID: "cloneLimit",
|
||||||
showPropertyRule: { "cloneable": "true" },
|
showPropertyRule: { "cloneable": "true" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Clone Dynamic",
|
label: "Clone Dynamic",
|
||||||
indentedLabel: true,
|
|
||||||
type: "bool",
|
type: "bool",
|
||||||
propertyID: "cloneDynamic",
|
propertyID: "cloneDynamic",
|
||||||
showPropertyRule: { "cloneable": "true" },
|
showPropertyRule: { "cloneable": "true" },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Clone Avatar Entity",
|
label: "Clone Avatar Entity",
|
||||||
indentedLabel: true,
|
|
||||||
type: "bool",
|
type: "bool",
|
||||||
propertyID: "cloneAvatarEntity",
|
propertyID: "cloneAvatarEntity",
|
||||||
showPropertyRule: { "cloneable": "true" },
|
showPropertyRule: { "cloneable": "true" },
|
||||||
|
@ -1426,7 +1422,7 @@ function debugPrint(message) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function createElementFromHTML(htmlString) {
|
function createElementFromHTML(htmlString) {
|
||||||
var elTemplate = document.createElement('template');
|
let elTemplate = document.createElement('template');
|
||||||
elTemplate.innerHTML = htmlString.trim();
|
elTemplate.innerHTML = htmlString.trim();
|
||||||
return elTemplate.content.firstChild;
|
return elTemplate.content.firstChild;
|
||||||
}
|
}
|
||||||
|
@ -1926,11 +1922,6 @@ function createVec3Property(property, elProperty) {
|
||||||
|
|
||||||
elProperty.className = propertyData.vec3Type + " fstuple";
|
elProperty.className = propertyData.vec3Type + " fstuple";
|
||||||
|
|
||||||
//let elTuple = document.createElement('div');
|
|
||||||
//elTuple.className = "tuple";
|
|
||||||
|
|
||||||
//elProperty.appendChild(elTuple);
|
|
||||||
|
|
||||||
let elInputX = createTupleNumberInput(elProperty, elementID, propertyData.subLabels[VECTOR_ELEMENTS.X_INPUT],
|
let elInputX = createTupleNumberInput(elProperty, elementID, propertyData.subLabels[VECTOR_ELEMENTS.X_INPUT],
|
||||||
propertyData.min, propertyData.max, propertyData.step);
|
propertyData.min, propertyData.max, propertyData.step);
|
||||||
let elInputY = createTupleNumberInput(elProperty, elementID, propertyData.subLabels[VECTOR_ELEMENTS.Y_INPUT],
|
let elInputY = createTupleNumberInput(elProperty, elementID, propertyData.subLabels[VECTOR_ELEMENTS.Y_INPUT],
|
||||||
|
@ -2099,9 +2090,7 @@ function createIconProperty(property, elProperty) {
|
||||||
|
|
||||||
elProperty.appendChild(elSpan);
|
elProperty.appendChild(elSpan);
|
||||||
|
|
||||||
let elResult = [];
|
return elSpan;
|
||||||
elResult[ICON_ELEMENTS.ICON] = elSpan;
|
|
||||||
return elResult;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function createTextureProperty(property, elProperty) {
|
function createTextureProperty(property, elProperty) {
|
||||||
|
@ -2164,9 +2153,6 @@ function createButtonsProperty(property, elProperty, elLabel) {
|
||||||
elProperty.className = "text";
|
elProperty.className = "text";
|
||||||
|
|
||||||
let hasLabel = propertyData.label !== undefined;
|
let hasLabel = propertyData.label !== undefined;
|
||||||
if (hasLabel) {
|
|
||||||
}
|
|
||||||
|
|
||||||
if (propertyData.buttons !== undefined) {
|
if (propertyData.buttons !== undefined) {
|
||||||
addButtons(elProperty, elementID, propertyData.buttons, hasLabel);
|
addButtons(elProperty, elementID, propertyData.buttons, hasLabel);
|
||||||
}
|
}
|
||||||
|
@ -2813,9 +2799,7 @@ function createProperty(propertyData, propertyElementID, propertyName, propertyI
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'icon': {
|
case 'icon': {
|
||||||
let elIcon = createIconProperty(property, elProperty);
|
property.elSpan = createIconProperty(property, elProperty);
|
||||||
property.elSpan = elIcon[ICON_ELEMENTS.ICON];
|
|
||||||
property.elLabel = elIcon[ICON_ELEMENTS.LABEL];
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'texture': {
|
case 'texture': {
|
||||||
|
@ -2940,9 +2924,9 @@ function loaded() {
|
||||||
let elProperty = createElementFromHTML('<div style="width: 100%;"></div>');
|
let elProperty = createElementFromHTML('<div style="width: 100%;"></div>');
|
||||||
elContainer.appendChild(elProperty);
|
elContainer.appendChild(elProperty);
|
||||||
|
|
||||||
if (propertyType == 'triple') {
|
if (propertyType === 'triple') {
|
||||||
elProperty.className = 'flex-row';
|
elProperty.className = 'flex-row';
|
||||||
for (var i = 0; i < propertyData.properties.length; ++i) {
|
for (let i = 0; i < propertyData.properties.length; ++i) {
|
||||||
let innerPropertyData = propertyData.properties[i];
|
let innerPropertyData = propertyData.properties[i];
|
||||||
|
|
||||||
let elWrapper = createElementFromHTML('<div class="flex-column flex-center triple-item"><div></div></div>');
|
let elWrapper = createElementFromHTML('<div class="flex-column flex-center triple-item"><div></div></div>');
|
||||||
|
|
Loading…
Reference in a new issue