mirror of
https://github.com/nasa/openmct.git
synced 2024-12-29 17:38:53 +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:
parent
6fca03521b
commit
f1a8e84a93
@ -1,2 +1,4 @@
|
||||
<div ng-style="{ background: ngModel.fill }">
|
||||
<div ng-style="{ background: ngModel.fill }"
|
||||
style="width: 100%; height: 100%;">
|
||||
???
|
||||
</div>
|
@ -1,3 +1,4 @@
|
||||
<div ng-style="{ background: ngModel.fill }">
|
||||
<div ng-style="{ background: ngModel.fill }"
|
||||
style="width: 100%; height: 100%">
|
||||
...line...
|
||||
</div>
|
@ -1,3 +1,4 @@
|
||||
<div ng-style="{ background: ngModel.fill }">
|
||||
<div ng-style="{ background: ngModel.fill }"
|
||||
style="width: 100%; height: 100%">
|
||||
{{ngModel.text}}
|
||||
</div>
|
@ -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
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -1,12 +1,16 @@
|
||||
/*global define*/
|
||||
|
||||
define(
|
||||
['./TelemetryProxy'],
|
||||
function (TelemetryProxy) {
|
||||
['./TelemetryProxy', './ElementProxy'],
|
||||
function (TelemetryProxy, ElementProxy) {
|
||||
"use strict";
|
||||
|
||||
return {
|
||||
"fixed.telemetry": TelemetryProxy
|
||||
"fixed.telemetry": TelemetryProxy,
|
||||
"fixed.line": ElementProxy,
|
||||
"fixed.box": ElementProxy,
|
||||
"fixed.image": ElementProxy,
|
||||
"fixed.text": ElementProxy
|
||||
};
|
||||
}
|
||||
);
|
Loading…
Reference in New Issue
Block a user