widget-position-ext.js revision 35608f53407f28b0868c7e1b0265570ef7abfc05
/**
* @module widget-position-ext
*/
var L = Y.Lang,
ALIGN = "align",
BINDUI = "bindUI",
SYNCUI = "syncUI",
OFFSET_WIDTH = "offsetWidth",
OFFSET_HEIGHT = "offsetHeight",
VIEWPORT_REGION = "viewportRegion",
AlignChange = "alignChange";
/**
* @class WidgetPositionExt
*/
function PositionExt(config) {
}
PositionExt.ATTRS = {
align: {
value:null
},
center: {
return this._setAlignCenter(val);
},
value:false
}
};
PositionExt.prototype = {
_syncUIPosExtras : function() {
},
_bindUIPosExtras : function() {
},
_setAlignCenter : function(val) {
if (val) {
});
}
return val;
},
_onAlignChange : function(e) {
this._uiSetAlign(e.newVal);
},
_uiSetAlign: function (val) {
if (val) {
}
},
Y.fail("align: Invalid Points Arguments");
return;
}
if (!node) {
} else {
if (node) {
}
}
if (nodeRegion) {
// TODO: Optimize KWeight - Would lookup table help?
switch (nodePoint) {
case PositionExt.TL:
break;
case PositionExt.TR:
break;
case PositionExt.BL:
break;
case PositionExt.BR:
break;
case PositionExt.CT:
break;
case PositionExt.CB:
break;
case PositionExt.CL:
break;
case PositionExt.CR:
break;
case PositionExt.CC:
xy = [nodeRegion.left + Math.floor(nodeRegion.width/2), nodeRegion.top + Math.floor(nodeRegion.height/2), widgetPoint];
break;
default:
break;
}
if (xy) {
}
}
},
_align : function(widgetPoint, x, y) {
var widgetNode = this._posNode,
xy;
switch (widgetPoint) {
case PositionExt.TL:
xy = [x, y];
break;
case PositionExt.TR:
break;
case PositionExt.BL:
break;
case PositionExt.BR:
break;
case PositionExt.CT:
break;
case PositionExt.CB:
break;
case PositionExt.CL:
break;
case PositionExt.CR:
break;
case PositionExt.CC:
break;
default:
break;
}
if (xy) {
}
},
/**
* Centers the container in the viewport, or if an element is passed in,
* to the element.
*
* @method center
*/
}
};