-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial implementation for pinch to zoom based on existing scale …
…factor
- Loading branch information
1 parent
220018d
commit e2dda36
Showing
4 changed files
with
77 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
import { ApollonView, ChangeViewAction, EditorActionTypes } from './editor-types'; | ||
import {ApollonView, ChangeScaleAction, ChangeViewAction, EditorActionTypes} from './editor-types'; | ||
|
||
export class EditorRepository { | ||
static changeView = (view: ApollonView): ChangeViewAction => ({ | ||
type: EditorActionTypes.CHANGE_VIEW, | ||
payload: { view }, | ||
undoable: false, | ||
}); | ||
static changeScale = (scale: number): ChangeScaleAction => ({ | ||
type: EditorActionTypes.CHANGE_SCALE, | ||
payload: { scale }, | ||
undoable: false, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters