isScreenNarrow - how best to modify max-width?

Hi Enyo Folks,
I'm working on a project that relies on isScreenNarrow() to switch to showing only 1 panel at a time in a collapsingArranger. It works great, except that I only want that behavior at max-width: 540px. I can alter the 2.7 lib/layout like so:
<br />// Enyo 2.7<br />//==============================<br />// lib/layout/src/Panels/Panels.js - line 851:<br />//==============================<br />isScreenNarrow: function () {<br />  if(Panels.isNarrowDevice()) {<br />    return true;<br />  } else {<br />    return dom.getWindowWidth() <= 540; /* <<< Change value from 800 to 540 */<br />  }<br />},<br />  <br />// and //<br />//==============================<br />// lib/layout/src/Panels/Panels.css - line 7:<br />//==============================<br />@media all and (max-width: 540px) { /* <<< Change value from 800px to 540px */<br />  .enyo-panels-fit-narrow > * {<br />    min-width: 100%;<br />    max-width: 100%;<br />  }<br />}<br />//================================<br />
But this makes me feel dirty and seems it would entail maintaining a fork and I don't even know how that would work with enyo-dev...
Is there a better way to modify this behavior?
Sign In or Register to comment.