تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
blockly > blockRendering > PathObject > setClass_
طريقة blockRendering.PathObject.setClass_()
يمكنك إضافة فئة CSS المحدّدة أو إزالتها على عنصر SVG الجذر لعنصر المسار.
Signature:
protected setClass_(className: string, add: boolean): void;
المعلمات
المعلمة |
النوع |
الوصف |
اسم الفئة |
سلسلة |
اسم الفئة المطلوب إضافتها أو إزالتها |
إضافة |
منطقي |
صحيح إذا كان يجب إضافة الفئة. خطأ إذا كان يجب إزالتها. |
المرتجعات:
فراغ
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-08-21 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2024-08-21 (حسب التوقيت العالمي المتفَّق عليه)"],[[["The `blockRendering.PathObject.setClass_()` method allows you to dynamically add or remove CSS classes on a path object's root SVG element."],["This method accepts two parameters: `className` (string) specifying the class name and `add` (boolean) indicating whether to add or remove the class."],["Utilizing this method enables you to control the styling and appearance of path objects within Blockly's block rendering system."]]],["The `setClass_()` method of the `PathObject` in the `blockRendering` namespace adds or removes a CSS class on the root SVG element. It takes two parameters: `className` (the class name) and `add` (a boolean indicating whether to add or remove the class). If `add` is true, the class is added; if false, it's removed. This method returns void.\n"]]