[Fixed Position] Continue refactoring controller

Continue refactoring Fixed Position controller for
selection support, WTD-879.
This commit is contained in:
Victor Woeltjen 2015-02-18 15:11:52 -08:00
parent bf36141e91
commit 466a169562

View File

@ -79,6 +79,14 @@ define(
// Decorate an element for display
function makeProxyElement(element) {
// var ElementProxy = ElementProxies[element.type],
// e = new ElementProxy(element);
// e.style = convertPosition(element);
element = Object.create(element);
// Provide a displayable position (convert from grid to px)
element.style = convertPosition(element);
// Template names are same as type names, presently
element.template = element.type;
return element; // TODO: Use proxy!
}
@ -189,6 +197,27 @@ define(
refreshCellStyles();
}
},
/**
* Get an array of elements in this panel, decorated for
* display.
* @returns {Array} elements in this panel
*/
getDecoratedElements: function () {
return elementProxies;
},
/**
* Set the active user selection in this view.
* @param element the element to select
*/
select: function (element) {
selection.select(element);
},
/**
* Clear the current user selection.
*/
clearSelection: function () {
selection.deselect();
},
/**
* Start a drag gesture to move/resize a frame.
*