Merge pull request #4078 from ethereum/getpositionat

getPositionAt needs to be implemented
pull/5370/head
bunsenstraat 1 year ago committed by GitHub
commit 94334d6d9f
  1. 2
      apps/circuit-compiler/src/profile.json
  2. 8
      libs/remix-ui/editor/src/lib/remix-ui-editor.tsx

@ -9,7 +9,7 @@
"url": "",
"description": "Enables circuit compilation and computing a witness for ZK proofs",
"icon": "https://docs.circom.io/assets/images/favicon.png",
"location": "sidePanel",
"location": "hiddenPanel",
"documentation": "",
"repo": "https://github.com/ethereum/remix-project/tree/master/apps/circuit-compiler",
"maintainedBy": "Remix",

@ -539,6 +539,14 @@ export const EditorUI = (props: EditorUIProps) => {
}
}
props.editorAPI.getPositionAt = (offset: number) => {
if (!monacoRef.current) return
const model = editorModelsState[currentFileRef.current]?.model
if (model) {
return model.getPositionAt(offset)
}
}
props.editorAPI.getHoverPosition = (position: monacoTypes.Position) => {
if (!monacoRef.current) return
const model = editorModelsState[currentFileRef.current]?.model

Loading…
Cancel
Save