-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert the zooming change on focus and restore old functionality (#3793)
* fix: revert the zooming change and restore old functionality * Refactor codeMapRenderService to use sortVisibleNodesByHeightDescending * fix: revert rest of changes to make tests green again * Refactor codeMap threeViewer controls and metricChooser nodeselection service tests * chore: refactor codeMap threeViewer controls and metricChooser nodeselection service tests * Revert focus behaviour to old one for stability * fix changelog --------- Co-authored-by: IhsenBouallegue <IhsenBouallegue@gmail.com>
- Loading branch information
1 parent
5137912
commit 0d29fce
Showing
21 changed files
with
53 additions
and
493 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
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
114 changes: 0 additions & 114 deletions
114
visualization/app/codeCharta/state/effects/focusNodes/focus.effect.spec.ts
This file was deleted.
Oops, something went wrong.
63 changes: 0 additions & 63 deletions
63
visualization/app/codeCharta/state/effects/focusNodes/focus.effect.ts
This file was deleted.
Oops, something went wrong.
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
11 changes: 1 addition & 10 deletions
11
...ion/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.reducer.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 |
---|---|---|
@@ -1,21 +1,12 @@ | ||
import { focusNode, setAllFocusedNodes, unfocusAllNodes, unfocusNode } from "./focusedNodePath.actions" | ||
import { fileRoot } from "../../../../services/loadFile/fileRoot" | ||
import { createReducer, on } from "@ngrx/store" | ||
import { isChildPath } from "../../../../util/isChildPath" | ||
|
||
export const defaultFocusedNodePath: string[] = [] | ||
export const focusedNodePath = createReducer( | ||
defaultFocusedNodePath, | ||
on(setAllFocusedNodes, (_state, action) => [...action.value]), | ||
on(unfocusAllNodes, () => []), | ||
on(focusNode, (state, action) => { | ||
if (action.value === fileRoot.rootPath) { | ||
return state | ||
} | ||
if (isChildPath(action.value, state[0])) { | ||
return [action.value, ...state] | ||
} | ||
return [action.value] | ||
}), | ||
on(focusNode, (state, action) => (action.value === fileRoot.rootPath ? state : [action.value, ...state])), | ||
on(unfocusNode, state => state.slice(1)) | ||
) |
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
Oops, something went wrong.