حرکت
فضای کار اصلی Blockly را می توان با استفاده از سه روش مختلف جابجا کرد: نوارهای اسکرول، ماوس یا چرخ ماوس.
تنظیمات حرکت توسط یک شی که بخشی از پیکربندی Blockly است تعریف می شود. در اینجا یک مثال است:
var workspace = Blockly.inject('blocklyDiv',
{move:{
scrollbars: {
horizontal: true,
vertical: true
},
drag: true,
wheel: false}
});
تعیین می کند که آیا فضای کاری دارای نوار پیمایش عمودی یا افقی است. یک شی را می گیرد که در آن ویژگی horizontal
تعیین می کند که آیا پیمایش افقی فعال است و ویژگی vertical
تعیین می کند که آیا پیمایش عمودی فعال است یا خیر. اگر یک بولی ارسال شود، معادل ارسال یک شی با خصوصیات horizontal
و vertical
به عنوان آن مقدار است. اگر فضای کاری دارای دسته باشد، پیشفرض true
است (پیمایش افقی و عمودی فعال است).
بکشید
تعیین می کند که آیا فضای کاری می تواند با ماوس کشیده شود یا خیر. اگر scrollbars
false
باشد، همیشه false
است (حداقل در تجزیه گزینه ها). اگر scrollbars
true
باشد، پیش فرض true
است.
چرخ
تعیین می کند که آیا می توان فضای کاری را با چرخ ماوس پیمایش کرد یا خیر. اگر scrollbars
false
باشد، همیشه false
است (حداقل در تجزیه گزینه ها). پیش فرض ها به false
.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-09 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-09 بهوقت ساعت هماهنگ جهانی."],[[["Blockly workspaces can be navigated using scrollbars, mouse dragging, and mouse wheel scrolling."],["These navigation options are configurable through Blockly's initialization options using the `move` property and its sub-properties: `scrollbars`, `drag`, and `wheel`."],["Scrollbars can be individually enabled or disabled for horizontal and vertical scrolling, while dragging and wheel scrolling are enabled or disabled with boolean values."]]],["Blockly's workspace movement is configured via the `move` object within its settings. This configuration allows defining the behavior of scrollbars, mouse dragging, and mouse wheel scrolling. `scrollbars` enables horizontal and/or vertical scrolling. `drag` enables mouse dragging, dependent on scrollbars being enabled. `wheel` enables mouse wheel scrolling, also dependent on scrollbars. Default settings include both scrollbars enabled and mouse dragging enabled, but mouse wheel disabled. If scrollbars are false then drag and wheel will be false as well.\n"]]