[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:
Aaron Doubek-Kraft
2017-06-28 12:37:14 -07:00
parent 825f50262c
commit b9ab97eb7f
13 changed files with 178 additions and 36 deletions

View File

@ -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.