Survei Riset: Ceritakan pengalaman Anda dengan Blockly
Mulai survei
blockly > WorkspaceSvg > setScale
Metode WorkspaceSvg.setScale()
Tetapkan faktor zoom ruang kerja.
Tanda Tangan:
setScale(newScale: number): void;
Parameter
Parameter |
Jenis |
Deskripsi |
newScale |
angka |
Faktor zoom. Unit: (piksel / workspaceUnit). |
Hasil:
void
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 2024-10-11 UTC.
[null,null,["Terakhir diperbarui pada 2024-10-11 UTC."],[[["Sets the zoom level of the workspace, controlling how large or small blocks and other elements appear."],["Takes a single argument, `newScale`, which represents the zoom factor as a ratio of pixels to workspace units."],["Modifies the workspace's zoom directly and doesn't return any value."],["`setScale` method belongs to the `WorkspaceSvg` class within the Blockly library and is used to dynamically adjust the visual scale of the workspace."]]],[]]