From 62826dfca7e2d1785c4d808544023d1d5708d611 Mon Sep 17 00:00:00 2001 From: bobzel Date: Sun, 27 Aug 2023 13:44:36 -0400 Subject: fromlast --- src/fields/Doc.ts | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'src/fields') diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index f242ab5be..c8564e5bb 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -1461,37 +1461,35 @@ export namespace Doc { prevLayout === 'icon' && (doc.deiconifyLayout = undefined); doc.layout_fieldKey = deiconify || 'layout'; } - export function setDocRangeFilter(container: Opt, key: string, range?: readonly number[], modifiers?: 'remove') { //, modifiers: 'remove' | 'set' + export function setDocRangeFilter(container: Opt, key: string, range?: readonly number[], modifiers?: 'remove') { + //, modifiers: 'remove' | 'set' if (!container) return; const childFiltersByRanges = Cast(container._childFiltersByRanges, listSpec('string'), []); - - - for (let i = 0; i < childFiltersByRanges.length; i += 3) { if (childFiltersByRanges[i] === key) { - console.log("this is key inside childfilters by range " + key) + console.log('this is key inside childfilters by range ' + key); childFiltersByRanges.splice(i, 3); - console.log("this is child filters by range " + childFiltersByRanges) + console.log('this is child filters by range ' + childFiltersByRanges); break; } } if (range !== undefined) { - console.log("in doc.ts in set range filter") + console.log('in doc.ts in set range filter'); childFiltersByRanges.push(key); childFiltersByRanges.push(range[0].toString()); childFiltersByRanges.push(range[1].toString()); container._childFiltersByRanges = new List(childFiltersByRanges); - console.log("this is child filters by range "+ childFiltersByRanges[0] + "," + childFiltersByRanges[1] + "," + childFiltersByRanges[2]) - console.log("this is new list " + container._childFiltersByRange) + console.log('this is child filters by range ' + childFiltersByRanges[0] + ',' + childFiltersByRanges[1] + ',' + childFiltersByRanges[2]); + console.log('this is new list ' + container._childFiltersByRange); } - if (modifiers){ - childFiltersByRanges.splice(0,3) + if (modifiers) { + childFiltersByRanges.splice(0, 3); container._childFiltersByRanges = new List(childFiltersByRanges); } - console.log("this is child filters by range END"+ childFiltersByRanges[0] + "," + childFiltersByRanges[1] + "," + childFiltersByRanges[2]) + console.log('this is child filters by range END' + childFiltersByRanges[0] + ',' + childFiltersByRanges[1] + ',' + childFiltersByRanges[2]); } export const FilterSep = '::'; @@ -1600,7 +1598,6 @@ export namespace Doc { // prettier-ignore export function toIcon(doc?: Doc, isOpen?: boolean) { - console.log(doc!.title, doc!.type) switch (isOpen !== undefined ? DocumentType.COL: StrCast(doc?.type)) { case DocumentType.IMG: return 'image'; case DocumentType.COMPARISON: return 'columns'; -- cgit v1.2.3-70-g09d2