MOBILE-4372 course-format: Change user tour alignment in RTL
parent
813f731fa9
commit
abc6461f36
|
@ -51,6 +51,7 @@ import { CoreCourseCourseIndexTourComponent } from '../course-index-tour/course-
|
||||||
import { CoreDom } from '@singletons/dom';
|
import { CoreDom } from '@singletons/dom';
|
||||||
import { CoreUserTourDirectiveOptions } from '@directives/user-tour';
|
import { CoreUserTourDirectiveOptions } from '@directives/user-tour';
|
||||||
import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics';
|
import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics';
|
||||||
|
import { CorePlatform } from '@services/platform';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component to display course contents using a certain format. If the format isn't found, use default one.
|
* Component to display course contents using a certain format. If the format isn't found, use default one.
|
||||||
|
@ -93,7 +94,7 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy {
|
||||||
id: 'course-index',
|
id: 'course-index',
|
||||||
component: CoreCourseCourseIndexTourComponent,
|
component: CoreCourseCourseIndexTourComponent,
|
||||||
side: CoreUserToursSide.Top,
|
side: CoreUserToursSide.Top,
|
||||||
alignment: CoreUserToursAlignment.End,
|
alignment: CorePlatform.isRTL ? CoreUserToursAlignment.Start : CoreUserToursAlignment.End,
|
||||||
getFocusedElement: nativeButton => {
|
getFocusedElement: nativeButton => {
|
||||||
const innerButton = Array.from(nativeButton.shadowRoot?.children ?? []).find(child => child.tagName === 'BUTTON');
|
const innerButton = Array.from(nativeButton.shadowRoot?.children ?? []).find(child => child.tagName === 'BUTTON');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue