Skip to content

Commit

Permalink
URL fixing.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikh2000 authored and erikh2000 committed Nov 12, 2023
1 parent c053431 commit 49c3a77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/partAuthoring/PartLoader.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {fetchYaml} from "common/fetchUtil";
import {fetchYaml, makeSharedUrl} from "common/fetchUtil";

import {
CanvasComponent,
Expand Down Expand Up @@ -51,7 +51,7 @@ function _resizeComponentToFit(width:number, height:number, component:CanvasComp
async function _loadPart(part:LoadablePart, thumbnailContext:CanvasRenderingContext2D, partTypeName:string, onUpdate?:UpdateCallback) {
// TODO - persistent caching of thumbnails
if (part.thumbnail) return;
const component = await loadComponentFromPartUrl(part.url);
const component = await loadComponentFromPartUrl(makeSharedUrl(part.url));
_resizeComponentToFit(THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT, component);
component.height = thumbnailContext.canvas.height;
clearContext(thumbnailContext);
Expand Down

0 comments on commit 49c3a77

Please sign in to comment.