Removed alerts

This commit is contained in:
Sebastian Kupke 2022-11-08 13:58:10 +01:00
parent 7965c8459b
commit 8275dad36c

View File

@ -533,7 +533,6 @@ export default class Card {
popup.placeAt(position)
InteractionMapper.on(this.interactionType, popup.element, () => {
alert(1)
this._cleanup(context)
})
@ -644,7 +643,7 @@ export default class Card {
let selector = Card.popupHtmlSelector
let content = { html, selector }
console.log('loadPopup', selector, content)
console.log('loadPopup', selector, html)
let isSame = Card._checkForActiveSource(context, src)
Card._cleanup(context)
@ -1065,7 +1064,6 @@ export default class Card {
// captured from the whole subcard.
InteractionMapper.on(this.interactionType, zoomedFig, () => {
alert(2)
this._cleanup(wrapper)
})
@ -1280,7 +1278,6 @@ export default class Card {
},
})
alert(3)
InteractionMapper.off(zoomedFig)
}
}
@ -1330,9 +1327,7 @@ export default class Card {
/* Removes the 'default' cleanup on the card */
clone.removeAttribute('onclick')
alert(4)
InteractionMapper.on(this.interactionType, clone, () => {
alert(5)
this._cleanup(context)
})
@ -1472,10 +1467,8 @@ export default class Card {
if (enableNearestNeighborTaps) {
//look for nearby popups on tap
alert(6)
InteractionMapper.on('tap', indexbox, () => {
// console.log('Tap handler called', editable)
alert(7)
if (!editable) {
this.findNearbyPopups(event, card)
}
@ -1487,9 +1480,7 @@ export default class Card {
// Use the 'tap' event for closing.
// Otherwise the subcard cannot be closed,
// when another subcard is touched.
alert(8)
InteractionMapper.on('tap', iconClone, () => {
alert(9)
if (editable) {
let isDirty = mainController.askSaveNode()
if (isDirty) {
@ -1671,7 +1662,6 @@ export default class Card {
let handler = `Card.openIndexCard(event, '${url}')`
if (this.debug) console.log('File has changed', target, handler)
alert(10)
//TODO If this is required, it should be accessing the interaction type.
target.setAttribute('onclick', handler)
}
@ -2077,7 +2067,6 @@ export default class Card {
* @memberof Card
*/
static registerEvent(context, types, element, callback) {
alert(11)
InteractionMapper.on(types, element, callback)
if (context._registeredEvents == null) context._registeredEvents = []
if (context._registeredEvents.indexOf(element) == -1) context._registeredEvents.push(element)
@ -2093,7 +2082,6 @@ export default class Card {
*/
static unregisterAllEvents(context) {
let eventElements = this.getRegisteredEvents(context)
alert(12)
InteractionMapper.off(eventElements)
}
}