1
0
Fork 0

Canvas: Fix placing existing canvas on window.

- Canvas window placements now use 'id' instead of 'index'...
 - Provide Dialog class for backwards compatibilty (but print a
   warning that it will be removed)
This commit is contained in:
Thomas Geymayer 2013-07-20 18:03:18 +02:00
parent f46e3b656b
commit c8a5c507bc

View file

@ -71,7 +71,7 @@ var Window = {
if( !isa(canvas_, canvas.Canvas) )
return debug.warn("Not a canvas.Canvas");
canvas_.addPlacement({type: "window", index: me._node.getIndex()});
canvas_.addPlacement({type: "window", "id": me.get("id")});
me['_canvas'] = canvas_;
},
# Get the displayed canvas
@ -214,3 +214,12 @@ var Window = {
});
}
};
# Provide old 'Dialog' for backwards compatiblity (should be removed for 3.0)
var Dialog = {
new: func(size, type = nil, id = nil)
{
debug.warn("'canvas.Dialog' is deprectated! (use canvas.Window instead)");
return Window.new(size, type, id);
}
};