mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-25 17:25:16 +03:00
Merge pull request #992 from mikeller/fix_loading_custom_logo
From cleanflight: Support reading OSD logos from local files.
This commit is contained in:
commit
5cd895f7d5
1 changed files with 5 additions and 1 deletions
|
@ -214,7 +214,11 @@ var openLogoImage = function() {
|
||||||
reject(error);
|
reject(error);
|
||||||
};
|
};
|
||||||
fileEntry.file(function(file) {
|
fileEntry.file(function(file) {
|
||||||
img.src = "file://" + file.path;
|
var fr = new FileReader();
|
||||||
|
fr.onload = function () {
|
||||||
|
img.src = fr.result;
|
||||||
|
}
|
||||||
|
fr.readAsDataURL(file);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue