|
|
@ -137,16 +137,12 @@ Item.prototype._repaintDeleteButton = function (anchor) { |
|
|
|
deleteButton.className = 'delete'; |
|
|
|
deleteButton.title = 'Delete this item'; |
|
|
|
|
|
|
|
// TODO: neatly handle button click
|
|
|
|
// TODO: be able to destroy the delete button
|
|
|
|
new Hammer(deleteButton).on('tap', function (event) { |
|
|
|
me.parent.removeFromDataSet(me); |
|
|
|
event.srcEvent.stopPropagation(); // TODO: stopPropagation seems not to work
|
|
|
|
event.stopPropagation(); |
|
|
|
event.preventDefault(); |
|
|
|
}); |
|
|
|
//deleteButton.addEventListener('click', function (event) {
|
|
|
|
// me.parent.removeFromDataSet(me);
|
|
|
|
// event.stopPropagation();
|
|
|
|
// event.preventDefault();
|
|
|
|
//});
|
|
|
|
|
|
|
|
anchor.appendChild(deleteButton); |
|
|
|
this.dom.deleteButton = deleteButton; |
|
|
|