LearnNewsExamplesServices
Frontmatter
id5171
titleEvent orientationchange
stateClosed
labels
enhancement
assignees[]
createdAtDec 12, 2023, 1:31 PM
updatedAtDec 12, 2023, 1:42 PM
githubUrlhttps://github.com/neomjs/neo/issues/5171
authorDinkh
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 12, 2023, 1:42 PM

Event orientationchange

Closed v8.1.0 enhancement
Dinkh
Dinkh commented on Dec 12, 2023, 1:31 PM

For mobile development, we need the orientationchange event as a global event.

Dinkh added the enhancement label on Dec 12, 2023, 1:31 PM
Dinkh
Dinkh Dec 12, 2023, 1:42 PM

Will be solved in the next version

@example

const me = this,
          orientation =  await Neo.Main.getByPath({path: 'window.orientation'});

if ((orientation % 180) !== 0) me.component.isLoading = 'Please rotate device'; me.component.app.on('orientationchange', me.onOrientationChange, me);

data = {
    orientation: 90,
    layout: 'landscape'
}
Dinkh closed this issue on Dec 12, 2023, 1:42 PM