I am attempting to calculate the distance after a touch or mouse movement over two separate elements using OGX.JS. Utilizing the built-in touch dist function has been successful.
this.touch.dist.set({
target: '.box1',
cb_move: function(obj){ ... }
});
However, I am unsure how to add another calculation. If I try to add a second instance like this, it just overrides the first one.
this.touch.dist.set({
target: '.box2',
cb_move: function(obj){ ... }
});
Any assistance would be greatly appreciated. Thank you!