sample-ui-component-library 0.0.58-dev → 0.0.60-dev
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.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Editor/EditorReducer.js +1 -1
- package/src/components/Editor/MonacoInstance/MonacoInstance.jsx +7 -3
- package/src/components/Editor/MonacoInstance/MonacoInstance.scss +1 -1
package/package.json
CHANGED
|
@@ -38,12 +38,16 @@ export const MonacoInstance = forwardRef(({ onSelectAbstraction }, ref) => {
|
|
|
38
38
|
} else {
|
|
39
39
|
activeTabRef.current = null;
|
|
40
40
|
setShowEditor(false);
|
|
41
|
+
setOverlayDivs(null);
|
|
41
42
|
}
|
|
42
|
-
}, [state.activeTab, editorRef]);
|
|
43
|
+
}, [state.activeTab, state.mode, editorRef]);
|
|
43
44
|
|
|
44
45
|
// Update overlays for mapping mode.
|
|
45
46
|
const updateOverlays = useCallback(() => {
|
|
46
|
-
if (state.mode !== EDITOR_MODES.MAPPING)
|
|
47
|
+
if (state.mode !== EDITOR_MODES.MAPPING) {
|
|
48
|
+
setOverlayDivs(null);
|
|
49
|
+
return;
|
|
50
|
+
};
|
|
47
51
|
if (!editorRef.current || !activeTabRef?.current?.mapping) return;
|
|
48
52
|
|
|
49
53
|
const mapping = activeTabRef.current.mapping;
|
|
@@ -65,7 +69,7 @@ export const MonacoInstance = forwardRef(({ onSelectAbstraction }, ref) => {
|
|
|
65
69
|
divs.push(<div className="line-block-overlay" onClick={(e) => onSelectAbstraction(entry)} style={style}></div>);
|
|
66
70
|
});
|
|
67
71
|
setOverlayDivs(divs);
|
|
68
|
-
}, [editorRef, state.activeTab]);
|
|
72
|
+
}, [editorRef, state.activeTab, state.mode]);
|
|
69
73
|
|
|
70
74
|
// Scroll the editor and update overlays on wheel event in mapping mode.
|
|
71
75
|
const handleWheel = useCallback((e) => {
|