Remove ENABLE_CANVAS

This commit is contained in:
Tim Schaub
2017-12-12 17:18:41 -07:00
parent 0a12ca690f
commit 755619fa87
3 changed files with 11 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
/**
* @module ol/Map
*/
import {ENABLE_CANVAS, ENABLE_WEBGL, inherits} from './index.js';
import {ENABLE_WEBGL, inherits} from './index.js';
import _ol_PluggableMap_ from './PluggableMap.js';
import _ol_PluginType_ from './PluginType.js';
import _ol_control_ from './control.js';
@@ -19,15 +19,13 @@ import _ol_renderer_webgl_TileLayer_ from './renderer/webgl/TileLayer.js';
import _ol_renderer_webgl_VectorLayer_ from './renderer/webgl/VectorLayer.js';
if (ENABLE_CANVAS) {
_ol_plugins_.register(_ol_PluginType_.MAP_RENDERER, _ol_renderer_canvas_Map_);
_ol_plugins_.registerMultiple(_ol_PluginType_.LAYER_RENDERER, [
_ol_renderer_canvas_ImageLayer_,
_ol_renderer_canvas_TileLayer_,
_ol_renderer_canvas_VectorLayer_,
_ol_renderer_canvas_VectorTileLayer_
]);
}
_ol_plugins_.register(_ol_PluginType_.MAP_RENDERER, _ol_renderer_canvas_Map_);
_ol_plugins_.registerMultiple(_ol_PluginType_.LAYER_RENDERER, [
_ol_renderer_canvas_ImageLayer_,
_ol_renderer_canvas_TileLayer_,
_ol_renderer_canvas_VectorLayer_,
_ol_renderer_canvas_VectorTileLayer_
]);
if (ENABLE_WEBGL) {
_ol_plugins_.register(_ol_PluginType_.MAP_RENDERER, _ol_renderer_webgl_Map_);

View File

@@ -1,7 +1,7 @@
/**
* @module ol/has
*/
import {ENABLE_CANVAS, HAS_WEBGL} from './index.js';
import {HAS_WEBGL} from './index.js';
var _ol_has_ = {};
@@ -51,13 +51,12 @@ _ol_has_.CANVAS_LINE_DASH = false;
/**
* True if both the library and browser support Canvas. Always `false`
* if `ol.ENABLE_CANVAS` is set to `false` at compile time.
* True if the and browsers support Canvas.
* @const
* @type {boolean}
* @api
*/
_ol_has_.CANVAS = ENABLE_CANVAS && (
_ol_has_.CANVAS = (
/**
* @return {boolean} Canvas supported.
*/

View File

@@ -11,14 +11,6 @@ import webgl from './webgl.js';
export var DEFAULT_WMS_VERSION = '1.3.0';
/**
* @type {boolean} Enable the Canvas renderer. Default is `true`. Setting
* this to false at compile time in advanced mode removes all code
* supporting the Canvas renderer from the build.
*/
export var ENABLE_CANVAS = true;
/**
* @type {boolean} Enable integration with the Proj4js library. Default is
* `true`.
@@ -160,7 +152,6 @@ export default {
inherits: inherits,
VERSION: VERSION,
DEFAULT_WMS_VERSION: DEFAULT_WMS_VERSION,
ENABLE_CANVAS: ENABLE_CANVAS,
ENABLE_PROJ4JS: ENABLE_PROJ4JS,
ENABLE_RASTER_REPROJECTION: ENABLE_RASTER_REPROJECTION,
ENABLE_WEBGL: ENABLE_WEBGL,