mirror of
https://github.com/maputnik/editor.git
synced 2025-12-07 14:50:02 +00:00
Merge pull request #1 from ziveo/develop__mac-keyboard-bindings
Adding mac keyboard bindings
This commit is contained in:
@@ -76,12 +76,16 @@ export default class App extends React.Component {
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
Mousetrap.bind(['ctrl+z'], this.onUndo.bind(this));
|
Mousetrap.bind(['ctrl+z'], this.onUndo.bind(this));
|
||||||
|
Mousetrap.bind(['command+z'], this.onUndo.bind(this));
|
||||||
Mousetrap.bind(['ctrl+y'], 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(['ctrl+z'], this.onUndo.bind(this));
|
||||||
|
Mousetrap.unbind(['command+z'], this.onUndo.bind(this));
|
||||||
Mousetrap.unbind(['ctrl+y'], this.onRedo.bind(this));
|
Mousetrap.unbind(['ctrl+y'], this.onRedo.bind(this));
|
||||||
|
Mousetrap.unbind(['command+shift+z'], this.onRedo.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
onReset() {
|
onReset() {
|
||||||
|
|||||||
Reference in New Issue
Block a user