vis-timeline icon indicating copy to clipboard operation
vis-timeline copied to clipboard

Problem Editing Entries that are also extendable

Open NReib opened this issue 1 year ago • 1 comments

Movable entries of a timeline have a small overlay on the right and left edge that can be used to extend the duration of the entry. When this area is double-clicked in order to edit the entry, instead of firing onUpdate, the onAdd-Event is fired.

Is this expected behaviour like in a copy function or is it a bug?

NReib avatar Mar 20 '24 10:03 NReib

To me it seems like the event handler is missing on the dragRight / dragLeft Element

I manually added them by copying it from the dragCenter Element.

                let me = this;
	        this.hammerDragRight.on('tap', function (event) {
	          me.parent.itemSet.body.emitter.emit('click', {
	            event: event,
	            item: me.id
	          });
	        });
	        this.hammerDragRight.on('doubletap', function (event) {
	          event.stopPropagation();
	          me.parent.itemSet._onUpdateItem(me);
	          me.parent.itemSet.body.emitter.emit('doubleClick', {
	            event: event,
	            item: me.id
	          });
	        });

NReib avatar Mar 20 '24 13:03 NReib