[Fixed Position] Begin updating controller

Begin updating controller to expose handles for dragging,
resizing elements in fixed position view. WTD-882.
This commit is contained in:
Victor Woeltjen
2015-02-24 10:33:36 -08:00
parent b871e0da91
commit abad8df135
4 changed files with 132 additions and 6 deletions

View File

@@ -1,8 +1,8 @@
/*global define*/
define(
['./AccessorMutator'],
function (AccessorMutator) {
['./AccessorMutator', './ResizeHandle'],
function (AccessorMutator, ResizeHandle) {
"use strict";
// Index deltas for changes in order
@@ -29,6 +29,8 @@ define(
* @param {Array} elements the full array of elements
*/
function ElementProxy(element, index, elements) {
var handles = [ new ResizeHandle(element, 1, 1) ];
return {
/**
* The element as stored in the view configuration.
@@ -97,6 +99,13 @@ define(
if (elements[index] === element) {
elements.splice(index, 1);
}
},
/**
* Get handles to control specific features of this element,
* e.g. corner size.
*/
handles: function () {
return handles;
}
};
}