mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-28 17:48:12 +08:00
Clean up camelCase and snake_case in frontend code
This commit is contained in:
@@ -4,15 +4,15 @@ import { UpdateImageData } from "@/wasm-communication/messages";
|
||||
export function createBlobManager(editor: Editor): void {
|
||||
// Subscribe to process backend event
|
||||
editor.subscriptions.subscribeJsMessage(UpdateImageData, (updateImageData) => {
|
||||
updateImageData.image_data.forEach(async (element) => {
|
||||
// Using updateImageData.image_data.buffer returns undefined for some reason?
|
||||
const blob = new Blob([new Uint8Array(element.image_data.values()).buffer], { type: element.mime });
|
||||
updateImageData.imageData.forEach(async (element) => {
|
||||
// Using updateImageData.imageData.buffer returns undefined for some reason?
|
||||
const blob = new Blob([new Uint8Array(element.imageData.values()).buffer], { type: element.mime });
|
||||
|
||||
const url = URL.createObjectURL(blob);
|
||||
|
||||
const image = await createImageBitmap(blob);
|
||||
|
||||
editor.instance.set_image_blob_url(element.path, url, image.width, image.height);
|
||||
editor.instance.setImageBlobUrl(element.path, url, image.width, image.height);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user