updates
This commit is contained in:
@@ -21,8 +21,8 @@ class PhysicalPositionMenu {
|
||||
<hr />
|
||||
<h3>Physical Position vs parent</h3>
|
||||
<div class="form-row">
|
||||
<label for="node-input-physicalAspect"><i class="fa fa-map-marker"></i>Position</label>
|
||||
<select id="node-input-physicalAspect" style="width:70%;">
|
||||
<label for="node-input-positionVsParent"><i class="fa fa-map-marker"></i>Position</label>
|
||||
<select id="node-input-positionVsParent" style="width:70%;">
|
||||
<!-- optgroups will be injected -->
|
||||
</select>
|
||||
</div>
|
||||
@@ -51,7 +51,7 @@ class PhysicalPositionMenu {
|
||||
// PhysicalPosition data loader for ${nodeName}
|
||||
window.EVOLV.nodes.${nodeName}.positionMenu.loadData = function(node) {
|
||||
const data = window.EVOLV.nodes.${nodeName}.menuData.position;
|
||||
const sel = document.getElementById('node-input-physicalAspect');
|
||||
const sel = document.getElementById('node-input-positionVsParent');
|
||||
if (!sel) return;
|
||||
sel.innerHTML = '';
|
||||
(data.positionGroups||[]).forEach(grp => {
|
||||
@@ -66,7 +66,7 @@ class PhysicalPositionMenu {
|
||||
sel.appendChild(optg);
|
||||
});
|
||||
// default to “atEquipment” if not set
|
||||
sel.value = node.physicalAspect || 'atEquipment';
|
||||
sel.value = node.positionVsParent || 'atEquipment';
|
||||
};
|
||||
`;
|
||||
}
|
||||
@@ -86,8 +86,8 @@ class PhysicalPositionMenu {
|
||||
return `
|
||||
// PhysicalPosition Save injection for ${nodeName}
|
||||
window.EVOLV.nodes.${nodeName}.positionMenu.saveEditor = function(node) {
|
||||
const sel = document.getElementById('node-input-physicalAspect');
|
||||
node.physicalAspect = sel? sel.value : 'atEquipment';
|
||||
const sel = document.getElementById('node-input-positionVsParent');
|
||||
node.positionVsParent = sel? sel.value : 'atEquipment';
|
||||
return true;
|
||||
};
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user