mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-12 07:10:07 +02:00
Fix 'element could not be removed:[object Object] fixed.
This commit is contained in:
parent
2c5f7139d5
commit
7ba21f85bf
@ -115,14 +115,16 @@ mindplot.DragTopic = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
removeFromWorkspace:function (workspace) {
|
removeFromWorkspace:function (workspace) {
|
||||||
// Remove drag shadow.
|
if (this._isInWorkspace) {
|
||||||
workspace.removeChild(this._elem2d);
|
// Remove drag shadow.
|
||||||
this._isInWorkspace = false;
|
workspace.removeChild(this._elem2d);
|
||||||
|
|
||||||
// Remove pivot shape. To improve performace it will not be removed. Only the visibility will be changed.
|
// Remove pivot shape. To improve performance it will not be removed. Only the visibility will be changed.
|
||||||
var dragPivot = this._getDragPivot();
|
var dragPivot = this._getDragPivot();
|
||||||
dragPivot.setVisibility(false);
|
dragPivot.setVisibility(false);
|
||||||
|
|
||||||
|
this._isInWorkspace = false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
isInWorkspace:function () {
|
isInWorkspace:function () {
|
||||||
@ -130,10 +132,12 @@ mindplot.DragTopic = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
addToWorkspace:function (workspace) {
|
addToWorkspace:function (workspace) {
|
||||||
workspace.appendChild(this._elem2d);
|
if (!this._isInWorkspace) {
|
||||||
var dragPivot = this._getDragPivot();
|
workspace.appendChild(this._elem2d);
|
||||||
dragPivot.addToWorkspace(workspace);
|
var dragPivot = this._getDragPivot();
|
||||||
this._isInWorkspace = true;
|
dragPivot.addToWorkspace(workspace);
|
||||||
|
this._isInWorkspace = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
_getDragPivot:function () {
|
_getDragPivot:function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user