Commit ac4d057d authored by yann300's avatar yann300

linting

parent cd997ee6
...@@ -48,9 +48,9 @@ export const AssemblyItems = ({ registerEvent }) => { ...@@ -48,9 +48,9 @@ export const AssemblyItems = ({ registerEvent }) => {
} }
const indexChanged = (index: number) => { const indexChanged = (index: number) => {
console.log("index " + index) console.log('index ' + index)
if (index < 0) return if (index < 0) return
const codeView = asmItemsRef.current const codeView = asmItemsRef.current
const currentItem = codeView.children[index] const currentItem = codeView.children[index]
...@@ -60,21 +60,21 @@ export const AssemblyItems = ({ registerEvent }) => { ...@@ -60,21 +60,21 @@ export const AssemblyItems = ({ registerEvent }) => {
currentItem.setAttribute('selected', 'selected') currentItem.setAttribute('selected', 'selected')
codeView.scrollTop = currentItem.offsetTop - parseInt(codeView.offsetTop) codeView.scrollTop = currentItem.offsetTop - parseInt(codeView.offsetTop)
} }
setSelectedItem(index) setSelectedItem(index)
setAbsoluteSelectedIndex(assemblyItems.opCodes.index) setAbsoluteSelectedIndex(assemblyItems.opCodes.index)
} }
const nextIndexChanged = (index: number) => { const nextIndexChanged = (index: number) => {
if (index < 0) return if (index < 0) return
const codeView = asmItemsRef.current const codeView = asmItemsRef.current
const currentItem = codeView.children[index] const currentItem = codeView.children[index]
if (currentItem) { if (currentItem) {
currentItem.style.setProperty('border-color', 'var(--secondary)') currentItem.style.setProperty('border-color', 'var(--secondary)')
currentItem.style.setProperty('border-style', 'dotted') currentItem.style.setProperty('border-style', 'dotted')
currentItem.setAttribute('selected', 'selected') currentItem.setAttribute('selected', 'selected')
} }
setNextSelectedItem(index) setNextSelectedItem(index)
} }
......
...@@ -26,10 +26,10 @@ const reducedOpcode = (opCodes) => { ...@@ -26,10 +26,10 @@ const reducedOpcode = (opCodes) => {
let bottom = opCodes.index - 10 let bottom = opCodes.index - 10
bottom = bottom < 0 ? 0 : bottom bottom = bottom < 0 ? 0 : bottom
const top = bottom + length const top = bottom + length
return { return {
index: opCodes.index - bottom, index: opCodes.index - bottom,
nextIndex:opCodes.nextIndex - bottom, nextIndex: opCodes.nextIndex - bottom,
display: opCodes.code.slice(bottom, top) display: opCodes.code.slice(bottom, top)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment