Add id to properties window

This commit is contained in:
Ryan Huffman 2014-12-12 15:27:56 -08:00
parent d1f5bf2e3c
commit 1a90a81037
3 changed files with 23 additions and 0 deletions

View file

@ -1003,6 +1003,7 @@ PropertiesTool = function(opts) {
type: 'update',
};
if (selectionManager.hasSelection()) {
data.id = selectionManager.selections[0].id;
data.properties = Entities.getEntityProperties(selectionManager.selections[0]);
data.properties.rotation = Quat.safeEulerAngles(data.properties.rotation);
}

View file

@ -70,6 +70,7 @@
};
function loaded() {
var elID = document.getElementById("property-id");
var elType = document.getElementById("property-type");
var elLocked = document.getElementById("property-locked");
var elVisible = document.getElementById("property-visible");
@ -160,6 +161,8 @@
} else {
var properties = data.properties;
elID.innerHTML = data.id;
elType.innerHTML = properties.type;
elLocked.checked = properties.locked;
@ -451,6 +454,14 @@
<col id="col-label">
<col>
</colgroup>
<tr>
<td class="label">
ID
</td>
<td>
<label id="property-id" class="selectable">asdf</label>
</td>
</tr>
<tr>
<td class="label">
Type

View file

@ -17,6 +17,17 @@ body {
user-select: none;
}
.selectable {
-webkit-touch-callout: text;
-webkit-user-select: text;
-khtml-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
cursor: text;
}
.color-box {
display: inline-block;
width: 20px;