Fixed `transform` not creating/removing expand button when the type of a node changed
This commit is contained in:
parent
00f2ab0b76
commit
d3192e9fbe
|
@ -9,6 +9,8 @@ https://github.com/josdejong/jsoneditor
|
|||
can overflow the borders of the editor.
|
||||
- Fixed #568: mode switcher disappearing when selecting the current
|
||||
mode again.
|
||||
- Fixed `transform` not creating/removing expand button when the type
|
||||
of a node changed.
|
||||
|
||||
|
||||
## 2018-08-22, version 5.24.0
|
||||
|
|
|
@ -616,17 +616,16 @@ Node.prototype.setInternalValue = function(internalValue) {
|
|||
* Remove the DOM of this node and it's childs and recreate it again
|
||||
*/
|
||||
Node.prototype.recreateDom = function() {
|
||||
// only recreate dom if there is a dom already
|
||||
if (!this.dom || ! this.dom.tr || !this.dom.tr.parentNode) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.dom && this.dom.tr && this.dom.tr.parentNode) {
|
||||
var domAnchor = this._detachFromDom();
|
||||
|
||||
// delete the DOM
|
||||
this.clearDom();
|
||||
|
||||
this._attachToDom(domAnchor);
|
||||
}
|
||||
else {
|
||||
this.clearDom();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue