From f5b09dbd10d9e90b1522299a7a684cd8c67d3f6b Mon Sep 17 00:00:00 2001
From: David Sehnal <david.sehnal@gmail.com>
Date: Tue, 3 Sep 2019 14:42:59 +0200
Subject: [PATCH] mol-plugin: added customState to PluginContext

---
 src/mol-plugin/context.ts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mol-plugin/context.ts b/src/mol-plugin/context.ts
index e2b6b11a2..fbd4c0a2d 100644
--- a/src/mol-plugin/context.ts
+++ b/src/mol-plugin/context.ts
@@ -131,6 +131,12 @@ export class PluginContext {
         substructureParent: new SubstructureParentHelper(this)
     } as const;
 
+    /**
+     * Used to store application specific custom state which is then available
+     * to State Actions and similar constructs via the PluginContext.
+     */
+    readonly customState: any = Object.create(null);
+
     initViewer(canvas: HTMLCanvasElement, container: HTMLDivElement) {
         try {
             this.layout.setRoot(container);
-- 
GitLab