Last active
August 29, 2015 14:03
-
-
Save andrewdeandrade/5f70eba155fce7eca372 to your computer and use it in GitHub Desktop.
0001-Added-deregisterContext-method-to-Engine.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 63aae6759669ccafcf235dd0fdc17f2990cc5699 Mon Sep 17 00:00:00 2001 | |
From: Andrew de Andrade <[email protected]> | |
Date: Fri, 27 Jun 2014 13:16:01 -0700 | |
Subject: [PATCH] Added deregisterContext method to Engine | |
--- | |
Engine.js | 13 +++++++++++++ | |
1 file changed, 13 insertions(+) | |
diff --git a/Engine.js b/Engine.js | |
index 29cfb1c..243ae70 100644 | |
--- a/Engine.js | |
+++ b/Engine.js | |
@@ -300,6 +300,19 @@ define(function(require, exports, module) { | |
}; | |
/** | |
+ * Deregisters an existing context so that the engine ceases to update it | |
+ * within the run loop. | |
+ * | |
+ * @param {Context} context Context to deregister | |
+ */ | |
+ Engine.deregisterContext = function deregisterContext(context) { | |
+ var i = contexts.indexOf(context); | |
+ if (i > -1) { | |
+ contexts.splice(i, 1); | |
+ } | |
+ }; | |
+ | |
+ /** | |
* Queue a function to be executed on the next tick of the | |
* Engine. | |
* | |
-- | |
2.0.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment