معلومات العرض
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يحدِّد RenderInfo
كيفية تنسيق العناصر المرئية للوحدة.
يتم إنشاء أيّ عنصر دائمًا من مدخلات واتصالات وحقول، ولكن يمكن عرض هذه العناصر بطرق مختلفة. على سبيل المثال، يمكن عرض تعريف الكتلة نفسه
باستخدام مدخلات مضمّنة أو مدخلات خارجية.

تحدِّد معلومات العرض التنسيق الذي يتم اختياره.
في الخطوة الأولى من العرض، تفحص معلومات العرض تعريف الكتلة،
وقياسات أجزائها المرئية. بعد ذلك، يحدّد التطبيق كيفية
عرض القسم، وينظم المعلومات وفقًا لذلك. تتم تحويل المعلومات
إلى عناصر ومباعدات غير متداخلة،
وتكون منظَّمة في صفوف غير متداخلة،
ومباعدات الصفوف.
بعد ذلك، يستخدم الدرج معلومات التنسيق المنظَّمة هذه لإنشاء ملف
مسارات SVG التي تمثّل الكتلة.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003e\u003ccode\u003eRenderInfo\u003c/code\u003e dictates the visual layout of a block's elements, such as inputs, connections, and fields, determining aspects like inline or external input placement.\u003c/p\u003e\n"],["\u003cp\u003eIt analyzes the block definition and element measurements to establish an optimal layout, organizing the information into elements, spacers, rows, and row spacers for a non-overlapping visual structure.\u003c/p\u003e\n"],["\u003cp\u003eThis organized layout information is then utilized by the drawer to generate the final SVG paths that visually represent the block.\u003c/p\u003e\n"]]],["`RenderInfo` defines a block's visual layout. It analyzes a block's inputs, connections, and fields, considering external or inline input options. It determines the layout, organizing visual components into non-overlapping elements, spacers, rows, and row spacers. This structured information is then passed to the drawer, which generates the SVG paths for the block's visual representation. The core task of the render info is to take visual elements and organize them.\n"],null,["# Render info\n\nThe [`RenderInfo`](/blockly/reference/js/blockly.blockrendering_namespace.renderinfo_class) determines how a block's visual elements get\nlaid out.\n\nA block is always built out of inputs, connections, and fields, but those\ncan be laid out in many different ways. For example, the same block definition\ncan be rendered with [inline inputs or external inputs](/blockly/guides/create-custom-blocks/define/inline-vs-external).\n\nThe render info determines which layout is chosen.\n\nAs the first step of rendering, the render info looks at the block's definition,\nand the measurements of its visual pieces. Then it decides how the block should\nbe laid out, and organizes the information accordingly. The information gets\nturned into non-overlapping [elements](/blockly/guides/create-custom-blocks/renderers/concepts/elements) and [spacers](/blockly/guides/create-custom-blocks/renderers/concepts/elements#element_spacer),\nwhich are organized into non-overlapping [rows](/blockly/guides/create-custom-blocks/renderers/concepts/rows), and\n[row spacers](/blockly/guides/create-custom-blocks/renderers/concepts/rows#row_spacer).\n\nThen the [drawer](/blockly/guides/create-custom-blocks/renderers/concepts/drawer) uses that organized layout information to create the\nSVG paths representing the block."]]