Merge branch 'master' of https://github.com/highfidelity/hifi into menuGroups

This commit is contained in:
Brad Hefta-Gaub 2016-01-11 09:09:37 -08:00
commit 3e05d95478
3 changed files with 21 additions and 3 deletions

View file

@ -13,6 +13,12 @@
SpatiallyNestableWeakPointer AssignmentParentFinder::find(QUuid parentID, bool& success) const {
SpatiallyNestableWeakPointer parent;
if (parentID.isNull()) {
success = true;
return parent;
}
// search entities
parent = _tree->findEntityByEntityItemID(parentID);
if (parent.expired()) {

View file

@ -1,4 +1,4 @@
<!-- Copyright 2015 High Fidelity, Inc. -->
<!-- Copyright 2015 High Fidelity, Inc. -->
<html>
<head>
<meta charset="utf-8"/>
@ -14,7 +14,7 @@
body {
background: white;
width: 839px;
width: 100%;
overflow-x: hidden;
}
@ -181,7 +181,7 @@
function overrideBodyWidth() {
document.body.style.width = "100%";
<!-- Force reset layout after body resized-->
container.style.width = "0";
<!-- container.style.width = "0"; -->
}
//]]></script>

View file

@ -51,6 +51,16 @@ Hifi.VrMenu {
VrMenuView {
property int menuDepth: root.models.length - 1
model: root.models[menuDepth]
function fit(position, size, maxposition) {
var padding = 8;
if (position < padding) {
position = padding;
} else if (position + size + padding > maxposition) {
position = maxposition - (size + padding);
}
return position;
}
Component.onCompleted: {
if (menuDepth === 0) {
@ -61,6 +71,8 @@ Hifi.VrMenu {
x = lastColumn.x + 64;
y = lastMousePosition.y - height / 2;
}
x = fit(x, width, parent.width);
y = fit(y, height, parent.height);
}
onSelected: {