mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 13:48: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:
@ -1,2 +1,4 @@
|
|||||||
<div ng-style="{ background: ngModel.fill }">
|
<div ng-style="{ background: ngModel.fill }"
|
||||||
|
style="width: 100%; height: 100%;">
|
||||||
|
???
|
||||||
</div>
|
</div>
|
@ -1,3 +1,4 @@
|
|||||||
<div ng-style="{ background: ngModel.fill }">
|
<div ng-style="{ background: ngModel.fill }"
|
||||||
|
style="width: 100%; height: 100%">
|
||||||
...line...
|
...line...
|
||||||
</div>
|
</div>
|
@ -1,3 +1,4 @@
|
|||||||
<div ng-style="{ background: ngModel.fill }">
|
<div ng-style="{ background: ngModel.fill }"
|
||||||
|
style="width: 100%; height: 100%">
|
||||||
{{ngModel.text}}
|
{{ngModel.text}}
|
||||||
</div>
|
</div>
|
@ -16,7 +16,14 @@ define(
|
|||||||
* Add a new visual element to this view.
|
* Add a new visual element to this view.
|
||||||
*/
|
*/
|
||||||
add: function (type) {
|
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*/
|
/*global define*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
['./TelemetryProxy'],
|
['./TelemetryProxy', './ElementProxy'],
|
||||||
function (TelemetryProxy) {
|
function (TelemetryProxy, ElementProxy) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"fixed.telemetry": TelemetryProxy
|
"fixed.telemetry": TelemetryProxy,
|
||||||
|
"fixed.line": ElementProxy,
|
||||||
|
"fixed.box": ElementProxy,
|
||||||
|
"fixed.image": ElementProxy,
|
||||||
|
"fixed.text": ElementProxy
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
Reference in New Issue
Block a user