Fixed taphandler problems.
This commit is contained in:
+12
-9
@@ -774,12 +774,13 @@ export class AbstractScatter extends Throwable {
|
||||
}
|
||||
|
||||
onEnd(event, interaction) {
|
||||
//console.log("Scatter.onEnd", this.dragging)
|
||||
console.log("Scatter.onEnd", this.dragging)
|
||||
if (interaction.isFinished()) {
|
||||
this.endGesture(interaction)
|
||||
this.dragging = false
|
||||
for (let key of interaction.ended.keys()) {
|
||||
if (interaction.isTap(key)) {
|
||||
console.log("Scatter.isTap")
|
||||
let point = interaction.ended.get(key)
|
||||
this.onTap(event, interaction, point)
|
||||
}
|
||||
@@ -804,7 +805,16 @@ export class AbstractScatter extends Throwable {
|
||||
}
|
||||
}
|
||||
|
||||
onTap(event, interaction, point) {}
|
||||
//onTap(event, interaction, point) {}
|
||||
|
||||
onTap(event, interaction, point) {
|
||||
console.log("AbstractScatter.onTap", this.tapDelegate, interaction)
|
||||
if (this.tapDelegate) {
|
||||
Events.stop(event)
|
||||
this.tapDelegate.tap(event, 'scatter')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onDragUpdate(delta) {
|
||||
if (this.onTransform != null) {
|
||||
@@ -1351,13 +1361,6 @@ export class DOMScatter extends AbstractScatter {
|
||||
TweenLite.set(this.element, { zIndex: DOMScatter.zIndex++ })
|
||||
}
|
||||
|
||||
onTap(event, interaction, point) {
|
||||
if (this.tapDelegate) {
|
||||
Events.stop(event)
|
||||
this.tapDelegate.tap(event, 'scatter')
|
||||
}
|
||||
}
|
||||
|
||||
isDescendant(parent, child) {
|
||||
let node = child.parentNode
|
||||
while (node != null) {
|
||||
|
||||
Reference in New Issue
Block a user