Revert "Add ol.BrowserFeature.HAS_FULLSCREEN constant"
This reverts commit 5a940c207a.
Detection of full screeen support requires the document to have a body.
This is not the case if ol3 is loaded in the head. Therefore, defer the
test for full screen support to when it is needed.
This commit is contained in:
@@ -8,7 +8,6 @@ goog.require('goog.events');
|
||||
goog.require('goog.events.EventType');
|
||||
goog.require('googx.dom.fullscreen');
|
||||
goog.require('googx.dom.fullscreen.EventType');
|
||||
goog.require('ol.BrowserFeature');
|
||||
goog.require('ol.control.Control');
|
||||
goog.require('ol.css');
|
||||
|
||||
@@ -66,7 +65,7 @@ ol.control.FullScreen = function(opt_options) {
|
||||
|
||||
var element = goog.dom.createDom(goog.dom.TagName.DIV, {
|
||||
'class': this.cssClassName_ + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
|
||||
(!ol.BrowserFeature.HAS_FULLSCREEN ? ol.css.CLASS_UNSUPPORTED : '')
|
||||
(!googx.dom.fullscreen.isSupported() ? ol.css.CLASS_UNSUPPORTED : '')
|
||||
}, button);
|
||||
|
||||
goog.base(this, {
|
||||
@@ -89,7 +88,7 @@ goog.inherits(ol.control.FullScreen, ol.control.Control);
|
||||
* @private
|
||||
*/
|
||||
ol.control.FullScreen.prototype.handleClick_ = function(browserEvent) {
|
||||
if (!ol.BrowserFeature.HAS_FULLSCREEN) {
|
||||
if (!googx.dom.fullscreen.isSupported()) {
|
||||
return;
|
||||
}
|
||||
browserEvent.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user