0.1.07 文件树拖拽与多思维导图
This commit is contained in:
@@ -177,7 +177,9 @@ export const parseMindManagerMmapFile = async (file: File): Promise<MindMapData>
|
||||
const entry = zip.file(zipPath) ?? zip.file(`/${zipPath}`);
|
||||
if (!entry) return null;
|
||||
const bytes = await entry.async("uint8array");
|
||||
const blob = new Blob([bytes], { type: mime });
|
||||
const rawBuffer = bytes.buffer as ArrayBuffer;
|
||||
const sliced = rawBuffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
|
||||
const blob = new Blob([sliced], { type: mime });
|
||||
const dataUrl = await readBlobAsDataUrl(blob);
|
||||
const size = await getImageSizeFromBlob(blob);
|
||||
const width = size?.width ?? 0;
|
||||
@@ -230,4 +232,3 @@ export const parseMindManagerMmapFile = async (file: File): Promise<MindMapData>
|
||||
const tree = await walkTopic(rootTopicEl, true);
|
||||
return compactTree(tree, true);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user