TinyCircuits-Thumby-Code-Editor icon indicating copy to clipboard operation
TinyCircuits-Thumby-Code-Editor copied to clipboard

Export Bitmap variable replacement logic never triggers

Open fuglaro opened this issue 3 years ago • 0 comments

https://github.com/TinyCircuits/TinyCircuits-Thumby-Code-Editor/blob/ef59ff908c32a56d6b0b067829abdc39b6edb772/js/bitmap_builder.js#L131

I noticed that the exportBitmap function had some really nice logic that replaces the bytearray for a selected variable. Its pretty nice functionality that never gets triggered because the selected lines are never passed into the function. The importBitmap function gets passed the selectedLines from onImport, but the same isn't true for onExport. The following change probably fixes it, but the onImport function name is confusing there:

         this.EXPORT_LINES_BTN.onclick = () => {this.onExport(this.exportBitmap(this.onImport()))}

fuglaro avatar Aug 08 '22 20:08 fuglaro