@lvce-editor/problems-view 1.34.1 → 1.34.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2852,6 +2852,34 @@ const handleWheel = (state, deltaMode, deltaY) => {
2852
2852
  return setDeltaY(state, currentDeltaY + deltaY);
2853
2853
  };
2854
2854
 
2855
+ const handleWorkspaceChange = (state, newWorkspaceUri) => {
2856
+ const {
2857
+ workspaceUri
2858
+ } = state;
2859
+ if (newWorkspaceUri === workspaceUri) {
2860
+ return state;
2861
+ }
2862
+ return {
2863
+ ...state,
2864
+ activeUri: '',
2865
+ collapsedUris: [],
2866
+ deltaY: 0,
2867
+ fileIconCache: {},
2868
+ filteredProblems: [],
2869
+ finalDeltaY: 0,
2870
+ focusedIndex: -2,
2871
+ handleOffset: 0,
2872
+ listItems: [],
2873
+ maxLineY: 0,
2874
+ message: getMessage(0),
2875
+ minLineY: 0,
2876
+ problems: [],
2877
+ scrollBarActive: false,
2878
+ scrollBarHeight: 0,
2879
+ workspaceUri: newWorkspaceUri
2880
+ };
2881
+ };
2882
+
2855
2883
  const initialize = async () => {
2856
2884
  // function is not needed anymore
2857
2885
  };
@@ -3842,6 +3870,7 @@ const commandMap = {
3842
3870
  'Problems.handleScrollBarClick': wrapCommand(handleScrollBarClick),
3843
3871
  'Problems.handleScrollBarMove': wrapCommand(handleScrollBarMove),
3844
3872
  'Problems.handleWheel': wrapCommand(handleWheel),
3873
+ 'Problems.handleWorkspaceChange': wrapCommand(handleWorkspaceChange),
3845
3874
  'Problems.initialize': initialize,
3846
3875
  'Problems.loadContent': wrapCommand(loadContent),
3847
3876
  'Problems.render2': render2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/problems-view",
3
- "version": "1.34.1",
3
+ "version": "1.34.2",
4
4
  "description": "Problems View Worker",
5
5
  "repository": {
6
6
  "type": "git",