implement PointerEvent logic.