Named exports from ol/has
This commit is contained in:
@@ -12,7 +12,7 @@ import {intersects} from '../../extent.js';
|
||||
import GeometryType from '../../geom/GeometryType.js';
|
||||
import SimpleGeometry from '../../geom/SimpleGeometry.js';
|
||||
import _ol_geom_flat_transform_ from '../../geom/flat/transform.js';
|
||||
import _ol_has_ from '../../has.js';
|
||||
import {CANVAS_LINE_DASH} from '../../has.js';
|
||||
import VectorContext from '../VectorContext.js';
|
||||
import _ol_render_canvas_ from '../canvas.js';
|
||||
import _ol_transform_ from '../../transform.js';
|
||||
@@ -728,7 +728,7 @@ CanvasImmediateRenderer.prototype.setContextStrokeState_ = function(strokeState)
|
||||
const contextStrokeState = this.contextStrokeState_;
|
||||
if (!contextStrokeState) {
|
||||
context.lineCap = strokeState.lineCap;
|
||||
if (_ol_has_.CANVAS_LINE_DASH) {
|
||||
if (CANVAS_LINE_DASH) {
|
||||
context.setLineDash(strokeState.lineDash);
|
||||
context.lineDashOffset = strokeState.lineDashOffset;
|
||||
}
|
||||
@@ -749,7 +749,7 @@ CanvasImmediateRenderer.prototype.setContextStrokeState_ = function(strokeState)
|
||||
if (contextStrokeState.lineCap != strokeState.lineCap) {
|
||||
contextStrokeState.lineCap = context.lineCap = strokeState.lineCap;
|
||||
}
|
||||
if (_ol_has_.CANVAS_LINE_DASH) {
|
||||
if (CANVAS_LINE_DASH) {
|
||||
if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {
|
||||
context.setLineDash(contextStrokeState.lineDash = strokeState.lineDash);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import _ol_geom_flat_inflate_ from '../../geom/flat/inflate.js';
|
||||
import _ol_geom_flat_length_ from '../../geom/flat/length.js';
|
||||
import _ol_geom_flat_textpath_ from '../../geom/flat/textpath.js';
|
||||
import _ol_geom_flat_transform_ from '../../geom/flat/transform.js';
|
||||
import _ol_has_ from '../../has.js';
|
||||
import {CANVAS_LINE_DASH} from '../../has.js';
|
||||
import {isEmpty} from '../../obj.js';
|
||||
import VectorContext from '../VectorContext.js';
|
||||
import _ol_render_canvas_ from '../canvas.js';
|
||||
@@ -479,7 +479,7 @@ CanvasReplay.prototype.setStrokeStyle_ = function(context, instruction) {
|
||||
context.lineCap = /** @type {string} */ (instruction[3]);
|
||||
context.lineJoin = /** @type {string} */ (instruction[4]);
|
||||
context.miterLimit = /** @type {number} */ (instruction[5]);
|
||||
if (_ol_has_.CANVAS_LINE_DASH) {
|
||||
if (CANVAS_LINE_DASH) {
|
||||
context.lineDashOffset = /** @type {number} */ (instruction[7]);
|
||||
context.setLineDash(/** @type {Array.<number>} */ (instruction[6]));
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import {createCanvasContext2D} from '../../dom.js';
|
||||
import {intersects} from '../../extent.js';
|
||||
import _ol_geom_flat_straightchunk_ from '../../geom/flat/straightchunk.js';
|
||||
import GeometryType from '../../geom/GeometryType.js';
|
||||
import _ol_has_ from '../../has.js';
|
||||
import {CANVAS_LINE_DASH, SAFARI} from '../../has.js';
|
||||
import _ol_render_canvas_ from '../canvas.js';
|
||||
import CanvasInstruction from '../canvas/Instruction.js';
|
||||
import CanvasReplay from '../canvas/Replay.js';
|
||||
@@ -314,11 +314,11 @@ CanvasTextReplay.prototype.getImage = function(text, textKey, fillKey, strokeKey
|
||||
context.font = textState.font;
|
||||
if (strokeKey) {
|
||||
context.strokeStyle = strokeState.strokeStyle;
|
||||
context.lineWidth = strokeWidth * (_ol_has_.SAFARI ? scale : 1);
|
||||
context.lineWidth = strokeWidth * (SAFARI ? scale : 1);
|
||||
context.lineCap = strokeState.lineCap;
|
||||
context.lineJoin = strokeState.lineJoin;
|
||||
context.miterLimit = strokeState.miterLimit;
|
||||
if (_ol_has_.CANVAS_LINE_DASH && strokeState.lineDash.length) {
|
||||
if (CANVAS_LINE_DASH && strokeState.lineDash.length) {
|
||||
context.setLineDash(strokeState.lineDash);
|
||||
context.lineDashOffset = strokeState.lineDashOffset;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import {getUid, inherits} from '../../index.js';
|
||||
import {asColorLike} from '../../colorlike.js';
|
||||
import {createCanvasContext2D} from '../../dom.js';
|
||||
import GeometryType from '../../geom/GeometryType.js';
|
||||
import _ol_has_ from '../../has.js';
|
||||
import {CANVAS_LINE_DASH} from '../../has.js';
|
||||
import _ol_render_replay_ from '../replay.js';
|
||||
import _ol_render_webgl_ from '../webgl.js';
|
||||
import WebGLTextureReplay from '../webgl/TextureReplay.js';
|
||||
@@ -269,7 +269,7 @@ WebGLTextReplay.prototype.addCharToAtlas_ = function(char) {
|
||||
ctx.miterLimit = /** @type {number} */ (state.miterLimit);
|
||||
ctx.textAlign = 'left';
|
||||
ctx.textBaseline = 'top';
|
||||
if (_ol_has_.CANVAS_LINE_DASH && state.lineDash) {
|
||||
if (CANVAS_LINE_DASH && state.lineDash) {
|
||||
//FIXME: use pixelRatio
|
||||
ctx.setLineDash(state.lineDash);
|
||||
ctx.lineDashOffset = /** @type {number} */ (state.lineDashOffset);
|
||||
|
||||
Reference in New Issue
Block a user