|
@ -99,7 +99,7 @@ Item.prototype.setParent = function(parent) { |
|
|
* @returns {{start: Number, end: Number}} range with a timestamp for start and end |
|
|
* @returns {{start: Number, end: Number}} range with a timestamp for start and end |
|
|
* @returns {boolean} True if visible |
|
|
* @returns {boolean} True if visible |
|
|
*/ |
|
|
*/ |
|
|
Item.prototype.isVisible = function(range) { |
|
|
|
|
|
|
|
|
Item.prototype.isVisible = function(range) { // eslint-disable-line no-unused-vars
|
|
|
return false; |
|
|
return false; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
@ -244,9 +244,6 @@ Item.prototype._repaintOnItemUpdateTimeTooltip = function (anchor) { |
|
|
this.data.editable !== false; |
|
|
this.data.editable !== false; |
|
|
|
|
|
|
|
|
if (this.selected && editable && !this.dom.onItemUpdateTimeTooltip) { |
|
|
if (this.selected && editable && !this.dom.onItemUpdateTimeTooltip) { |
|
|
// create and show tooltip
|
|
|
|
|
|
var me = this; |
|
|
|
|
|
|
|
|
|
|
|
var onItemUpdateTimeTooltip = document.createElement('div'); |
|
|
var onItemUpdateTimeTooltip = document.createElement('div'); |
|
|
|
|
|
|
|
|
onItemUpdateTimeTooltip.className = 'vis-onUpdateTime-tooltip'; |
|
|
onItemUpdateTimeTooltip.className = 'vis-onUpdateTime-tooltip'; |
|
@ -321,6 +318,7 @@ Item.prototype._repaintOnItemUpdateTimeTooltip = function (anchor) { |
|
|
*/ |
|
|
*/ |
|
|
Item.prototype._updateContents = function (element) { |
|
|
Item.prototype._updateContents = function (element) { |
|
|
var content; |
|
|
var content; |
|
|
|
|
|
var changed; |
|
|
var templateFunction; |
|
|
var templateFunction; |
|
|
var itemVisibleFrameContent; |
|
|
var itemVisibleFrameContent; |
|
|
var visibleFrameTemplateFunction; |
|
|
var visibleFrameTemplateFunction; |
|
@ -340,7 +338,7 @@ Item.prototype._updateContents = function (element) { |
|
|
if ((itemVisibleFrameContent instanceof Object) && !(itemVisibleFrameContent instanceof Element)) { |
|
|
if ((itemVisibleFrameContent instanceof Object) && !(itemVisibleFrameContent instanceof Element)) { |
|
|
visibleFrameTemplateFunction(itemData, itemVisibleFrameContentElement) |
|
|
visibleFrameTemplateFunction(itemData, itemVisibleFrameContentElement) |
|
|
} else { |
|
|
} else { |
|
|
var changed = this._contentToString(this.itemVisibleFrameContent) !== this._contentToString(itemVisibleFrameContent); |
|
|
|
|
|
|
|
|
changed = this._contentToString(this.itemVisibleFrameContent) !== this._contentToString(itemVisibleFrameContent); |
|
|
if (changed) { |
|
|
if (changed) { |
|
|
// only replace the content when changed
|
|
|
// only replace the content when changed
|
|
|
if (itemVisibleFrameContent instanceof Element) { |
|
|
if (itemVisibleFrameContent instanceof Element) { |
|
@ -371,7 +369,7 @@ Item.prototype._updateContents = function (element) { |
|
|
if ((content instanceof Object) && !(content instanceof Element)) { |
|
|
if ((content instanceof Object) && !(content instanceof Element)) { |
|
|
templateFunction(itemData, element) |
|
|
templateFunction(itemData, element) |
|
|
} else { |
|
|
} else { |
|
|
var changed = this._contentToString(this.content) !== this._contentToString(content); |
|
|
|
|
|
|
|
|
changed = this._contentToString(this.content) !== this._contentToString(content); |
|
|
if (changed) { |
|
|
if (changed) { |
|
|
// only replace the content when changed
|
|
|
// only replace the content when changed
|
|
|
if (content instanceof Element) { |
|
|
if (content instanceof Element) { |
|
@ -470,7 +468,7 @@ Item.prototype._updateEditStatus = function() { |
|
|
} else if(typeof this.options.editable === 'object') { |
|
|
} else if(typeof this.options.editable === 'object') { |
|
|
this.editable = {}; |
|
|
this.editable = {}; |
|
|
util.selectiveExtend(['updateTime', 'updateGroup', 'remove'], this.editable, this.options.editable); |
|
|
util.selectiveExtend(['updateTime', 'updateGroup', 'remove'], this.editable, this.options.editable); |
|
|
}; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
// Item data overrides, except if options.editable.overrideItems is set.
|
|
|
// Item data overrides, except if options.editable.overrideItems is set.
|
|
|
if (!this.options || !(this.options.editable) || (this.options.editable.overrideItems !== true)) { |
|
|
if (!this.options || !(this.options.editable) || (this.options.editable.overrideItems !== true)) { |
|
|