pull/1344/head
yann300 3 years ago committed by joseph izang
parent c2c7a2b29c
commit aac54c5db0
  1. 10
      libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx
  2. 6
      libs/remix-ui/debugger-ui/src/reducers/assembly-items.ts

@ -48,9 +48,9 @@ export const AssemblyItems = ({ registerEvent }) => {
}
const indexChanged = (index: number) => {
console.log("index " + index)
console.log('index ' + index)
if (index < 0) return
const codeView = asmItemsRef.current
const currentItem = codeView.children[index]
@ -60,21 +60,21 @@ export const AssemblyItems = ({ registerEvent }) => {
currentItem.setAttribute('selected', 'selected')
codeView.scrollTop = currentItem.offsetTop - parseInt(codeView.offsetTop)
}
setSelectedItem(index)
setAbsoluteSelectedIndex(assemblyItems.opCodes.index)
}
const nextIndexChanged = (index: number) => {
if (index < 0) return
const codeView = asmItemsRef.current
const currentItem = codeView.children[index]
if (currentItem) {
currentItem.style.setProperty('border-color', 'var(--secondary)')
currentItem.style.setProperty('border-style', 'dotted')
currentItem.setAttribute('selected', 'selected')
currentItem.setAttribute('selected', 'selected')
}
setNextSelectedItem(index)
}

@ -26,10 +26,10 @@ const reducedOpcode = (opCodes) => {
let bottom = opCodes.index - 10
bottom = bottom < 0 ? 0 : bottom
const top = bottom + length
return {
return {
index: opCodes.index - bottom,
nextIndex:opCodes.nextIndex - bottom,
display: opCodes.code.slice(bottom, top)
nextIndex: opCodes.nextIndex - bottom,
display: opCodes.code.slice(bottom, top)
}
}

Loading…
Cancel
Save