Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
ac4d057d
Commit
ac4d057d
authored
Jun 23, 2021
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linting
parent
cd997ee6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
assembly-items.tsx
...mix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx
+5
-5
assembly-items.ts
libs/remix-ui/debugger-ui/src/reducers/assembly-items.ts
+3
-3
No files found.
libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx
View file @
ac4d057d
...
@@ -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
)
}
}
...
...
libs/remix-ui/debugger-ui/src/reducers/assembly-items.ts
View file @
ac4d057d
...
@@ -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
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment