Named exports from ol/array module
This commit is contained in:
committed by
Frederic Junod
parent
767f61ba78
commit
02002082bf
@@ -6,7 +6,7 @@
|
||||
// FIXME add offset and end to ol.geom.flat.transform.transform2D?
|
||||
|
||||
import {inherits} from '../../index.js';
|
||||
import _ol_array_ from '../../array.js';
|
||||
import {equals} from '../../array.js';
|
||||
import {asColorLike} from '../../colorlike.js';
|
||||
import {intersects} from '../../extent.js';
|
||||
import GeometryType from '../../geom/GeometryType.js';
|
||||
@@ -755,8 +755,7 @@ _ol_render_canvas_Immediate_.prototype.setContextStrokeState_ = function(strokeS
|
||||
contextStrokeState.lineCap = context.lineCap = strokeState.lineCap;
|
||||
}
|
||||
if (_ol_has_.CANVAS_LINE_DASH) {
|
||||
if (!_ol_array_.equals(
|
||||
contextStrokeState.lineDash, strokeState.lineDash)) {
|
||||
if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {
|
||||
context.setLineDash(contextStrokeState.lineDash = strokeState.lineDash);
|
||||
}
|
||||
if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/render/canvas/Replay
|
||||
*/
|
||||
import {getUid, inherits, nullFunction} from '../../index.js';
|
||||
import _ol_array_ from '../../array.js';
|
||||
import {equals, reverseSubArray} from '../../array.js';
|
||||
import {asColorLike} from '../../colorlike.js';
|
||||
import {buffer, clone, coordinateRelationship, createEmpty, createOrUpdate,
|
||||
createOrUpdateEmpty, extend, extendCoordinate, intersects} from '../../extent.js';
|
||||
@@ -542,7 +542,7 @@ _ol_render_canvas_Replay_.prototype.replay_ = function(
|
||||
instructions, featureCallback, opt_hitExtent) {
|
||||
/** @type {Array.<number>} */
|
||||
var pixelCoordinates;
|
||||
if (this.pixelCoordinates_ && _ol_array_.equals(transform, this.renderedTransform_)) {
|
||||
if (this.pixelCoordinates_ && equals(transform, this.renderedTransform_)) {
|
||||
pixelCoordinates = this.pixelCoordinates_;
|
||||
} else {
|
||||
if (!this.pixelCoordinates_) {
|
||||
@@ -898,7 +898,7 @@ _ol_render_canvas_Replay_.prototype.reverseHitDetectionInstructions = function()
|
||||
begin = i;
|
||||
} else if (type == _ol_render_canvas_Instruction_.BEGIN_GEOMETRY) {
|
||||
instruction[2] = i;
|
||||
_ol_array_.reverseSubArray(this.hitDetectionInstructions, begin, i);
|
||||
reverseSubArray(this.hitDetectionInstructions, begin, i);
|
||||
begin = -1;
|
||||
}
|
||||
}
|
||||
@@ -1013,7 +1013,7 @@ _ol_render_canvas_Replay_.prototype.updateStrokeStyle = function(state, applyStr
|
||||
var miterLimit = state.miterLimit;
|
||||
if (state.currentStrokeStyle != strokeStyle ||
|
||||
state.currentLineCap != lineCap ||
|
||||
(lineDash != state.currentLineDash && !_ol_array_.equals(state.currentLineDash, lineDash)) ||
|
||||
(lineDash != state.currentLineDash && !equals(state.currentLineDash, lineDash)) ||
|
||||
state.currentLineDashOffset != lineDashOffset ||
|
||||
state.currentLineJoin != lineJoin ||
|
||||
state.currentLineWidth != lineWidth ||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/render/canvas/ReplayGroup
|
||||
*/
|
||||
import {inherits} from '../../index.js';
|
||||
import _ol_array_ from '../../array.js';
|
||||
import {numberSafeCompareFunction} from '../../array.js';
|
||||
import {createCanvasContext2D} from '../../dom.js';
|
||||
import {buffer, createEmpty, extendCoordinate} from '../../extent.js';
|
||||
import _ol_geom_flat_transform_ from '../../geom/flat/transform.js';
|
||||
@@ -192,7 +192,7 @@ _ol_render_canvas_ReplayGroup_.getCircleArray_ = function(radius) {
|
||||
* @param {number} rotation Rotation.
|
||||
*/
|
||||
_ol_render_canvas_ReplayGroup_.replayDeclutter = function(declutterReplays, context, rotation) {
|
||||
var zs = Object.keys(declutterReplays).map(Number).sort(_ol_array_.numberSafeCompareFunction);
|
||||
var zs = Object.keys(declutterReplays).map(Number).sort(numberSafeCompareFunction);
|
||||
var skippedFeatureUids = {};
|
||||
for (var z = 0, zz = zs.length; z < zz; ++z) {
|
||||
var replayData = declutterReplays[zs[z].toString()];
|
||||
@@ -423,7 +423,7 @@ _ol_render_canvas_ReplayGroup_.prototype.replay = function(context,
|
||||
|
||||
/** @type {Array.<number>} */
|
||||
var zs = Object.keys(this.replaysByZIndex_).map(Number);
|
||||
zs.sort(_ol_array_.numberSafeCompareFunction);
|
||||
zs.sort(numberSafeCompareFunction);
|
||||
|
||||
// setup clipping so that the parts of over-simplified geometries are not
|
||||
// visible outside the current extent when panning
|
||||
@@ -479,7 +479,7 @@ _ol_render_canvas_ReplayGroup_.prototype.replayHitDetection_ = function(
|
||||
featureCallback, opt_hitExtent, opt_declutterReplays) {
|
||||
/** @type {Array.<number>} */
|
||||
var zs = Object.keys(this.replaysByZIndex_).map(Number);
|
||||
zs.sort(_ol_array_.numberSafeCompareFunction);
|
||||
zs.sort(numberSafeCompareFunction);
|
||||
|
||||
var i, j, replays, replay, result;
|
||||
for (i = zs.length - 1; i >= 0; --i) {
|
||||
|
||||
Reference in New Issue
Block a user