Merge pull request #1776 from twpayne/fix-full-screen-test
Don't check for full screen support at load time
This commit is contained in:
@@ -3,6 +3,5 @@
|
|||||||
@exportProperty ol.BrowserFeature.HAS_CANVAS
|
@exportProperty ol.BrowserFeature.HAS_CANVAS
|
||||||
@exportProperty ol.BrowserFeature.HAS_DEVICE_ORIENTATION
|
@exportProperty ol.BrowserFeature.HAS_DEVICE_ORIENTATION
|
||||||
@exportProperty ol.BrowserFeature.HAS_GEOLOCATION
|
@exportProperty ol.BrowserFeature.HAS_GEOLOCATION
|
||||||
@exportProperty ol.BrowserFeature.HAS_FULLSCREEN
|
|
||||||
@exportProperty ol.BrowserFeature.HAS_TOUCH
|
@exportProperty ol.BrowserFeature.HAS_TOUCH
|
||||||
@exportProperty ol.BrowserFeature.HAS_WEBGL
|
@exportProperty ol.BrowserFeature.HAS_WEBGL
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ goog.provide('ol.BrowserFeature');
|
|||||||
goog.require('goog.dom');
|
goog.require('goog.dom');
|
||||||
goog.require('goog.dom.TagName');
|
goog.require('goog.dom.TagName');
|
||||||
goog.require('goog.userAgent');
|
goog.require('goog.userAgent');
|
||||||
goog.require('googx.dom.fullscreen');
|
|
||||||
goog.require('ol.webgl');
|
goog.require('ol.webgl');
|
||||||
|
|
||||||
|
|
||||||
@@ -142,15 +141,6 @@ ol.BrowserFeature.HAS_DEVICE_ORIENTATION =
|
|||||||
ol.BrowserFeature.HAS_DOM = ol.ENABLE_DOM;
|
ol.BrowserFeature.HAS_DOM = ol.ENABLE_DOM;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* True if browser supports the fullscreen API.
|
|
||||||
* @const
|
|
||||||
* @type {boolean}
|
|
||||||
* @todo stability experimental
|
|
||||||
*/
|
|
||||||
ol.BrowserFeature.HAS_FULLSCREEN = googx.dom.fullscreen.isSupported();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is HTML5 geolocation supported in the current browser?
|
* Is HTML5 geolocation supported in the current browser?
|
||||||
* @const
|
* @const
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ goog.require('goog.events');
|
|||||||
goog.require('goog.events.EventType');
|
goog.require('goog.events.EventType');
|
||||||
goog.require('googx.dom.fullscreen');
|
goog.require('googx.dom.fullscreen');
|
||||||
goog.require('googx.dom.fullscreen.EventType');
|
goog.require('googx.dom.fullscreen.EventType');
|
||||||
goog.require('ol.BrowserFeature');
|
|
||||||
goog.require('ol.control.Control');
|
goog.require('ol.control.Control');
|
||||||
goog.require('ol.css');
|
goog.require('ol.css');
|
||||||
|
|
||||||
@@ -66,7 +65,7 @@ ol.control.FullScreen = function(opt_options) {
|
|||||||
|
|
||||||
var element = goog.dom.createDom(goog.dom.TagName.DIV, {
|
var element = goog.dom.createDom(goog.dom.TagName.DIV, {
|
||||||
'class': this.cssClassName_ + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
|
'class': this.cssClassName_ + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
|
||||||
(!ol.BrowserFeature.HAS_FULLSCREEN ? ol.css.CLASS_UNSUPPORTED : '')
|
(!googx.dom.fullscreen.isSupported() ? ol.css.CLASS_UNSUPPORTED : '')
|
||||||
}, button);
|
}, button);
|
||||||
|
|
||||||
goog.base(this, {
|
goog.base(this, {
|
||||||
@@ -89,7 +88,7 @@ goog.inherits(ol.control.FullScreen, ol.control.Control);
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.control.FullScreen.prototype.handleClick_ = function(browserEvent) {
|
ol.control.FullScreen.prototype.handleClick_ = function(browserEvent) {
|
||||||
if (!ol.BrowserFeature.HAS_FULLSCREEN) {
|
if (!googx.dom.fullscreen.isSupported()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
browserEvent.preventDefault();
|
browserEvent.preventDefault();
|
||||||
|
|||||||
Reference in New Issue
Block a user