mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 18:34:54 +02:00
Merge pull request #14310 from thoys/fix/create/tooltips-refinement
Create APP tooltip / Adressed CR comments / Regression
This commit is contained in:
commit
30ff3f676a
5 changed files with 20 additions and 34 deletions
|
@ -196,12 +196,6 @@
|
||||||
"particleRadius": {
|
"particleRadius": {
|
||||||
"tooltip": "The size of each particle."
|
"tooltip": "The size of each particle."
|
||||||
},
|
},
|
||||||
"radiusStart": {
|
|
||||||
"tooltip": ""
|
|
||||||
},
|
|
||||||
"radiusFinish": {
|
|
||||||
"tooltip": ""
|
|
||||||
},
|
|
||||||
"radiusSpread": {
|
"radiusSpread": {
|
||||||
"tooltip": "The spread in size that each particle is given, resulting in a variety of sizes."
|
"tooltip": "The spread in size that each particle is given, resulting in a variety of sizes."
|
||||||
},
|
},
|
||||||
|
@ -215,12 +209,6 @@
|
||||||
"alpha": {
|
"alpha": {
|
||||||
"tooltip": "The alpha of each particle."
|
"tooltip": "The alpha of each particle."
|
||||||
},
|
},
|
||||||
"alphaStart": {
|
|
||||||
"tooltip": ""
|
|
||||||
},
|
|
||||||
"alphaFinish": {
|
|
||||||
"tooltip": ""
|
|
||||||
},
|
|
||||||
"alphaSpread": {
|
"alphaSpread": {
|
||||||
"tooltip": "The spread in alpha that each particle is given, resulting in a variety of alphas."
|
"tooltip": "The spread in alpha that each particle is given, resulting in a variety of alphas."
|
||||||
},
|
},
|
||||||
|
@ -233,12 +221,6 @@
|
||||||
"particleSpin": {
|
"particleSpin": {
|
||||||
"tooltip": "The spin of each particle in the system."
|
"tooltip": "The spin of each particle in the system."
|
||||||
},
|
},
|
||||||
"spinStart": {
|
|
||||||
"tooltip": ""
|
|
||||||
},
|
|
||||||
"spinFinish": {
|
|
||||||
"tooltip": ""
|
|
||||||
},
|
|
||||||
"spinSpread": {
|
"spinSpread": {
|
||||||
"tooltip": "The spread in spin that each particle is given, resulting in a variety of spins."
|
"tooltip": "The spread in spin that each particle is given, resulting in a variety of spins."
|
||||||
},
|
},
|
||||||
|
@ -248,15 +230,9 @@
|
||||||
"polarStart": {
|
"polarStart": {
|
||||||
"tooltip": "The angle in deg at which particles are emitted. Starts in the entity's -z direction, and rotates around its y axis."
|
"tooltip": "The angle in deg at which particles are emitted. Starts in the entity's -z direction, and rotates around its y axis."
|
||||||
},
|
},
|
||||||
"polarFinish": {
|
|
||||||
"tooltip": ""
|
|
||||||
},
|
|
||||||
"azimuthStart": {
|
"azimuthStart": {
|
||||||
"tooltip": "The angle in deg at which particles are emitted. Starts in the entity's -z direction, and rotates around its y axis."
|
"tooltip": "The angle in deg at which particles are emitted. Starts in the entity's -z direction, and rotates around its y axis."
|
||||||
},
|
},
|
||||||
"azimuthFinish": {
|
|
||||||
"tooltip": ""
|
|
||||||
},
|
|
||||||
"lightColor": {
|
"lightColor": {
|
||||||
"tooltip": "The color of the light emitted.",
|
"tooltip": "The color of the light emitted.",
|
||||||
"jsPropertyName": "color"
|
"jsPropertyName": "color"
|
||||||
|
|
|
@ -2490,6 +2490,13 @@ var PropertiesTool = function (opts) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
HMD.displayModeChanged.connect(function() {
|
||||||
|
emitScriptEvent({
|
||||||
|
type: 'hmdActiveChanged',
|
||||||
|
hmdActive: HMD.active,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
createToolsWindow.webEventReceived.addListener(this, onWebEventReceived);
|
createToolsWindow.webEventReceived.addListener(this, onWebEventReceived);
|
||||||
|
|
||||||
webView.webEventReceived.connect(onWebEventReceived);
|
webView.webEventReceived.connect(onWebEventReceived);
|
||||||
|
|
|
@ -1598,7 +1598,7 @@ input.rename-entity {
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.createAppTooltip {
|
.create-app-tooltip {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background: #6a6a6a;
|
background: #6a6a6a;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
|
@ -1607,17 +1607,16 @@ input.rename-entity {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.createAppTooltip .createAppTooltipDescription {
|
.create-app-tooltip .create-app-tooltip-description {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.createAppTooltip .createAppTooltipJSAttribute {
|
.create-app-tooltip .create-app-tooltip-js-attribute {
|
||||||
font-family: Raleway-SemiBold;
|
font-family: Raleway-SemiBold;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,15 +58,15 @@ CreateAppTooltip.prototype = {
|
||||||
if (!TOOLTIP_DEBUG) {
|
if (!TOOLTIP_DEBUG) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
tooltipData = {tooltip: 'PLEASE SET THIS TOOLTIP'};
|
tooltipData = { tooltip: 'PLEASE SET THIS TOOLTIP' };
|
||||||
}
|
}
|
||||||
|
|
||||||
let elementRect = element.getBoundingClientRect();
|
let elementRect = element.getBoundingClientRect();
|
||||||
let elTip = document.createElement("div");
|
let elTip = document.createElement("div");
|
||||||
elTip.className = "createAppTooltip";
|
elTip.className = "create-app-tooltip";
|
||||||
|
|
||||||
let elTipDescription = document.createElement("div");
|
let elTipDescription = document.createElement("div");
|
||||||
elTipDescription.className = "createAppTooltipDescription";
|
elTipDescription.className = "create-app-tooltip-description";
|
||||||
elTipDescription.innerText = tooltipData.tooltip;
|
elTipDescription.innerText = tooltipData.tooltip;
|
||||||
elTip.appendChild(elTipDescription);
|
elTip.appendChild(elTipDescription);
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ CreateAppTooltip.prototype = {
|
||||||
|
|
||||||
if (!tooltipData.skipJSProperty) {
|
if (!tooltipData.skipJSProperty) {
|
||||||
let elTipJSAttribute = document.createElement("div");
|
let elTipJSAttribute = document.createElement("div");
|
||||||
elTipJSAttribute.className = "createAppTooltipJSAttribute";
|
elTipJSAttribute.className = "create-app-tooltip-js-attribute";
|
||||||
elTipJSAttribute.innerText = `JS Attribute: ${jsAttribute}`;
|
elTipJSAttribute.innerText = `JS Attribute: ${jsAttribute}`;
|
||||||
elTip.appendChild(elTipJSAttribute);
|
elTip.appendChild(elTipJSAttribute);
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ CreateAppTooltip.prototype = {
|
||||||
// show above when otherwise out of bounds
|
// show above when otherwise out of bounds
|
||||||
elTip.style.top = elementTop - CREATE_APP_TOOLTIP_OFFSET - elTip.clientHeight;
|
elTip.style.top = elementTop - CREATE_APP_TOOLTIP_OFFSET - elTip.clientHeight;
|
||||||
} else {
|
} else {
|
||||||
// show tooltip on below by default
|
// show tooltip below by default
|
||||||
elTip.style.top = desiredTooltipTop;
|
elTip.style.top = desiredTooltipTop;
|
||||||
}
|
}
|
||||||
if ((window.innerWidth + window.pageXOffset) < (desiredTooltipLeft + elTip.clientWidth)) {
|
if ((window.innerWidth + window.pageXOffset) < (desiredTooltipLeft + elTip.clientWidth)) {
|
||||||
|
|
|
@ -3165,8 +3165,13 @@ function loaded() {
|
||||||
} else if (data.type === 'tooltipsReply') {
|
} else if (data.type === 'tooltipsReply') {
|
||||||
createAppTooltip.setIsEnabled(!data.hmdActive);
|
createAppTooltip.setIsEnabled(!data.hmdActive);
|
||||||
createAppTooltip.setTooltipData(data.tooltips);
|
createAppTooltip.setTooltipData(data.tooltips);
|
||||||
|
} else if (data.type === 'hmdActiveChanged') {
|
||||||
|
createAppTooltip.setIsEnabled(!data.hmdActive);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Request tooltips as soon as we can process a reply:
|
||||||
|
EventBridge.emitWebEvent(JSON.stringify({ type: 'tooltipsRequest' }));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Server Script Status
|
// Server Script Status
|
||||||
|
@ -3397,6 +3402,5 @@ function loaded() {
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
EventBridge.emitWebEvent(JSON.stringify({ type: 'propertiesPageReady' }));
|
EventBridge.emitWebEvent(JSON.stringify({ type: 'propertiesPageReady' }));
|
||||||
EventBridge.emitWebEvent(JSON.stringify({ type: 'tooltipsRequest' }));
|
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue