diff options
author | bob <bcz@cs.brown.edu> | 2019-05-29 18:21:03 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-05-29 18:21:03 -0400 |
commit | 9dbf61fccc96f7c4d6bd63e25a7208b82df28705 (patch) | |
tree | 8396a0f950436205015ecbcddfdbef09d01793bc /src/client/documents/Documents.ts | |
parent | 732cc8c3aec072525535d246b1177181bbd3f7da (diff) |
stacking view focus fixes. linkview fixes.-
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r-- | src/client/documents/Documents.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 9bf62196f..fffada459 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -36,6 +36,7 @@ import { DateField } from "../../new_fields/DateField"; import { UndoManager } from "../util/UndoManager"; import { RouteStore } from "../../server/RouteStore"; var requestImageSize = require('request-image-size'); +var path = require('path'); export interface DocumentOptions { x?: number; @@ -218,7 +219,7 @@ export namespace Docs { } export function ImageDocument(url: string, options: DocumentOptions = {}) { - let inst = CreateInstance(imageProto, new ImageField(new URL(url)), options); + let inst = CreateInstance(imageProto, new ImageField(new URL(url)), { title: path.basename(url), ...options }); requestImageSize(window.origin + RouteStore.corsProxy + "/" + url) .then((size: any) => { let aspect = size.height / size.width; |