mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
afc5280ac2
Get save and restore state limping along to nearly as well as before I refactored and broke everything.
21 lines
678 B
JavaScript
21 lines
678 B
JavaScript
export default function DriveLights()
|
|
{
|
|
return {
|
|
driveLight: function(drive, on) {
|
|
var disk = document.querySelector('#disk' + drive);
|
|
disk.style.backgroundImage =
|
|
on ? 'url(css/red-on-16.png)' :
|
|
'url(css/red-off-16.png)';
|
|
},
|
|
dirty: function() {
|
|
// document.querySelector('#disksave' + drive).disabled = !dirty;
|
|
},
|
|
label: function(drive, label) {
|
|
if (label) {
|
|
document.querySelector('#disk-label' + drive).innerText = label;
|
|
}
|
|
return document.querySelector('#disk-label' + drive).innerText;
|
|
}
|
|
};
|
|
}
|