aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-05-28 14:36:02 -0400
committerbob <bcz@cs.brown.edu>2019-05-28 14:36:02 -0400
commite4a298e8e5410af8654e0e2aafd6e21c212ecee1 (patch)
tree8d43ab363e01b886f26492c52e3e5d9bdf070d02 /src/client/documents/Documents.ts
parentf7ae243462a819c69ee4ba9d828b69b3685a0e13 (diff)
added pasting of img url's with ctrl-b, switched stacking view to a masonry view like pinterest. fixed template overlays.
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 1f4b76384..4bc0df31f 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -34,6 +34,7 @@ import { StrokeData, InkField } from "../../new_fields/InkField";
import { dropActionType } from "../util/DragManager";
import { DateField } from "../../new_fields/DateField";
import { UndoManager } from "../util/UndoManager";
+import { RouteStore } from "../../server/RouteStore";
var requestImageSize = require('request-image-size');
export interface DocumentOptions {
@@ -218,7 +219,7 @@ export namespace Docs {
export function ImageDocument(url: string, options: DocumentOptions = {}) {
let inst = CreateInstance(imageProto, new ImageField(new URL(url)), options);
- requestImageSize(url)
+ requestImageSize(window.origin + RouteStore.corsProxy + "/" + url)
.then((size: any) => {
if (!inst.proto!.nativeWidth) {
inst.proto!.nativeWidth = size.width;