Skip to content

Commit

Permalink
Added AppAPI.hide function to hide the current plugin window
Browse files Browse the repository at this point in the history
  • Loading branch information
michael committed Nov 12, 2014
1 parent f434c4d commit c3b5892
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 11 deletions.
2 changes: 1 addition & 1 deletion doc/Article.html
Original file line number Diff line number Diff line change
Expand Up @@ -5532,7 +5532,7 @@ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-A
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Oct 22 2014 15:19:26 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Nov 12 2014 14:49:11 GMT+0100 (CET)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion doc/Editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -3248,7 +3248,7 @@ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-A
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Oct 22 2014 15:19:27 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Nov 12 2014 14:49:12 GMT+0100 (CET)
</footer>

<script> prettyPrint(); </script>
Expand Down
10 changes: 8 additions & 2 deletions doc/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ <h4 class="name" id="Listeners"><span class="type-signature"></span>Listeners<sp

<p><code>modifiedContent</code></p>

<p><code>elementRemoved</code></p>

<blockquote>
<p><em>triggered when a plugin element from the current plugin is removed, receives an object with element id as a parameter</em></p>
</blockquote>

<p><code>pluginElementClicked</code></p>

<p><code>pluginElementSelected</code></p>
Expand Down Expand Up @@ -228,7 +234,7 @@ <h4 class="name" id="Listeners"><span class="type-signature"></span>Listeners<sp

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
Listeners.js, line 83
Listeners.js, line 86
</li></ul></dd>


Expand Down Expand Up @@ -283,7 +289,7 @@ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-A
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Oct 22 2014 15:19:26 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Nov 12 2014 14:49:11 GMT+0100 (CET)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-A
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Oct 22 2014 15:19:26 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Nov 12 2014 14:49:11 GMT+0100 (CET)
</footer>

<script> prettyPrint(); </script>
Expand Down
67 changes: 66 additions & 1 deletion doc/module-AppApi.html
Original file line number Diff line number Diff line change
Expand Up @@ -2238,6 +2238,71 @@ <h5>Parameters:</h5>



</dd>



<dt>
<h4 class="name" id="hide"><span class="type-signature"></span>hide<span class="signature">()</span><span class="type-signature"></span></h4>


</dt>
<dd>


<div class="description">
<p>Hide the plugin, so it is no longer visible on the list of open plugins</p>
</div>









<dl class="details">



















<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
AppAPI.js, line 571
</li></ul></dd>







</dl>









</dd>


Expand Down Expand Up @@ -3946,7 +4011,7 @@ <h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-A
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Oct 22 2014 15:19:26 GMT+0200 (CEST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Wed Nov 12 2014 14:49:11 GMT+0100 (CET)
</footer>

<script> prettyPrint(); </script>
Expand Down
8 changes: 7 additions & 1 deletion js/AppAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,13 @@ var AppAPI = (function() {
};



/**
* Hide the plugin, so it is no longer visible on the list of open plugins
*/
Api.prototype.hide = function() {
this.request('hide');
return true;
};

return new Api();
})();
7 changes: 3 additions & 4 deletions js/Listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
*/
function Listeners () {
"use strict";
this._listeners = [];
this._listeners = {};
}

/**
Expand Down Expand Up @@ -120,9 +120,8 @@ Listeners.prototype.add = function(event, callback) {
this._listeners[event] = [];
}

var index = this._listeners[event].length;
this._listeners[event][index] = callback;
return index;
this._listeners[event].push(callback);
return this._listeners[event].length - 1;
};

/**
Expand Down

0 comments on commit c3b5892

Please sign in to comment.