From 513e448da5ea87a63740a44810765fa96110322c Mon Sep 17 00:00:00 2001 From: Julian Gonggrijp Date: Wed, 10 Nov 2021 03:44:30 +0100 Subject: [PATCH] Make callActivate reusable (#180 #501) --- frontend/src/core/view.ts | 3 +++ frontend/src/hierarchy/hierarchy-view.ts | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/core/view.ts b/frontend/src/core/view.ts index 8ff3d8bf..9546e7e1 100644 --- a/frontend/src/core/view.ts +++ b/frontend/src/core/view.ts @@ -59,6 +59,9 @@ export default class View extends BView { } } +// Helper function in support of the activate convention (see above). +export const callActivate = view => view.activate(); + /** * CompositeView derives both from our own customized View base class * and from the BCompositeView we imported from backbone-fractal. diff --git a/frontend/src/hierarchy/hierarchy-view.ts b/frontend/src/hierarchy/hierarchy-view.ts index 42da561a..4c9acc4f 100644 --- a/frontend/src/hierarchy/hierarchy-view.ts +++ b/frontend/src/hierarchy/hierarchy-view.ts @@ -77,6 +77,7 @@ import Collection from '../core/collection'; import View, { CompositeView, CollectionView, + callActivate, ViewOptions as BViewOptions, } from '../core/view'; @@ -109,8 +110,6 @@ export interface ViewOptions< recursive?: typeof CollectionView; } -// Helper function in support of the activate convention (see ../core/view). -const callActivate = view => view.activate(); // Options are passed down the hierarchy. To prevent a model or collection from // a higher level from lingering around, we reset those options using the mask // below before recursing into the next outer model.