src/index.js
function checkDisplay () {
      var myPermissions = self.allProperties[resizeListenerId] // JSON.parse(el.dataset.responsives)
      var curWidth = window.innerWidth
      var initial = el.dataset.initialDisplay ? el.dataset.initialDisplay : ''
      var parameters = self._rPermissions[binding.arg]
      for (let i in parameters) {
        if (curWidth >= parameters[i].min && curWidth <= parameters[i].max) {
          if (myPermissions.lastBp !== i) {
            if (self.allProperties[resizeListenerId].useClass) {
              el.classList.add(myPermissions.bpSet + '-' + i)
              el.classList.remove(myPermissions.bpSet + '-' + myPermissions.lastBp)
            } else {
              el.style.display = myPermissions[i] ? initial : 'none'
            }

            self.allProperties[resizeListenerId].lastBp = i
          }
          break
        }
      }
    }
function checkDisplay () {
      var myPermissions = self.allProperties[resizeListenerId] // JSON.parse(el.dataset.responsives)
      var curWidth = window.innerWidth
      var initial = el.dataset.initialDisplay ? el.dataset.initialDisplay : ''
      var parameters = self._rPermissions[binding.arg]
      for (let i in parameters) {
        if (curWidth >= parameters[i].min && curWidth <= parameters[i].max) {
          if (myPermissions.lastBp !== i) {
            if (self.allProperties[resizeListenerId].useClass) {
              el.classList.add(myPermissions.bpSet + '-' + i)
              el.classList.remove(myPermissions.bpSet + '-' + myPermissions.lastBp)
            } else {
              el.style.display = myPermissions[i] ? initial : 'none'
            }

            self.allProperties[resizeListenerId].lastBp = i
          }
          break
        }
      }
    }
function checkDisplay ( ) { var myPermissions = self . allProperties [ resizeListenerId ] // JSON.parse(el.dataset.responsives) var curWidth = window . innerWidth var initial = el . dataset . initialDisplay ? el . dataset . initialDisplay : '' var parameters = self . _rPermissions [ binding . arg ] for ( let i in parameters ) { if ( curWidth >= parameters [ i ] . min && curWidth <= parameters [ i ] . max ) { if ( myPermissions . lastBp !== i ) { if ( self . allProperties [ resizeListenerId ] . useClass ) { el . classList . add ( myPermissions . bpSet + '-' + i ) el . classList . remove ( myPermissions . bpSet + '-' + myPermissions . lastBp ) } else { el . style . display = myPermissions [ i ] ? initial : 'none' } self . allProperties [ resizeListenerId ] . lastBp = i } break } } }
This function checks the current breakpoint constraints for this element
This function checks the current breakpoint constraints for this element