|
|
@ -62,7 +62,24 @@ function wheel(e) { |
|
|
|
schedule_draw(); |
|
|
|
schedule_draw(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function jump_to_first_instruction() { |
|
|
|
|
|
|
|
if (Object.keys(traces).length > 0) { |
|
|
|
|
|
|
|
const trace = traces[Object.keys(traces)[0]].raw; |
|
|
|
|
|
|
|
if (Object.keys(trace).length > 0) { |
|
|
|
|
|
|
|
const first_instruction = trace[Object.keys(trace)[0]]; |
|
|
|
|
|
|
|
offset.x = -first_instruction.cycle * config.w; |
|
|
|
|
|
|
|
offset.y = 0 * config.h; |
|
|
|
|
|
|
|
zoom_target = 1; |
|
|
|
|
|
|
|
zoom = 1; |
|
|
|
|
|
|
|
schedule_draw(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function keydown(e) { |
|
|
|
function keydown(e) { |
|
|
|
|
|
|
|
if (e.code === 'Digit0') { |
|
|
|
|
|
|
|
jump_to_first_instruction(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function keyup(e) { |
|
|
|
function keyup(e) { |
|
|
@ -91,6 +108,7 @@ function drop(e) { |
|
|
|
const text = fr.result; |
|
|
|
const text = fr.result; |
|
|
|
console.log('Finished. String length:', text.length); |
|
|
|
console.log('Finished. String length:', text.length); |
|
|
|
if (parse(text)) { |
|
|
|
if (parse(text)) { |
|
|
|
|
|
|
|
jump_to_first_instruction(); |
|
|
|
schedule_draw(); |
|
|
|
schedule_draw(); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|