feat: Stage::focus
This commit is contained in:
parent
5b6e399c30
commit
8397c9ab5e
|
@ -72,7 +72,6 @@ export class Stage extends decorate(Container) {
|
|||
// Add to new parent (if any) and focus.
|
||||
if (parent) {
|
||||
parent.appendChild(this.element);
|
||||
this.element.focus();
|
||||
}
|
||||
// Recalculate size and ratio.
|
||||
this.onWindowResize();
|
||||
|
@ -116,6 +115,10 @@ export class Stage extends decorate(Container) {
|
|||
];
|
||||
}
|
||||
|
||||
focus() {
|
||||
this.element.focus();
|
||||
}
|
||||
|
||||
onCameraChanged(oldCamera) {
|
||||
if (oldCamera) {
|
||||
oldCamera.off('realPositionChanged', this.onCameraRealPositionChanged);
|
||||
|
|
Loading…
Reference in New Issue
Block a user