mirror of
https://github.com/nasa/openmct.git
synced 2025-06-21 08:39:59 +00:00
[Fixed Position] Add ability to work in pixel space
Fix code style issues per Victor's review Add toggle to work in pixel space or grid space, per the issue description. Each element stores a boolean property that determines whether or not it snaps to grid space or pixel space. Coordinates are converted between spaces on toggle, preserving the size of the element in pixels. To complete: change UI element for toggle to a checkbox.
This commit is contained in:
@ -36,10 +36,11 @@ define(
|
||||
* configuration
|
||||
* @param index the element's index within its array
|
||||
* @param {Array} elements the full array of elements
|
||||
* @param {number[]} gridSize the current layout grid size in [x,y] from
|
||||
* @augments {platform/features/layout.ElementProxy}
|
||||
*/
|
||||
function TextProxy(element, index, elements) {
|
||||
var proxy = new BoxProxy(element, index, elements);
|
||||
function TextProxy(element, index, elements, gridSize) {
|
||||
var proxy = new BoxProxy(element, index, elements, gridSize);
|
||||
|
||||
/**
|
||||
* Get and/or set the text color of this element.
|
||||
|
Reference in New Issue
Block a user