flex-layout icon indicating copy to clipboard operation
flex-layout copied to clipboard

ObservableMedia does not emit when largest viewport is active

Open TylerDev6 opened this issue 9 years ago • 7 comments

This seems to be happening with custom breakpoints and I'm using 2.0.0-beta6, but it may still be happening with other instances as well.

Here's a plunker that shows the custom breakpoints. Scaling the app up and down shows that events are emitted to console for small and medium, but not the largest size.

https://plnkr.co/edit/WvZtQ024vu2R816EMPQD?p=preview

TylerDev6 avatar May 03 '17 01:05 TylerDev6

@TylerDev6 - Your non-overlapping breakpoint ranges appear to be wrong

[{
    alias: 'xs',
    mediaQuery: 'screen and (max-width: 767px)'
}, {
    alias: 'sm',
    mediaQuery: 'screen and (max-width: 767px)'
}, {
    alias: 'md',
    mediaQuery: 'screen and (min-width: 768px) and (max-width: 1023px)'
}, {
    alias: 'lg',
    mediaQuery: 'screen and (min-width: 1024px)'
}, {
    alias: 'xl',
    mediaQuery: 'screen and (min-width: 1024px)'
}]

^ they are overlapping and often the same. Non-overlapping ranges must have distinct, unique, non-overlapping range values.

ThomasBurleson avatar May 03 '17 01:05 ThomasBurleson

right, that was a problem I had encountered. As you can see, I only really need 3 breakpoints but the API indicates that I must provide all 5. Since I didn't want layout changes triggered by the default xs and xl breakpoints I overrode them.

TylerDev6 avatar May 03 '17 01:05 TylerDev6

However, why would that actually cause the behaviour I'm seeing? xs / sm overlap but I still get emits for xs.... lg and xl overlap but I don't get emits for either.

TylerDev6 avatar May 03 '17 01:05 TylerDev6

Related to #245

ThomasBurleson avatar Jun 08 '17 02:06 ThomasBurleson

Will be fixed with PR #313.

See working plunker: https://plnkr.co/edit/yylQr2IdbGy2Yr00srrN?p=preview

ThomasBurleson avatar Jun 10 '17 17:06 ThomasBurleson

Fixed with SHA 00ac57a

ThomasBurleson avatar Jun 22 '17 21:06 ThomasBurleson

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.