Event rollback
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
81bcc9202d
commit
f87c8989e4
|
@ -12,7 +12,6 @@ export default class SideMenu extends Component {
|
|||
constructor($element, $) {
|
||||
super($element, $);
|
||||
this.side = 'left';
|
||||
this.mobileWidth = 800;
|
||||
}
|
||||
|
||||
$onInit() {
|
||||
|
@ -61,12 +60,8 @@ export default class SideMenu extends Component {
|
|||
show() {
|
||||
if (this.shown) return;
|
||||
this.shown = true;
|
||||
|
||||
if (this.$window.innerWidth <= this.mobileWidth) {
|
||||
this.handler = e => this.onEscape(e);
|
||||
this.$window.addEventListener('keydown', this.handler);
|
||||
}
|
||||
|
||||
this.handler = e => this.onEscape(e);
|
||||
this.$window.addEventListener('keydown', this.handler);
|
||||
this.stateHandler = this.$transitions.onStart({}, t => this.onTransition(t));
|
||||
this.layout.element.classList.add('shown');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue