-
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.
feat: interactive positioning of peak labels
- Loading branch information
1 parent
fc33545
commit 0b9d3d8
Showing
4 changed files
with
207 additions
and
52 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
15 changes: 15 additions & 0 deletions
15
src/component/reducer/preferences/actions/changePeaksLabelPosition.ts
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Draft } from 'immer'; | ||
|
||
import { | ||
ChangePeaksLabelPositionAction, | ||
PreferencesState, | ||
} from '../preferencesReducer'; | ||
import { getActiveWorkspace } from '../utilities/getActiveWorkspace'; | ||
|
||
export function changePeaksLabelPosition( | ||
draft: Draft<PreferencesState>, | ||
action: ChangePeaksLabelPositionAction, | ||
) { | ||
const currentWorkspacePreferences = getActiveWorkspace(draft); | ||
currentWorkspacePreferences.peaksLabel.marginTop = action.payload.marginTop; | ||
} |
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