aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/Doc.ts
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-07-11 11:00:09 -0400
committerbob <bcz@cs.brown.edu>2019-07-11 11:00:09 -0400
commita9ecaef0c7d870136401dfbb687afdb9dd2843f4 (patch)
treee92499439a8c2c3f19defb2fca723b208ce47ca3 /src/new_fields/Doc.ts
parent35f581ce1beef665265688551f50ca4cd51fd62a (diff)
fixed fitToBox stuff.
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r--src/new_fields/Doc.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index cc0dc71dd..d28a29e40 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -264,8 +264,11 @@ export namespace Doc {
return true;
}
- export function ComputeContentBounds(doc: Doc) {
- let bounds = DocListCast(doc.data).reduce((bounds, doc) => {
+ //
+ // Computes the bounds of the contents of a set of documents.
+ //
+ export function ComputeContentBounds(docList: Doc[]) {
+ let bounds = docList.reduce((bounds, doc) => {
var [sptX, sptY] = [NumCast(doc.x), NumCast(doc.y)];
let [bptX, bptY] = [sptX + doc[WidthSym](), sptY + doc[HeightSym]()];
return {