[Selection] Sketch in overlay manager

This commit is contained in:
Victor Woeltjen
2016-09-25 18:22:07 -07:00
parent 407550e6f4
commit 9a5bda4917

24
src/ui/OverlayManager.js Normal file
View File

@ -0,0 +1,24 @@
define(['zepto'], function ($) {
function OverlayManager(bodyElement) {
this.$body = $(bodyElement);
}
OverlayManager.prototype.show = function (view, x, y) {
var $container = $('<div></div>');
x = x || 0;
y = y || 0;
$container.attr('left', x + 'px');
$container.attr('top', y + 'px');
view.show($container[0]);
return function () {
$container.remove();
view.destroy();
};
};
return OverlayManager;
});