mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 21:28:12 +00:00
[Fixed Position] Allow adding elements
Allow adding of elements (without any element-specific properties beyond type.) WTD-880.
This commit is contained in:
@ -16,7 +16,14 @@ define(
|
||||
* Add a new visual element to this view.
|
||||
*/
|
||||
add: function (type) {
|
||||
window.alert("Placeholder. Should add a " + type + ".");
|
||||
configuration.elements = configuration.elements || [];
|
||||
configuration.elements.push({
|
||||
x: configuration.elements.length,
|
||||
y: configuration.elements.length,
|
||||
width: 2,
|
||||
height: 1,
|
||||
type: type
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user