add jsdoc to mindplot module

--HG--
branch : mindplot_jsdoc
This commit is contained in:
Christina Korger
2015-03-23 09:25:54 +01:00
parent a4da6fb7cd
commit c298732f64
46 changed files with 1524 additions and 108 deletions

View File

@@ -16,8 +16,18 @@
* limitations under the License.
*/
mindplot.commands.ChangeFeatureToTopicCommand = new Class({
mindplot.commands.ChangeFeatureToTopicCommand = new Class(/** @lends ChangeFeatureToTopicCommand */{
Extends:mindplot.Command,
/**
* @extends mindplot.Command
* @constructs
* @param topicId
* @param featureId
* @param attributes
* @throws will throw an error if topicId is null or undefined
* @throws will throw an error if featureId is null or undefined
* @throws will throw an error if attributes is null or undefined
*/
initialize: function(topicId, featureId, attributes) {
$assert($defined(topicId), 'topicId can not be null');
$assert($defined(featureId), 'featureId can not be null');
@@ -29,6 +39,9 @@ mindplot.commands.ChangeFeatureToTopicCommand = new Class({
this._attributes = attributes;
},
/**
* Overrides abstract parent method
*/
execute: function(commandContext) {
var topic = commandContext.findTopics(this._topicId)[0];
var feature = topic.findFeatureById(this._featureId);
@@ -38,6 +51,10 @@ mindplot.commands.ChangeFeatureToTopicCommand = new Class({
this._attributes = oldAttributes;
},
/**
* Overrides abstract parent method
* @see {@link mindplot.Command.undoExecute}
*/
undoExecute: function(commandContext) {
this.execute(commandContext);
}