- Try to fix feature remove issues.
This commit is contained in:
@@ -31,7 +31,7 @@ mindplot.model.FeatureModel = new Class({
|
||||
|
||||
initialize:function (type, id) {
|
||||
$assert(type, 'type can not be null');
|
||||
this._id = $defined(id) ? this._id : mindplot.model.FeatureModel._nextUUID();
|
||||
this._id = $defined(id) ? id : mindplot.model.FeatureModel._nextUUID();
|
||||
|
||||
this._type = type;
|
||||
this._attributes = {};
|
||||
|
@@ -17,17 +17,17 @@
|
||||
*/
|
||||
|
||||
mindplot.model.IconModel = new Class({
|
||||
Extends: mindplot.model.FeatureModel,
|
||||
initialize:function(attributes) {
|
||||
this.parent(mindplot.model.IconModel.FEATURE_TYPE);
|
||||
Extends:mindplot.model.FeatureModel,
|
||||
initialize:function (attributes, id) {
|
||||
this.parent(mindplot.model.IconModel.FEATURE_TYPE, id);
|
||||
this.setIconType(attributes.id);
|
||||
},
|
||||
|
||||
getIconType : function() {
|
||||
getIconType:function () {
|
||||
return this.getAttribute('id');
|
||||
},
|
||||
|
||||
setIconType : function(iconType) {
|
||||
setIconType:function (iconType) {
|
||||
$assert(iconType, 'iconType id can not be null');
|
||||
this.setAttribute('id', iconType);
|
||||
}
|
||||
|
@@ -18,8 +18,8 @@
|
||||
|
||||
mindplot.model.LinkModel = new Class({
|
||||
Extends:mindplot.model.FeatureModel,
|
||||
initialize:function (attributes) {
|
||||
this.parent(mindplot.model.LinkModel.FEATURE_TYPE);
|
||||
initialize:function (attributes,id) {
|
||||
this.parent(mindplot.model.LinkModel.FEATURE_TYPE,id);
|
||||
this.setUrl(attributes.url);
|
||||
},
|
||||
|
||||
|
@@ -18,8 +18,8 @@
|
||||
|
||||
mindplot.model.NoteModel = new Class({
|
||||
Extends:mindplot.model.FeatureModel,
|
||||
initialize:function (attributes) {
|
||||
this.parent(mindplot.model.NoteModel.FEATURE_TYPE);
|
||||
initialize:function (attributes, id) {
|
||||
this.parent(mindplot.model.NoteModel.FEATURE_TYPE, id);
|
||||
var noteText = attributes.text ? attributes.text : " ";
|
||||
this.setText(noteText);
|
||||
},
|
||||
|
Reference in New Issue
Block a user