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:
parent
f46e3b656b
commit
c8a5c507bc
1 changed files with 10 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue