Skip to content

Commit

Permalink
Ceefax import was not working in the mosaic editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Zigazou committed Mar 22, 2019
1 parent 75b9799 commit 25a6074
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
16 changes: 15 additions & 1 deletion library/miedit/mimosaic.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,21 @@ MiEdit.MiMosaic = class {
* @param {mixed} param Parameters of the event
*/
onImportEditTf(event) {
this.memory = Minitel.drawCeefax(event.target[0].value)
const ceefax = Minitel.drawCeefax(event.target[0].value)

ceefax.forEach((row, y) => {
row.forEach((cell, x) => {
this.memory.setPoint(
x, y,
cell.color,
0,
cell.separated,
false,
1
)
})
})

this.drawPoints()
}

Expand Down
14 changes: 14 additions & 0 deletions library/miedit/mioldstyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,20 @@ MiEdit.MiOldStyle = class {
if(event.code === "KeyN") cell.drcs = !cell.drcs
}

// Double width.
if(!(cell instanceof Minitel.MosaicCell)) {
if(event.code === "KeyM") {
cell.mult.width = cell.mult.width === 1 ? 2 : 1
}
}

// Double height.
if(!(cell instanceof Minitel.MosaicCell)) {
if(event.code === "Comma") {
cell.mult.height = cell.mult.height === 1 ? 2 : 1
}
}

this.vdu.set(x, y, cell)
})
}
Expand Down

0 comments on commit 25a6074

Please sign in to comment.