Skip to content

Commit

Permalink
Merge pull request #5 from imgix/4-fix-has-animation
Browse files Browse the repository at this point in the history
Fix `HAS_ANIMATION` when loaded before `body`
  • Loading branch information
paulstraw committed Jan 8, 2016
2 parents 79a2503 + 87d06ae commit b7aaabc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/luminous.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons

// All officially-supported browsers have this, but it's easy to
// account for, just in case.
var HAS_ANIMATION = 'animation' in document.body.style;
var HAS_ANIMATION = 'animation' in document.createElement('div').style;

var Lightbox = (function () {
function Lightbox() {
Expand Down Expand Up @@ -182,7 +182,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var VERSION = exports.VERSION = '0.1.2';
var VERSION = exports.VERSION = '0.1.3';

var Luminous = (function () {
function Luminous(trigger) {
Expand Down
2 changes: 1 addition & 1 deletion dist/luminous.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "luminous-lightbox",
"version": "0.1.2",
"version": "0.1.3",
"description": "A simple, lightweight, no-dependencies JavaScript image lightbox.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/js/Lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import throwIfMissing from './util/throwIfMissing';

// All officially-supported browsers have this, but it's easy to
// account for, just in case.
const HAS_ANIMATION = 'animation' in document.body.style;
const HAS_ANIMATION = 'animation' in document.createElement('div').style;

export default class Lightbox {
constructor(options = {}) {
Expand Down
2 changes: 1 addition & 1 deletion src/js/Luminous.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { isDOMElement } from './util/dom';
import injectBaseStylesheet from './injectBaseStylesheet';
import Lightbox from './Lightbox';

export const VERSION = '0.1.2';
export const VERSION = '0.1.3';

export default class Luminous {
constructor(trigger, options = {}) {
Expand Down

0 comments on commit b7aaabc

Please sign in to comment.