add jsdoc to mindplot module
--HG-- branch : mindplot_jsdoc
This commit is contained in:
@@ -16,8 +16,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
mindplot.commands.AddFeatureToTopicCommand = new Class({
|
||||
mindplot.commands.AddFeatureToTopicCommand = new Class(/** @lends AddFeatureToTopicCommand */{
|
||||
Extends:mindplot.Command,
|
||||
/**
|
||||
* @classdesc This command class handles do/undo of adding features to topics, e.g. an
|
||||
* icon or a note. For a reference of existing features, refer to {@link mindplot.TopicFeature}
|
||||
* @constructs
|
||||
* @param {String} topicId the id of the topic
|
||||
* @param {String} featureType the id of the feature type to add, e.g. "icon"
|
||||
* @param {Object} attributes the attribute(s) of the respective feature model
|
||||
* @extends mindplot.Command
|
||||
* @see mindplot.model.FeatureModel and subclasses
|
||||
*/
|
||||
initialize:function (topicId, featureType, attributes) {
|
||||
|
||||
$assert($defined(topicId), 'topicId can not be null');
|
||||
@@ -31,6 +41,9 @@ mindplot.commands.AddFeatureToTopicCommand = new Class({
|
||||
this._featureModel = null;
|
||||
},
|
||||
|
||||
/**
|
||||
* Overrides abstract parent method
|
||||
*/
|
||||
execute:function (commandContext) {
|
||||
var topic = commandContext.findTopics(this._topicId)[0];
|
||||
|
||||
@@ -42,6 +55,10 @@ mindplot.commands.AddFeatureToTopicCommand = new Class({
|
||||
topic.addFeature(this._featureModel);
|
||||
},
|
||||
|
||||
/**
|
||||
* Overrides abstract parent method
|
||||
* @see {@link mindplot.Command.undoExecute}
|
||||
*/
|
||||
undoExecute:function (commandContext) {
|
||||
var topic = commandContext.findTopics(this._topicId)[0];
|
||||
topic.removeFeature(this._featureModel);
|
||||
|
Reference in New Issue
Block a user