Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
blockly > utils > dom > startTextWidthCache
Funkcja utils.dom.startTextWidthCache()
Rozpocznij buforowanie szerokości tekstu. Każde wywołanie tej funkcji MUSI także wywoływać stopTextWidthCache. Pamięć podręczna nie może działać między wątkami wykonywania.
Podpis:
export declare function startTextWidthCache(): void;
Zwroty:
nieważne
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-08-22 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-08-22 UTC."],[[["Initializes a cache for measuring text widths, improving performance for frequent text measurements."],["This function must be paired with `stopTextWidthCache()` to properly manage the cache and prevent memory leaks."],["Text width caches should not persist across different execution threads to avoid data inconsistencies."],["The function primarily serves as an internal optimization for Blockly and does not typically require direct user interaction."]]],["The `startTextWidthCache()` function initiates the caching of text widths. It's crucial that each invocation of this function is paired with a subsequent call to `stopTextWidthCache()`. The caching mechanism is designed for temporary use within a single execution thread and should not persist across different threads. This function does not return any value.\n"]]