|
@ -65,14 +65,7 @@ BackgroundItem.prototype.redraw = function() { |
|
|
|
|
|
|
|
|
// contents box
|
|
|
// contents box
|
|
|
dom.content = document.createElement('div'); |
|
|
dom.content = document.createElement('div'); |
|
|
if (this.data.content === undefined) { |
|
|
|
|
|
dom.content.className = 'noContent'; |
|
|
|
|
|
this.emptyContent = true; |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
dom.content.className = 'content'; |
|
|
|
|
|
this.emptyContent = false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
dom.content.className = 'content'; |
|
|
dom.box.appendChild(dom.content); |
|
|
dom.box.appendChild(dom.content); |
|
|
|
|
|
|
|
|
// attach this item as attribute
|
|
|
// attach this item as attribute
|
|
@ -99,16 +92,6 @@ BackgroundItem.prototype.redraw = function() { |
|
|
// - the item's data is changed
|
|
|
// - the item's data is changed
|
|
|
// - the item is selected/deselected
|
|
|
// - the item is selected/deselected
|
|
|
if (this.dirty) { |
|
|
if (this.dirty) { |
|
|
// only change content class when needed
|
|
|
|
|
|
if (this.data.content === undefined && this.emptyContent == false) { |
|
|
|
|
|
dom.content.className = 'noContent'; |
|
|
|
|
|
this.emptyContent = true; |
|
|
|
|
|
} |
|
|
|
|
|
else if (this.data.content !== undefined && this.emptyContent == true) { |
|
|
|
|
|
dom.content.className = 'content'; |
|
|
|
|
|
this.emptyContent = false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this._updateContents(this.dom.content); |
|
|
this._updateContents(this.dom.content); |
|
|
this._updateTitle(this.dom.content); |
|
|
this._updateTitle(this.dom.content); |
|
|
this._updateDataAttributes(this.dom.content); |
|
|
this._updateDataAttributes(this.dom.content); |
|
|