`

function setupInput() {


	input.addListener({
		down: function (x, y) {
			target = spineDemos.closest(canvas, renderer, skeleton, controlBones, hoverTargets, x, y);
		},
		up: function (x, y) {
			target = null;
		},
		dragged: function (x, y) {
					spineDemos.dragged(canvas, renderer, target, x, y);
		},
		moved: function (x, y) {
			spineDemos.closest(canvas, renderer, skeleton, controlBones, hoverTargets, x, y);
		}
	});
}

`

해당 함수가 hammer.js가 실행될때는 실행되지 않고, hammer.js가 실행되지 않을 경우에만 실행가능하게 할 수 없을까요?

one touch 경우 input.addlistener 실행
two touch 경우 input.addlistener 삭제
이렇게 구현 하고 싶은데 가능한가요?

해당 방법으로라도 문제를 해결 하고 싶어서 문의 드립니다.

Related Discussions
...

이를 수행하는 가장 간단한 방법은 inHammerJS라는 전역 변수를 사용하는 것입니다. hammer.js 콜백이 호출되면 true로 설정합니다. InputListener 함수의 콜백에서 변수를 확인하십시오. 사실이라면 코드를 실행하지 마십시오.

먼저 hammer.js를 등록하여 먼저 캔버스에서 입력 이벤트를 가져오도록 해야 합니다. 나는 그것이 hammer.js에서 어떻게 작동하는지 잘 모르겠습니다.

The simplest way to do this is to use say a global variable called inHammerJS. If any of the hammer.js callbacks are called, set it to true. Check the variable in the callbacks of the InputListener functions. If it is true, do not execute their code.

You need to also ensure that hammer.js gets the input events from the canvas first, by registering it first. I'm not sure how that works with hammer.js.