Fixed a bug with detecting a desktop landskape view and added a way of how to detect desktop portrait
This commit is contained in:
parent
b61c4d0cd8
commit
76b6720497
@ -374,7 +374,14 @@ Handlebars.registerHelper 'whiteboardSize', (section) ->
|
|||||||
navigator.userAgent.match(/webOS/i)
|
navigator.userAgent.match(/webOS/i)
|
||||||
|
|
||||||
@isLandscape = ->
|
@isLandscape = ->
|
||||||
window.matchMedia('(orientation: landscape)').matches
|
not isMobile() and
|
||||||
|
window.matchMedia('(orientation: landscape)').matches and # browser is landscape
|
||||||
|
window.matchMedia('(min-device-aspect-ratio: 1/1)').matches # device is landscape
|
||||||
|
|
||||||
|
@isPortrait = ->
|
||||||
|
not isMobile() and
|
||||||
|
window.matchMedia('(orientation: portrait)').matches and # browser is portrait
|
||||||
|
window.matchMedia('(min-device-aspect-ratio: 1/1)').matches # device is landscape
|
||||||
|
|
||||||
# Checks if the view is portrait and a mobile device is being used
|
# Checks if the view is portrait and a mobile device is being used
|
||||||
@isPortraitMobile = () ->
|
@isPortraitMobile = () ->
|
||||||
@ -385,8 +392,8 @@ Handlebars.registerHelper 'whiteboardSize', (section) ->
|
|||||||
# Checks if the view is landscape and mobile device is being used
|
# Checks if the view is landscape and mobile device is being used
|
||||||
@isLandscapeMobile = () ->
|
@isLandscapeMobile = () ->
|
||||||
isMobile() and
|
isMobile() and
|
||||||
window.matchMedia('(orientation: landscape)').matches and # browser is landscape
|
window.matchMedia('(orientation: landscape)').matches and # browser is landscape
|
||||||
window.matchMedia('(min-device-aspect-ratio: 1/1)').matches # device is landscape
|
window.matchMedia('(min-device-aspect-ratio: 1/1)').matches # device is landscape
|
||||||
|
|
||||||
# Checks if only one panel (userlist/whiteboard/chatbar) is currently open
|
# Checks if only one panel (userlist/whiteboard/chatbar) is currently open
|
||||||
@isOnlyOnePanelOpen = () ->
|
@isOnlyOnePanelOpen = () ->
|
||||||
|
Loading…
Reference in New Issue
Block a user