]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
removes unused _activePlugins object and references to it.
authorChris Oyler <chris@zurb.com>
Fri, 22 Jan 2016 19:04:38 +0000 (11:04 -0800)
committerChris Oyler <chris@zurb.com>
Fri, 22 Jan 2016 19:04:38 +0000 (11:04 -0800)
js/foundation.core.js

index 724eac2d150cb67fadb3b19f759fcdbf18596e04..655e0c0c6626de6cec1cac4bd7b38a61c7c2a817 100644 (file)
@@ -17,10 +17,6 @@ var Foundation = {
    * Stores generated unique ids for plugin instances
    */
   _uuids: [],
-  /**
-   * Stores currently active plugins.
-   */
-  _activePlugins: {},
 
   /**
    * Returns a boolean for RTL support
@@ -45,10 +41,11 @@ var Foundation = {
   },
   /**
    * @function
-   * Creates a pointer to an instance of a Plugin within the Foundation._activePlugins object.
-   * Sets the `[data-pluginName="uniqueIdHere"]`, allowing easy access to any plugin's internal methods.
+   * Populates the _uuids array with pointers to each individual plugin instance.
+   * Adds the `zfPlugin` data-attribute to programmatically created plugins to allow use of $(selector).foundation(method) calls.
    * Also fires the initialization event for each plugin, consolidating repeditive code.
    * @param {Object} plugin - an instance of a plugin, usually `this` in context.
+   * @param {String} name - the name of the plugin, passed as a camelCased string.
    * @fires Plugin#init
    */
   registerPlugin: function(plugin, name){
@@ -69,7 +66,8 @@ var Foundation = {
   },
   /**
    * @function
-   * Removes the pointer for an instance of a Plugin from the Foundation._activePlugins obj.
+   * Removes the plugins uuid from the _uuids array.
+   * Removes the zfPlugin data attribute, as well as the data-plugin-name attribute.
    * Also fires the destroyed event for the plugin, consolidating repeditive code.
    * @param {Object} plugin - an instance of a plugin, usually `this` in context.
    * @fires Plugin#destroyed