react-image-gallery
Advanced tools
Comparing version 0.6.2 to 0.6.3
@@ -39,6 +39,2 @@ 'use strict'; | ||
var _screenfull = require('screenfull'); | ||
var _screenfull2 = _interopRequireDefault(_screenfull); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -212,8 +208,12 @@ | ||
value: function fullScreen() { | ||
if (_screenfull2.default.enabled) { | ||
if (!_screenfull2.default.isFullscreen) { | ||
_screenfull2.default.request(this._imageGallery); | ||
} else { | ||
_screenfull2.default.exit(); | ||
} | ||
var gallery = this._imageGallery; | ||
if (gallery.requestFullscreen) { | ||
gallery.requestFullscreen(); | ||
} else if (gallery.msRequestFullscreen) { | ||
gallery.msRequestFullscreen(); | ||
} else if (gallery.mozRequestFullScreen) { | ||
gallery.mozRequestFullScreen(); | ||
} else if (gallery.webkitRequestFullscreen) { | ||
gallery.webkitRequestFullscreen(); | ||
} | ||
@@ -220,0 +220,0 @@ } |
{ | ||
"name": "react-image-gallery", | ||
"version": "0.6.2", | ||
"description": "React Image gallery, React Carousel, React Slide Show component", | ||
"version": "0.6.3", | ||
"description": "React Carousel, React Image gallery, React Slide Show component", | ||
"main": "./build/image-gallery", | ||
@@ -15,2 +15,3 @@ "scripts": { | ||
"react", | ||
"carousel", | ||
"react-component", | ||
@@ -25,3 +26,2 @@ "react-carousel", | ||
"image slider", | ||
"carousel", | ||
"slideshow", | ||
@@ -63,5 +63,4 @@ "gallery", | ||
"dependencies": { | ||
"react-swipeable": "^3.3.1", | ||
"screenfull": "^3.0.0" | ||
"react-swipeable": "^3.3.1" | ||
} | ||
} |
import React from 'react' | ||
import Swipeable from 'react-swipeable' | ||
import ScreenFull from 'screenfull' | ||
@@ -151,8 +150,12 @@ const MIN_INTERVAL = 500 | ||
fullScreen() { | ||
if (ScreenFull.enabled) { | ||
if (!ScreenFull.isFullscreen) { | ||
ScreenFull.request(this._imageGallery) | ||
} else { | ||
ScreenFull.exit() | ||
} | ||
const gallery = this._imageGallery | ||
if (gallery.requestFullscreen) { | ||
gallery.requestFullscreen() | ||
} else if (gallery.msRequestFullscreen) { | ||
gallery.msRequestFullscreen() | ||
} else if (gallery.mozRequestFullScreen) { | ||
gallery.mozRequestFullScreen() | ||
} else if (gallery.webkitRequestFullscreen) { | ||
gallery.webkitRequestFullscreen() | ||
} | ||
@@ -159,0 +162,0 @@ } |
276850
1
2207
- Removedscreenfull@^3.0.0
- Removedscreenfull@3.3.3(transitive)