Blockly akan dipindahkan ke Raspberry Pi Foundation pada 10 November 2025. Baca
blog
dan
FAQ.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
blockly > IIcon > getWeight
Metode IIcon.getWeight()
Tanda Tangan:
getWeight(): number;
Hasil:
angka
"bobot" ikon, yang menentukan urutan statis ikon yang harus dirender. Lebih banyak angka positif akan dirender lebih jauh menuju akhir blok.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-25 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-25 UTC."],[],["The `getWeight()` method, part of the `IIcon` interface, returns a number representing the icon's weight. This weight dictates the rendering order of icons on a block. Higher weight values result in the icon being rendered towards the end of the block. The method's signature is `getWeight(): number;` and the returned value is a numeric type.\n"]]