Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
blockly > Kliknij > checkTouchIdentifier
Funkcja Touch.checkTouchIdentifier()
Sprawdź, czy identyfikator wskaźnika w zdarzeniu jest zgodny z zapisanym obecnie identyfikatorem. Jeśli obecny identyfikator nie został skonfigurowany, zapisz identyfikator ze zdarzenia. Rozpoczyna się przeciągnięcie lub gest, podczas którego zdarzenia wskaźnika z innymi identyfikatorami są dyskretnie ignorowane.
Podpis:
export declare function checkTouchIdentifier(e: PointerEvent): boolean;
Parametry
Parametr |
Typ |
Opis |
e |
PointerEvent |
Zdarzenie wskaźnika. |
Zwroty:
wartość logiczna
Określa, czy identyfikator zdarzenia jest zgodny z zapisanym obecnie identyfikatorem.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-09-12 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2024-09-12 UTC."],[[["This function, `checkTouchIdentifier`, assesses if a pointer event's identifier aligns with a stored identifier, initiating a drag/gesture if it's a new interaction."],["During a drag/gesture, events from other pointer identifiers are disregarded, ensuring focus on the primary interaction."],["The function utilizes a `PointerEvent` to extract the identifier and returns a boolean indicating whether the event's identifier matches the saved one."]]],[]]