aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-03-04 21:54:34 -0500
committerBob Zeleznik <zzzman@gmail.com>2020-03-04 21:54:34 -0500
commit698431888cdc4334f6bbecf71de1499403850067 (patch)
treefcb1d75fc984edfc5f408dd5be05f6d7870a2b1d /src/new_fields
parent15a4525d83844963357e38e496a3f382e3e720de (diff)
removed child click script from collection when switching out of pivot view
Diffstat (limited to 'src/new_fields')
-rw-r--r--src/new_fields/Doc.ts8
-rw-r--r--src/new_fields/documentSchemas.ts1
2 files changed, 7 insertions, 2 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts
index 53e77c93f..81e32484c 100644
--- a/src/new_fields/Doc.ts
+++ b/src/new_fields/Doc.ts
@@ -813,7 +813,11 @@ export namespace Doc {
target._docRangeFilters = new List<string>(docRangeFilters);
}
}
- export function setDocFilter(container: Doc, key: string, value: any, modifiers?: string | number) {
+
+ // filters document in a container collection:
+ // all documents with the specified value for the specified key are included/excluded
+ // based on the modifiers :"check", "x", undefined
+ export function setDocFilter(container: Doc, key: string, value: any, modifiers?: "check" | "x" | undefined) {
const docFilters = Cast(container._docFilters, listSpec("string"), []);
for (let i = 0; i < docFilters.length; i += 3) {
if (docFilters[i] === key && docFilters[i + 1] === value) {
@@ -897,5 +901,5 @@ Scripting.addGlobal(function selectedDocs(container: Doc, excludeCollections: bo
const docs = DocListCast(Doc.UserDoc().SelectedDocs).filter(d => !Doc.AreProtosEqual(d, container) && !d.annotationOn && d.type !== DocumentType.DOCUMENT && d.type !== DocumentType.KVP && (!excludeCollections || !Cast(d.data, listSpec(Doc), null)));
return docs.length ? new List(docs) : prevValue;
});
-Scripting.addGlobal(function setDocFilter(container: Doc, key: string, value: any, modifiers?: string) { Doc.setDocFilter(container, key, value, modifiers); });
+Scripting.addGlobal(function setDocFilter(container: Doc, key: string, value: any, modifiers?: "check" | "x" | undefined) { Doc.setDocFilter(container, key, value, modifiers); });
Scripting.addGlobal(function setDocFilterRange(container: Doc, key: string, range: number[]) { Doc.setDocFilterRange(container, key, range); }); \ No newline at end of file
diff --git a/src/new_fields/documentSchemas.ts b/src/new_fields/documentSchemas.ts
index 7006163e0..e113a7d64 100644
--- a/src/new_fields/documentSchemas.ts
+++ b/src/new_fields/documentSchemas.ts
@@ -28,6 +28,7 @@ export const documentSchema = createSchema({
_pivotField: "string", // specifies which field should be used as the timeline/pivot axis
_replacedChrome: "string", // what the default chrome is replaced with. Currently only supports the value of 'replaced' for PresBox's.
_chromeStatus: "string", // determines the state of the collection chrome. values allowed are 'replaced', 'enabled', 'disabled', 'collapsed'
+ _freezeOnDrop: "boolean", // whether a document without native dimensions should have its width/height frozen as native dimensions on drop. Used by Timeline view to make sure documents are scaled to fit the display thumbnail
color: "string", // foreground color of document
backgroundColor: "string", // background color of document
opacity: "number", // opacity of document