mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-30 23:55:32 +01:00
Merge pull request #2 from ziveo/develop__mac-keyboard-bindings
Improving keyboard bindings code
This commit is contained in:
commit
edc7e02f58
1 changed files with 4 additions and 8 deletions
|
@ -75,17 +75,13 @@ export default class App extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
Mousetrap.bind(['ctrl+z'], this.onUndo.bind(this));
|
Mousetrap.bind(['mod+z'], this.onUndo.bind(this));
|
||||||
Mousetrap.bind(['command+z'], this.onUndo.bind(this));
|
Mousetrap.bind(['mod+y', 'mod+shift+z'], this.onRedo.bind(this));
|
||||||
Mousetrap.bind(['ctrl+y'], this.onRedo.bind(this));
|
|
||||||
Mousetrap.bind(['command+shift+z'], this.onRedo.bind(this));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
Mousetrap.unbind(['ctrl+z'], this.onUndo.bind(this));
|
Mousetrap.unbind(['mod+z'], this.onUndo.bind(this));
|
||||||
Mousetrap.unbind(['command+z'], this.onUndo.bind(this));
|
Mousetrap.unbind(['mod+y', 'mod+shift+z'], this.onRedo.bind(this));
|
||||||
Mousetrap.unbind(['ctrl+y'], this.onRedo.bind(this));
|
|
||||||
Mousetrap.unbind(['command+shift+z'], this.onRedo.bind(this));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onReset() {
|
onReset() {
|
||||||
|
|
Loading…
Reference in a new issue