[Fixed Position] Allow adding elements

Allow adding of elements (without any element-specific
properties beyond type.) WTD-880.
This commit is contained in:
Victor Woeltjen
2015-02-20 11:53:50 -08:00
parent 6fca03521b
commit f1a8e84a93
5 changed files with 22 additions and 7 deletions

View File

@ -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
});
}
};
}