mirror of
https://github.com/nasa/openmct.git
synced 2025-06-05 17:01:41 +00:00
[Fixed Position] Continue refactoring controller
Continue refactoring Fixed Position controller for selection support, WTD-879.
This commit is contained in:
parent
bf36141e91
commit
466a169562
@ -79,6 +79,14 @@ define(
|
|||||||
|
|
||||||
// Decorate an element for display
|
// Decorate an element for display
|
||||||
function makeProxyElement(element) {
|
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!
|
return element; // TODO: Use proxy!
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,6 +197,27 @@ define(
|
|||||||
refreshCellStyles();
|
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.
|
* Start a drag gesture to move/resize a frame.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user