mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into 20116_nitpick_v1.2
This commit is contained in:
commit
f01b31e092
5 changed files with 45 additions and 17 deletions
|
@ -337,6 +337,13 @@ void AudioMixerClientData::removeAgentAvatarAudioStream() {
|
|||
|
||||
if (it != _audioStreams.end()) {
|
||||
_audioStreams.erase(it);
|
||||
|
||||
// Clear mixing structures so that they get recreated with up to date
|
||||
// data if the stream comes back
|
||||
setHasReceivedFirstMix(false);
|
||||
_streams.skipped.clear();
|
||||
_streams.inactive.clear();
|
||||
_streams.active.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -916,7 +916,7 @@ div.refresh input[type="button"] {
|
|||
}
|
||||
.draggable-number div {
|
||||
height: 28px;
|
||||
width: 92px;
|
||||
width: 124px;
|
||||
}
|
||||
.draggable-number.text {
|
||||
display: inline-block;
|
||||
|
@ -929,6 +929,7 @@ div.refresh input[type="button"] {
|
|||
height: 28px;
|
||||
width: 100%;
|
||||
line-height: 2;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.draggable-number.text:hover {
|
||||
cursor: ew-resize;
|
||||
|
@ -944,12 +945,12 @@ div.refresh input[type="button"] {
|
|||
cursor: default;
|
||||
}
|
||||
.draggable-number.left-arrow {
|
||||
top: -5px;
|
||||
top: 3px;
|
||||
left: 0px;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.draggable-number.right-arrow {
|
||||
top: -5px;
|
||||
top: 3px;
|
||||
right: 0px;
|
||||
}
|
||||
.draggable-number input[type=number] {
|
||||
|
@ -971,14 +972,14 @@ div.refresh input[type="button"] {
|
|||
left: 12px;
|
||||
}
|
||||
.draggable-number.fstuple + .draggable-number.fstuple {
|
||||
padding-left: 28px;
|
||||
margin-left: 28px;
|
||||
}
|
||||
.draggable-number.fstuple input {
|
||||
right: -10px;
|
||||
}
|
||||
.draggable-number.fstuple .sublabel {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
top: 6px;
|
||||
left: -16px;
|
||||
font-family: FiraSans-SemiBold;
|
||||
font-size: 15px;
|
||||
|
|
|
@ -309,6 +309,9 @@ For usage and examples: colpick.com/plugin
|
|||
},
|
||||
// Fix the values if the user enters a negative or high value
|
||||
fixHSB = function (hsb) {
|
||||
hsb.h = isNaN(hsb.h) ? 0 : hsb.h;
|
||||
hsb.s = isNaN(hsb.s) ? 0 : hsb.s;
|
||||
hsb.b = isNaN(hsb.b) ? 0 : hsb.b;
|
||||
return {
|
||||
h: Math.min(360, Math.max(0, hsb.h)),
|
||||
s: Math.min(100, Math.max(0, hsb.s)),
|
||||
|
@ -316,6 +319,9 @@ For usage and examples: colpick.com/plugin
|
|||
};
|
||||
},
|
||||
fixRGB = function (rgb) {
|
||||
rgb.r = isNaN(rgb.r) ? 0 : rgb.r;
|
||||
rgb.g = isNaN(rgb.g) ? 0 : rgb.g;
|
||||
rgb.b = isNaN(rgb.b) ? 0 : rgb.b;
|
||||
return {
|
||||
r: Math.min(255, Math.max(0, rgb.r)),
|
||||
g: Math.min(255, Math.max(0, rgb.g)),
|
||||
|
|
|
@ -23,6 +23,20 @@ function DraggableNumber(min, max, step, decimals, dragStart, dragEnd) {
|
|||
}
|
||||
|
||||
DraggableNumber.prototype = {
|
||||
showInput: function() {
|
||||
this.elText.style.visibility = "hidden";
|
||||
this.elLeftArrow.style.visibility = "hidden";
|
||||
this.elRightArrow.style.visibility = "hidden";
|
||||
this.elInput.style.opacity = 1;
|
||||
},
|
||||
|
||||
hideInput: function() {
|
||||
this.elText.style.visibility = "visible";
|
||||
this.elLeftArrow.style.visibility = "visible";
|
||||
this.elRightArrow.style.visibility = "visible";
|
||||
this.elInput.style.opacity = 0;
|
||||
},
|
||||
|
||||
mouseDown: function(event) {
|
||||
if (event.target === this.elText) {
|
||||
this.initialMouseEvent = event;
|
||||
|
@ -36,8 +50,8 @@ DraggableNumber.prototype = {
|
|||
if (event.target === this.elText && this.initialMouseEvent) {
|
||||
let dx = event.clientX - this.initialMouseEvent.clientX;
|
||||
if (Math.abs(dx) <= DELTA_X_FOCUS_THRESHOLD) {
|
||||
this.elInput.style.visibility = "visible";
|
||||
this.elText.style.visibility = "hidden";
|
||||
this.showInput();
|
||||
this.elInput.focus();
|
||||
}
|
||||
this.initialMouseEvent = null;
|
||||
}
|
||||
|
@ -125,9 +139,8 @@ DraggableNumber.prototype = {
|
|||
this.setValue(this.elInput.value);
|
||||
},
|
||||
|
||||
inputBlur: function() {
|
||||
this.elInput.style.visibility = "hidden";
|
||||
this.elText.style.visibility = "visible";
|
||||
inputBlur: function(ev) {
|
||||
this.hideInput();
|
||||
},
|
||||
|
||||
initialize: function() {
|
||||
|
@ -171,13 +184,14 @@ DraggableNumber.prototype = {
|
|||
if (this.step !== undefined) {
|
||||
this.elInput.setAttribute("step", this.step);
|
||||
}
|
||||
this.elInput.style.visibility = "hidden";
|
||||
this.elInput.style.opacity = 0;
|
||||
this.elInput.addEventListener("change", this.onInputChange);
|
||||
this.elInput.addEventListener("blur", this.onInputBlur);
|
||||
this.elInput.addEventListener("focus", this.showInput.bind(this));
|
||||
|
||||
this.elText.appendChild(this.elLeftArrow);
|
||||
this.elText.appendChild(this.elInput);
|
||||
this.elText.appendChild(this.elRightArrow);
|
||||
this.elDiv.appendChild(this.elLeftArrow);
|
||||
this.elDiv.appendChild(this.elInput);
|
||||
this.elDiv.appendChild(this.elRightArrow);
|
||||
this.elDiv.appendChild(this.elText);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -197,7 +197,7 @@ const GROUPS = [
|
|||
multiplier: DEGREES_TO_RADIANS,
|
||||
decimals: 2,
|
||||
unit: "deg",
|
||||
propertyID: "keyLight.direction.x",
|
||||
propertyID: "keyLight.direction.y",
|
||||
showPropertyRule: { "keyLightMode": "enabled" },
|
||||
},
|
||||
{
|
||||
|
@ -206,7 +206,7 @@ const GROUPS = [
|
|||
multiplier: DEGREES_TO_RADIANS,
|
||||
decimals: 2,
|
||||
unit: "deg",
|
||||
propertyID: "keyLight.direction.y",
|
||||
propertyID: "keyLight.direction.x",
|
||||
showPropertyRule: { "keyLightMode": "enabled" },
|
||||
},
|
||||
{
|
||||
|
@ -2149,7 +2149,7 @@ function createTupleNumberInput(property, subLabel) {
|
|||
propertyData.decimals, dragStartFunction, dragEndFunction);
|
||||
elDraggableNumber.elInput.setAttribute("id", elementID);
|
||||
elDraggableNumber.elDiv.className += " fstuple";
|
||||
elDraggableNumber.elText.insertBefore(elLabel, elDraggableNumber.elLeftArrow);
|
||||
elDraggableNumber.elDiv.insertBefore(elLabel, elDraggableNumber.elLeftArrow);
|
||||
|
||||
return elDraggableNumber;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue