ember-responsive
Advanced tools
Comparing version 1.2.3 to 1.2.4
import Ember from 'ember'; | ||
import getOwner from 'ember-getowner-polyfill'; | ||
import nullMatchMedia from './null-match-media'; | ||
/** | ||
@@ -100,3 +103,3 @@ * Handles detecting and responding to media queries. | ||
*/ | ||
mql: window.matchMedia, | ||
mql: detectMatchMedia(), | ||
@@ -110,3 +113,5 @@ /** | ||
init: function() { | ||
const breakpoints = this.container.lookupFactory('breakpoints:main'); | ||
const breakpoints = this.get('breakpoints'); | ||
const owner = getOwner(this); | ||
owner.registerOptionsForType('breakpoints', { instantiate: false }); | ||
if (breakpoints) { | ||
@@ -121,2 +126,6 @@ for (var name in breakpoints) { | ||
breakpoints: Ember.computed(function() { | ||
return getOwner(this).lookup('breakpoints:main'); | ||
}), | ||
/** | ||
@@ -183,1 +192,9 @@ * A string composed of all the matching matchers' names, turned into | ||
}); | ||
function detectMatchMedia() { | ||
if (typeof window === 'object' && window.matchMedia) { | ||
return window.matchMedia; | ||
} | ||
return nullMatchMedia; | ||
} |
# Changelog | ||
### 1.2.4 | ||
- Support fastboot (#56 @tomdale) | ||
- Remove use of private method `lookupFactory` (#57 @poteto) | ||
- fix ember 2.3 deprecations (#53 @minichate) | ||
### 1.2.3 | ||
@@ -4,0 +9,0 @@ - fix compatibility with older versions of emnber (#47 @alexbaizeau) |
{ | ||
"name": "ember-responsive", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "An ember-cli addon that give you a simple, Ember-aware way of dealing with media queries.", | ||
@@ -22,3 +22,3 @@ "directories": { | ||
"broccoli-asset-rev": "^2.2.0", | ||
"ember-cli": "1.13.8", | ||
"ember-cli": "1.13.13", | ||
"ember-cli-app-version": "^1.0.0", | ||
@@ -30,5 +30,5 @@ "ember-cli-content-security-policy": "0.4.0", | ||
"ember-cli-inject-live-reload": "^1.3.1", | ||
"ember-cli-qunit": "^1.0.3", | ||
"ember-cli-release": "0.2.7", | ||
"ember-cli-sri": "^1.1.0", | ||
"ember-cli-qunit": "^1.0.4", | ||
"ember-cli-release": "0.2.8", | ||
"ember-cli-sri": "^1.2.0", | ||
"ember-cli-uglify": "^1.2.0", | ||
@@ -38,2 +38,3 @@ "ember-disable-prototype-extensions": "^1.0.0", | ||
"ember-export-application-global": "^1.0.4", | ||
"ember-getowner-polyfill": "1.0.0", | ||
"ember-resolver": "^2.0.3", | ||
@@ -47,3 +48,3 @@ "ember-try": "~0.0.8" | ||
"dependencies": { | ||
"ember-cli-babel": "^5.1.5" | ||
"ember-cli-babel": "^5.1.6" | ||
}, | ||
@@ -50,0 +51,0 @@ "ember-addon": { |
@@ -68,2 +68,3 @@ # ember-responsive [![Build Status](https://travis-ci.org/freshbooks/ember-responsive.svg?branch=master)](https://travis-ci.org/freshbooks/ember-responsive) [![Ember Observer Score](http://emberobserver.com/badges/ember-responsive.svg)](http://emberobserver.com/addons/ember-responsive) | ||
npm install | ||
bower install | ||
npm test | ||
@@ -70,0 +71,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15134
263
76
18
Updatedember-cli-babel@^5.1.6