dicom-microscopy-viewer 0.34.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dicom-microscopy-viewer.js +257 -104
- package/docs/annotations__AnnotationManager.js.html +13 -2
- package/docs/annotations_markers_arrow.js.html +1 -1
- package/docs/annotations_markups__MarkupManager.js.html +31 -2
- package/docs/annotations_markups_measurement.js.html +1 -1
- package/docs/annotations_markups_textEvaluation.js.html +1 -1
- package/docs/annotations_markups_utils_getShortestLineBetweenOverlayAndFeature.js.html +1 -1
- package/docs/api.html +1 -1
- package/docs/channel.BlendingInformation.html +1 -1
- package/docs/channel._Channel.html +1 -1
- package/docs/channel.js.html +3 -3
- package/docs/dicom-microscopy-viewer.js.html +1 -1
- package/docs/events.html +1 -1
- package/docs/events.js.html +1 -1
- package/docs/global.html +1 -1
- package/docs/index.html +1 -1
- package/docs/metadata.Comprehensive3DSR.html +1 -1
- package/docs/metadata.VLWholeSlideMicroscopyImage.html +1 -1
- package/docs/metadata.html +1 -1
- package/docs/metadata.js.html +1 -1
- package/docs/renderingEngine.RenderingEngine.html +1 -1
- package/docs/renderingEngine.js.html +1 -1
- package/docs/roi.ROI.html +1 -1
- package/docs/roi.html +1 -1
- package/docs/roi.js.html +1 -1
- package/docs/scoord3d.Ellipse.html +1 -1
- package/docs/scoord3d.Ellipsoid.html +1 -1
- package/docs/scoord3d.Multipoint.html +1 -1
- package/docs/scoord3d.Point.html +1 -1
- package/docs/scoord3d.Polygon.html +1 -1
- package/docs/scoord3d.Polyline.html +1 -1
- package/docs/scoord3d.html +1 -1
- package/docs/scoord3d.js.html +7 -7
- package/docs/utils.html +1 -1
- package/docs/utils.js.html +1 -1
- package/docs/viewer.LabelImageViewer.html +2 -2
- package/docs/viewer.OverviewImageViewer.html +2 -2
- package/docs/viewer.VolumeImageViewer.html +54 -54
- package/docs/viewer.html +1 -1
- package/docs/viewer.js.html +42 -9
- package/package.json +2 -2
- package/src/annotations/_AnnotationManager.js +12 -1
- package/src/annotations/markups/_MarkupManager.js +30 -1
- package/src/channel.js +2 -2
- package/src/scoord3d.js +6 -6
- package/src/viewer.js +41 -8
|
@@ -76403,7 +76403,7 @@
|
|
|
76403
76403
|
* OpenLayers version.
|
|
76404
76404
|
* @type {string}
|
|
76405
76405
|
*/
|
|
76406
|
-
var VERSION = '6.
|
|
76406
|
+
var VERSION = '6.9.0';
|
|
76407
76407
|
|
|
76408
76408
|
var __extends$2 = (undefined && undefined.__extends) || (function () {
|
|
76409
76409
|
var extendStatics = function (d, b) {
|
|
@@ -78578,7 +78578,7 @@
|
|
|
78578
78578
|
throw new Error('coordinates of Point must be an array of length 3')
|
|
78579
78579
|
}
|
|
78580
78580
|
if (options.coordinates.some(c => c < 0)) {
|
|
78581
|
-
|
|
78581
|
+
console.warn('coordinates of Point are negative numbers');
|
|
78582
78582
|
}
|
|
78583
78583
|
super({
|
|
78584
78584
|
coordinates: options.coordinates,
|
|
@@ -78623,7 +78623,7 @@
|
|
|
78623
78623
|
throw new Error('coordinates of Multipoint must be an array of (X,Y,Z) triplets')
|
|
78624
78624
|
}
|
|
78625
78625
|
if (options.coordinates.find(c => c.some(item => item < 0))) {
|
|
78626
|
-
|
|
78626
|
+
console.warn('coordinates of Multipoint contain positive numbers');
|
|
78627
78627
|
}
|
|
78628
78628
|
super({
|
|
78629
78629
|
coordinates: options.coordinates,
|
|
@@ -78660,7 +78660,7 @@
|
|
|
78660
78660
|
throw new Error('coordinates of Polyline must be an array of (X,Y,Z) triplets')
|
|
78661
78661
|
}
|
|
78662
78662
|
if (options.coordinates.find(c => c.some(item => item < 0))) {
|
|
78663
|
-
|
|
78663
|
+
console.warn('coordinates of Polyline contain negative numbers');
|
|
78664
78664
|
}
|
|
78665
78665
|
super({
|
|
78666
78666
|
coordinates: options.coordinates,
|
|
@@ -78698,7 +78698,7 @@
|
|
|
78698
78698
|
throw new Error('coordinates of Polygon must be an array of (X,Y,Z) triplets')
|
|
78699
78699
|
}
|
|
78700
78700
|
if (options.coordinates.find(c => c.some(item => item < 0))) {
|
|
78701
|
-
|
|
78701
|
+
console.warn('coordinates of Polygon contain negative numbers');
|
|
78702
78702
|
}
|
|
78703
78703
|
const n = options.coordinates.length;
|
|
78704
78704
|
if ((options.coordinates[0][0] !== options.coordinates[n - 1][0]) ||
|
|
@@ -78747,7 +78747,7 @@
|
|
|
78747
78747
|
throw new Error('coordinates of Ellipsoid must be an array of (X,Y,Z) triplets')
|
|
78748
78748
|
}
|
|
78749
78749
|
if (options.coordinates.find(c => c.some(item => item < 0))) {
|
|
78750
|
-
|
|
78750
|
+
console.warn('coordinates of Ellipsoid contain negative numbers');
|
|
78751
78751
|
}
|
|
78752
78752
|
super({
|
|
78753
78753
|
coordinates: options.coordinates,
|
|
@@ -78789,7 +78789,7 @@
|
|
|
78789
78789
|
throw new Error('coordinates of Ellipse must be an array of (X,Y,Z) triplets')
|
|
78790
78790
|
}
|
|
78791
78791
|
if (options.coordinates.find(c => c.some(item => item < 0))) {
|
|
78792
|
-
|
|
78792
|
+
console.warn('coordinates of Ellipse contain negative numbers');
|
|
78793
78793
|
}
|
|
78794
78794
|
const firstAxis = [
|
|
78795
78795
|
options.coordinates[0][0] - options.coordinates[1][0],
|
|
@@ -88294,6 +88294,8 @@
|
|
|
88294
88294
|
* @property {import("./Image.js").default} [image] Image style.
|
|
88295
88295
|
* @property {RenderFunction} [renderer] Custom renderer. When configured, `fill`, `stroke` and `image` will be
|
|
88296
88296
|
* ignored, and the provided function will be called with each render frame for each geometry.
|
|
88297
|
+
* @property {RenderFunction} [hitDetectionRenderer] Custom renderer for hit detection. If provided will be used
|
|
88298
|
+
* in hit detection rendering.
|
|
88297
88299
|
* @property {import("./Stroke.js").default} [stroke] Stroke style.
|
|
88298
88300
|
* @property {import("./Text.js").default} [text] Text style.
|
|
88299
88301
|
* @property {number} [zIndex] Z index.
|
|
@@ -88423,6 +88425,14 @@
|
|
|
88423
88425
|
* @type {RenderFunction|null}
|
|
88424
88426
|
*/
|
|
88425
88427
|
this.renderer_ = options.renderer !== undefined ? options.renderer : null;
|
|
88428
|
+
/**
|
|
88429
|
+
* @private
|
|
88430
|
+
* @type {RenderFunction|null}
|
|
88431
|
+
*/
|
|
88432
|
+
this.hitDetectionRenderer_ =
|
|
88433
|
+
options.hitDetectionRenderer !== undefined
|
|
88434
|
+
? options.hitDetectionRenderer
|
|
88435
|
+
: null;
|
|
88426
88436
|
/**
|
|
88427
88437
|
* @private
|
|
88428
88438
|
* @type {import("./Stroke.js").default}
|
|
@@ -88477,6 +88487,24 @@
|
|
|
88477
88487
|
Style.prototype.setRenderer = function (renderer) {
|
|
88478
88488
|
this.renderer_ = renderer;
|
|
88479
88489
|
};
|
|
88490
|
+
/**
|
|
88491
|
+
* Sets a custom renderer function for this style used
|
|
88492
|
+
* in hit detection.
|
|
88493
|
+
* @param {RenderFunction|null} renderer Custom renderer function.
|
|
88494
|
+
* @api
|
|
88495
|
+
*/
|
|
88496
|
+
Style.prototype.setHitDetectionRenderer = function (renderer) {
|
|
88497
|
+
this.hitDetectionRenderer_ = renderer;
|
|
88498
|
+
};
|
|
88499
|
+
/**
|
|
88500
|
+
* Get the custom renderer function that was configured with
|
|
88501
|
+
* {@link #setHitDetectionRenderer} or the `hitDetectionRenderer` constructor option.
|
|
88502
|
+
* @return {RenderFunction|null} Custom renderer function.
|
|
88503
|
+
* @api
|
|
88504
|
+
*/
|
|
88505
|
+
Style.prototype.getHitDetectionRenderer = function () {
|
|
88506
|
+
return this.hitDetectionRenderer_;
|
|
88507
|
+
};
|
|
88480
88508
|
/**
|
|
88481
88509
|
* Get the geometry to be rendered.
|
|
88482
88510
|
* @return {string|import("../geom/Geometry.js").default|GeometryFunction}
|
|
@@ -89033,8 +89061,9 @@
|
|
|
89033
89061
|
* @param {import("../geom/SimpleGeometry.js").default} geometry Geometry.
|
|
89034
89062
|
* @param {import("../Feature.js").FeatureLike} feature Feature.
|
|
89035
89063
|
* @param {Function} renderer Renderer.
|
|
89064
|
+
* @param {Function} hitDetectionRenderer Renderer.
|
|
89036
89065
|
*/
|
|
89037
|
-
VectorContext.prototype.drawCustom = function (geometry, feature, renderer) { };
|
|
89066
|
+
VectorContext.prototype.drawCustom = function (geometry, feature, renderer, hitDetectionRenderer) { };
|
|
89038
89067
|
/**
|
|
89039
89068
|
* Render a geometry.
|
|
89040
89069
|
*
|
|
@@ -89318,70 +89347,75 @@
|
|
|
89318
89347
|
* @param {import("../../geom/SimpleGeometry.js").default} geometry Geometry.
|
|
89319
89348
|
* @param {import("../../Feature.js").FeatureLike} feature Feature.
|
|
89320
89349
|
* @param {Function} renderer Renderer.
|
|
89350
|
+
* @param {Function} hitDetectionRenderer Renderer.
|
|
89321
89351
|
*/
|
|
89322
|
-
CanvasBuilder.prototype.drawCustom = function (geometry, feature, renderer) {
|
|
89352
|
+
CanvasBuilder.prototype.drawCustom = function (geometry, feature, renderer, hitDetectionRenderer) {
|
|
89323
89353
|
this.beginGeometry(geometry, feature);
|
|
89324
89354
|
var type = geometry.getType();
|
|
89325
89355
|
var stride = geometry.getStride();
|
|
89326
89356
|
var builderBegin = this.coordinates.length;
|
|
89327
89357
|
var flatCoordinates, builderEnd, builderEnds, builderEndss;
|
|
89328
89358
|
var offset;
|
|
89329
|
-
|
|
89330
|
-
|
|
89331
|
-
|
|
89332
|
-
|
|
89333
|
-
|
|
89334
|
-
|
|
89335
|
-
|
|
89336
|
-
|
|
89337
|
-
var
|
|
89338
|
-
|
|
89339
|
-
|
|
89340
|
-
|
|
89341
|
-
|
|
89342
|
-
|
|
89343
|
-
|
|
89344
|
-
|
|
89345
|
-
|
|
89346
|
-
|
|
89347
|
-
|
|
89348
|
-
|
|
89349
|
-
|
|
89350
|
-
|
|
89351
|
-
|
|
89352
|
-
|
|
89353
|
-
|
|
89354
|
-
|
|
89355
|
-
|
|
89356
|
-
|
|
89357
|
-
|
|
89358
|
-
|
|
89359
|
-
|
|
89360
|
-
|
|
89361
|
-
|
|
89362
|
-
|
|
89363
|
-
|
|
89364
|
-
|
|
89365
|
-
|
|
89366
|
-
|
|
89367
|
-
|
|
89368
|
-
|
|
89369
|
-
|
|
89370
|
-
|
|
89371
|
-
|
|
89372
|
-
|
|
89373
|
-
|
|
89374
|
-
|
|
89375
|
-
|
|
89376
|
-
|
|
89377
|
-
|
|
89378
|
-
|
|
89379
|
-
|
|
89380
|
-
|
|
89381
|
-
|
|
89382
|
-
|
|
89383
|
-
|
|
89384
|
-
|
|
89359
|
+
switch (type) {
|
|
89360
|
+
case GeometryType.MULTI_POLYGON:
|
|
89361
|
+
flatCoordinates =
|
|
89362
|
+
/** @type {import("../../geom/MultiPolygon.js").default} */ (geometry).getOrientedFlatCoordinates();
|
|
89363
|
+
builderEndss = [];
|
|
89364
|
+
var endss =
|
|
89365
|
+
/** @type {import("../../geom/MultiPolygon.js").default} */ (geometry).getEndss();
|
|
89366
|
+
offset = 0;
|
|
89367
|
+
for (var i = 0, ii = endss.length; i < ii; ++i) {
|
|
89368
|
+
var myEnds = [];
|
|
89369
|
+
offset = this.drawCustomCoordinates_(flatCoordinates, offset, endss[i], stride, myEnds);
|
|
89370
|
+
builderEndss.push(myEnds);
|
|
89371
|
+
}
|
|
89372
|
+
this.instructions.push([
|
|
89373
|
+
Instruction.CUSTOM,
|
|
89374
|
+
builderBegin,
|
|
89375
|
+
builderEndss,
|
|
89376
|
+
geometry,
|
|
89377
|
+
renderer,
|
|
89378
|
+
inflateMultiCoordinatesArray,
|
|
89379
|
+
]);
|
|
89380
|
+
this.hitDetectionInstructions.push([
|
|
89381
|
+
Instruction.CUSTOM,
|
|
89382
|
+
builderBegin,
|
|
89383
|
+
builderEndss,
|
|
89384
|
+
geometry,
|
|
89385
|
+
hitDetectionRenderer || renderer,
|
|
89386
|
+
inflateMultiCoordinatesArray,
|
|
89387
|
+
]);
|
|
89388
|
+
break;
|
|
89389
|
+
case GeometryType.POLYGON:
|
|
89390
|
+
case GeometryType.MULTI_LINE_STRING:
|
|
89391
|
+
builderEnds = [];
|
|
89392
|
+
flatCoordinates =
|
|
89393
|
+
type == GeometryType.POLYGON
|
|
89394
|
+
? /** @type {import("../../geom/Polygon.js").default} */ (geometry).getOrientedFlatCoordinates()
|
|
89395
|
+
: geometry.getFlatCoordinates();
|
|
89396
|
+
offset = this.drawCustomCoordinates_(flatCoordinates, 0,
|
|
89397
|
+
/** @type {import("../../geom/Polygon.js").default|import("../../geom/MultiLineString.js").default} */ (geometry).getEnds(), stride, builderEnds);
|
|
89398
|
+
this.instructions.push([
|
|
89399
|
+
Instruction.CUSTOM,
|
|
89400
|
+
builderBegin,
|
|
89401
|
+
builderEnds,
|
|
89402
|
+
geometry,
|
|
89403
|
+
renderer,
|
|
89404
|
+
inflateCoordinatesArray,
|
|
89405
|
+
]);
|
|
89406
|
+
this.hitDetectionInstructions.push([
|
|
89407
|
+
Instruction.CUSTOM,
|
|
89408
|
+
builderBegin,
|
|
89409
|
+
builderEnds,
|
|
89410
|
+
geometry,
|
|
89411
|
+
hitDetectionRenderer || renderer,
|
|
89412
|
+
inflateCoordinatesArray,
|
|
89413
|
+
]);
|
|
89414
|
+
break;
|
|
89415
|
+
case GeometryType.LINE_STRING:
|
|
89416
|
+
case GeometryType.CIRCLE:
|
|
89417
|
+
flatCoordinates = geometry.getFlatCoordinates();
|
|
89418
|
+
builderEnd = this.appendFlatLineCoordinates(flatCoordinates, 0, flatCoordinates.length, stride, false, false);
|
|
89385
89419
|
this.instructions.push([
|
|
89386
89420
|
Instruction.CUSTOM,
|
|
89387
89421
|
builderBegin,
|
|
@@ -89390,19 +89424,57 @@
|
|
|
89390
89424
|
renderer,
|
|
89391
89425
|
inflateCoordinates,
|
|
89392
89426
|
]);
|
|
89393
|
-
|
|
89394
|
-
|
|
89395
|
-
|
|
89396
|
-
|
|
89397
|
-
|
|
89398
|
-
|
|
89399
|
-
|
|
89400
|
-
|
|
89401
|
-
|
|
89402
|
-
|
|
89403
|
-
geometry
|
|
89404
|
-
|
|
89405
|
-
|
|
89427
|
+
this.hitDetectionInstructions.push([
|
|
89428
|
+
Instruction.CUSTOM,
|
|
89429
|
+
builderBegin,
|
|
89430
|
+
builderEnd,
|
|
89431
|
+
geometry,
|
|
89432
|
+
hitDetectionRenderer || renderer,
|
|
89433
|
+
inflateCoordinates,
|
|
89434
|
+
]);
|
|
89435
|
+
break;
|
|
89436
|
+
case GeometryType.MULTI_POINT:
|
|
89437
|
+
flatCoordinates = geometry.getFlatCoordinates();
|
|
89438
|
+
builderEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);
|
|
89439
|
+
if (builderEnd > builderBegin) {
|
|
89440
|
+
this.instructions.push([
|
|
89441
|
+
Instruction.CUSTOM,
|
|
89442
|
+
builderBegin,
|
|
89443
|
+
builderEnd,
|
|
89444
|
+
geometry,
|
|
89445
|
+
renderer,
|
|
89446
|
+
inflateCoordinates,
|
|
89447
|
+
]);
|
|
89448
|
+
this.hitDetectionInstructions.push([
|
|
89449
|
+
Instruction.CUSTOM,
|
|
89450
|
+
builderBegin,
|
|
89451
|
+
builderEnd,
|
|
89452
|
+
geometry,
|
|
89453
|
+
hitDetectionRenderer || renderer,
|
|
89454
|
+
inflateCoordinates,
|
|
89455
|
+
]);
|
|
89456
|
+
}
|
|
89457
|
+
break;
|
|
89458
|
+
case GeometryType.POINT:
|
|
89459
|
+
flatCoordinates = geometry.getFlatCoordinates();
|
|
89460
|
+
this.coordinates.push(flatCoordinates[0], flatCoordinates[1]);
|
|
89461
|
+
builderEnd = this.coordinates.length;
|
|
89462
|
+
this.instructions.push([
|
|
89463
|
+
Instruction.CUSTOM,
|
|
89464
|
+
builderBegin,
|
|
89465
|
+
builderEnd,
|
|
89466
|
+
geometry,
|
|
89467
|
+
renderer,
|
|
89468
|
+
]);
|
|
89469
|
+
this.hitDetectionInstructions.push([
|
|
89470
|
+
Instruction.CUSTOM,
|
|
89471
|
+
builderBegin,
|
|
89472
|
+
builderEnd,
|
|
89473
|
+
geometry,
|
|
89474
|
+
hitDetectionRenderer || renderer,
|
|
89475
|
+
]);
|
|
89476
|
+
break;
|
|
89477
|
+
default:
|
|
89406
89478
|
}
|
|
89407
89479
|
this.endGeometry(feature);
|
|
89408
89480
|
};
|
|
@@ -91085,7 +91157,7 @@
|
|
|
91085
91157
|
* returned, and empty array will be returned.
|
|
91086
91158
|
*/
|
|
91087
91159
|
LayerRenderer.prototype.getDataAtPixel = function (pixel, frameState, hitTolerance) {
|
|
91088
|
-
return
|
|
91160
|
+
return null;
|
|
91089
91161
|
};
|
|
91090
91162
|
/**
|
|
91091
91163
|
* @return {LayerType} Layer.
|
|
@@ -94384,7 +94456,9 @@
|
|
|
94384
94456
|
* @private
|
|
94385
94457
|
*/
|
|
94386
94458
|
IconImage.prototype.replaceColor_ = function (pixelRatio) {
|
|
94387
|
-
if (!this.color_ ||
|
|
94459
|
+
if (!this.color_ ||
|
|
94460
|
+
this.canvas_[pixelRatio] ||
|
|
94461
|
+
this.imageState_ !== ImageState.LOADED) {
|
|
94388
94462
|
return;
|
|
94389
94463
|
}
|
|
94390
94464
|
var canvas = document.createElement('canvas');
|
|
@@ -95138,7 +95212,7 @@
|
|
|
95138
95212
|
}
|
|
95139
95213
|
var replay = replayGroup.getBuilder(style.getZIndex(), BuilderType.DEFAULT);
|
|
95140
95214
|
replay.drawCustom(
|
|
95141
|
-
/** @type {import("../geom/SimpleGeometry.js").default} */ (geometry), feature, style.getRenderer());
|
|
95215
|
+
/** @type {import("../geom/SimpleGeometry.js").default} */ (geometry), feature, style.getRenderer(), style.getHitDetectionRenderer());
|
|
95142
95216
|
}
|
|
95143
95217
|
/**
|
|
95144
95218
|
* @param {import("../render/canvas/BuilderGroup.js").default} replayGroup Replay group.
|
|
@@ -99045,15 +99119,15 @@
|
|
|
99045
99119
|
/**
|
|
99046
99120
|
* @typedef {Object} Options
|
|
99047
99121
|
* @property {string} [className='ol-full-screen'] CSS class name.
|
|
99048
|
-
* @property {string|Text} [label='\u2922'] Text label to use for the button.
|
|
99122
|
+
* @property {string|Text|HTMLElement} [label='\u2922'] Text label to use for the button.
|
|
99049
99123
|
* Instead of text, also an element (e.g. a `span` element) can be used.
|
|
99050
|
-
* @property {string|Text} [labelActive='\u00d7'] Text label to use for the
|
|
99124
|
+
* @property {string|Text|HTMLElement} [labelActive='\u00d7'] Text label to use for the
|
|
99051
99125
|
* button when full-screen is active.
|
|
99126
|
+
* Instead of text, also an element (e.g. a `span` element) can be used.
|
|
99052
99127
|
* @property {string} [activeClassName=className + '-true'] CSS class name for the button
|
|
99053
99128
|
* when full-screen is active.
|
|
99054
99129
|
* @property {string} [inactiveClassName=className + '-false'] CSS class name for the button
|
|
99055
99130
|
* when full-screen is inactive.
|
|
99056
|
-
* Instead of text, also an element (e.g. a `span` element) can be used.
|
|
99057
99131
|
* @property {string} [tipLabel='Toggle full-screen'] Text label to use for the button tip.
|
|
99058
99132
|
* @property {boolean} [keys=false] Full keyboard access.
|
|
99059
99133
|
* @property {HTMLElement|string} [target] Specify a target if you want the
|
|
@@ -99126,14 +99200,14 @@
|
|
|
99126
99200
|
var label = options.label !== undefined ? options.label : '\u2922';
|
|
99127
99201
|
/**
|
|
99128
99202
|
* @private
|
|
99129
|
-
* @type {Text}
|
|
99203
|
+
* @type {Text|HTMLElement}
|
|
99130
99204
|
*/
|
|
99131
99205
|
_this.labelNode_ =
|
|
99132
99206
|
typeof label === 'string' ? document.createTextNode(label) : label;
|
|
99133
99207
|
var labelActive = options.labelActive !== undefined ? options.labelActive : '\u00d7';
|
|
99134
99208
|
/**
|
|
99135
99209
|
* @private
|
|
99136
|
-
* @type {Text}
|
|
99210
|
+
* @type {Text|HTMLElement}
|
|
99137
99211
|
*/
|
|
99138
99212
|
_this.labelActiveNode_ =
|
|
99139
99213
|
typeof labelActive === 'string'
|
|
@@ -101829,18 +101903,24 @@
|
|
|
101829
101903
|
callback = arguments[animationCount - 1];
|
|
101830
101904
|
--animationCount;
|
|
101831
101905
|
}
|
|
101832
|
-
|
|
101906
|
+
var i = 0;
|
|
101907
|
+
for (; i < animationCount && !this.isDef(); ++i) {
|
|
101833
101908
|
// if view properties are not yet set, shortcut to the final state
|
|
101834
|
-
var state = arguments[
|
|
101909
|
+
var state = arguments[i];
|
|
101835
101910
|
if (state.center) {
|
|
101836
101911
|
this.setCenterInternal(state.center);
|
|
101837
101912
|
}
|
|
101838
101913
|
if (state.zoom !== undefined) {
|
|
101839
101914
|
this.setZoom(state.zoom);
|
|
101840
101915
|
}
|
|
101916
|
+
else if (state.resolution) {
|
|
101917
|
+
this.setResolution(state.resolution);
|
|
101918
|
+
}
|
|
101841
101919
|
if (state.rotation !== undefined) {
|
|
101842
101920
|
this.setRotation(state.rotation);
|
|
101843
101921
|
}
|
|
101922
|
+
}
|
|
101923
|
+
if (i === animationCount) {
|
|
101844
101924
|
if (callback) {
|
|
101845
101925
|
animationCallback(callback, true);
|
|
101846
101926
|
}
|
|
@@ -101851,7 +101931,7 @@
|
|
|
101851
101931
|
var resolution = this.targetResolution_;
|
|
101852
101932
|
var rotation = this.targetRotation_;
|
|
101853
101933
|
var series = [];
|
|
101854
|
-
for (
|
|
101934
|
+
for (; i < animationCount; ++i) {
|
|
101855
101935
|
var options = /** @type {AnimationOptions} */ (arguments[i]);
|
|
101856
101936
|
var animation = {
|
|
101857
101937
|
start: start,
|
|
@@ -104486,7 +104566,7 @@
|
|
|
104486
104566
|
* @property {boolean} [collapsed=true] Specify if attributions should
|
|
104487
104567
|
* be collapsed at startup.
|
|
104488
104568
|
* @property {string} [tipLabel='Attributions'] Text label to use for the button tip.
|
|
104489
|
-
* @property {string} [label='i'] Text label to use for the
|
|
104569
|
+
* @property {string|HTMLElement} [label='i'] Text label to use for the
|
|
104490
104570
|
* collapsed attributions button.
|
|
104491
104571
|
* Instead of text, also an element (e.g. a `span` element) can be used.
|
|
104492
104572
|
* @property {string} [expandClassName=className + '-expand'] CSS class name for the
|
|
@@ -105983,7 +106063,7 @@
|
|
|
105983
106063
|
* @property {boolean} [collapsible=true] Whether the control can be collapsed or not.
|
|
105984
106064
|
* @property {string|HTMLElement} [label='›'] Text label to use for the collapsed
|
|
105985
106065
|
* overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.
|
|
105986
|
-
* @property {Array<import("../layer/
|
|
106066
|
+
* @property {Array<import("../layer/Base.js").default>|import("../Collection.js").default<import("../layer/Base.js").default>} [layers]
|
|
105987
106067
|
* Layers for the overview map.
|
|
105988
106068
|
* @property {function(import("../MapEvent.js").default):void} [render] Function called when the control
|
|
105989
106069
|
* should be re-rendered. This is called in a `requestAnimationFrame` callback.
|
|
@@ -109219,7 +109299,7 @@
|
|
|
109219
109299
|
* Handles input of vector data by drag and drop.
|
|
109220
109300
|
*
|
|
109221
109301
|
* Note that the DragAndDrop interaction uses the TextDecoder() constructor if the supplied
|
|
109222
|
-
*
|
|
109302
|
+
* combination of formats read both text string and ArrayBuffer sources. Older browsers such
|
|
109223
109303
|
* as IE which do not support this will need a TextDecoder polyfill to be loaded before use.
|
|
109224
109304
|
*
|
|
109225
109305
|
* @api
|
|
@@ -138582,8 +138662,8 @@ b"+i+"*=d\
|
|
|
138582
138662
|
imagePixelSpacings.push(pixelSpacing);
|
|
138583
138663
|
|
|
138584
138664
|
physicalSizes.push([
|
|
138585
|
-
(totalPixelMatrixColumns * pixelSpacing[
|
|
138586
|
-
(totalPixelMatrixRows * pixelSpacing[
|
|
138665
|
+
(totalPixelMatrixColumns * pixelSpacing[1]).toFixed(4),
|
|
138666
|
+
(totalPixelMatrixRows * pixelSpacing[0]).toFixed(4)
|
|
138587
138667
|
]);
|
|
138588
138668
|
/*
|
|
138589
138669
|
* Compute the resolution at each pyramid level, since the zoom
|
|
@@ -140801,10 +140881,11 @@ b"+i+"*=d\
|
|
|
140801
140881
|
};
|
|
140802
140882
|
|
|
140803
140883
|
class _MarkupManager {
|
|
140804
|
-
constructor ({ map, pyramid, formatters, onClick, onStyle } = {}) {
|
|
140884
|
+
constructor ({ map, pyramid, drawingSource, formatters, onClick, onStyle } = {}) {
|
|
140805
140885
|
this._map = map;
|
|
140806
140886
|
this._pyramid = pyramid;
|
|
140807
140887
|
this._formatters = formatters;
|
|
140888
|
+
this._drawingSource = drawingSource;
|
|
140808
140889
|
|
|
140809
140890
|
this.onClick = onClick;
|
|
140810
140891
|
this.onStyle = onStyle;
|
|
@@ -140896,6 +140977,34 @@ b"+i+"*=d\
|
|
|
140896
140977
|
return id
|
|
140897
140978
|
}
|
|
140898
140979
|
|
|
140980
|
+
/**
|
|
140981
|
+
* Set markup visibility.
|
|
140982
|
+
*
|
|
140983
|
+
* @param {string} id The markup id
|
|
140984
|
+
* @param {boolean} isVisible The markup visibility
|
|
140985
|
+
*/
|
|
140986
|
+
setVisibility (id, isVisible) {
|
|
140987
|
+
const markup = this.get(id);
|
|
140988
|
+
if (!markup) {
|
|
140989
|
+
return;
|
|
140990
|
+
}
|
|
140991
|
+
|
|
140992
|
+
const links = this._links.getArray();
|
|
140993
|
+
const link = links.find((feature) => feature.getId() === id);
|
|
140994
|
+
|
|
140995
|
+
const feature = this._drawingSource.getFeatureById(id);
|
|
140996
|
+
|
|
140997
|
+
if (!isVisible) {
|
|
140998
|
+
this._map.removeOverlay(markup.overlay);
|
|
140999
|
+
this._links.remove(link);
|
|
141000
|
+
} else {
|
|
141001
|
+
this._map.addOverlay(markup.overlay);
|
|
141002
|
+
this._drawLink(feature);
|
|
141003
|
+
}
|
|
141004
|
+
|
|
141005
|
+
return isVisible
|
|
141006
|
+
}
|
|
141007
|
+
|
|
140899
141008
|
/**
|
|
140900
141009
|
* Creates a new markup
|
|
140901
141010
|
*
|
|
@@ -141559,10 +141668,11 @@ b"+i+"*=d\
|
|
|
141559
141668
|
const { Marker: Marker$1, Markup: Markup$1 } = Enums;
|
|
141560
141669
|
|
|
141561
141670
|
class _AnnotationManager {
|
|
141562
|
-
constructor ({ map, pyramid } = {}) {
|
|
141671
|
+
constructor ({ map, pyramid, drawingSource } = {}) {
|
|
141563
141672
|
const markupManager = new _MarkupManager({
|
|
141564
141673
|
map,
|
|
141565
141674
|
pyramid,
|
|
141675
|
+
drawingSource,
|
|
141566
141676
|
formatters: {
|
|
141567
141677
|
[Marker$1.Arrow]: format$5,
|
|
141568
141678
|
[Markup$1.Measurement]: format$6,
|
|
@@ -141658,6 +141768,16 @@ b"+i+"*=d\
|
|
|
141658
141768
|
this.props.markupManager.setVisible(isVisible);
|
|
141659
141769
|
}
|
|
141660
141770
|
|
|
141771
|
+
/**
|
|
141772
|
+
* Set markup visibility.
|
|
141773
|
+
*
|
|
141774
|
+
* @param {string} id The markup id
|
|
141775
|
+
* @param {boolean} isVisible The markup visibility
|
|
141776
|
+
*/
|
|
141777
|
+
setMarkupVisibility (id, isVisible) {
|
|
141778
|
+
this.props.markupManager.setVisibility(id, isVisible);
|
|
141779
|
+
}
|
|
141780
|
+
|
|
141661
141781
|
onAdd (feature) {
|
|
141662
141782
|
/**
|
|
141663
141783
|
* Add properties to ROI feature before triggering
|
|
@@ -142380,7 +142500,8 @@ b"+i+"*=d\
|
|
|
142380
142500
|
resolutions: this[_tileGrid].getResolutions(),
|
|
142381
142501
|
rotation: this[_rotation],
|
|
142382
142502
|
smoothResolutionConstraint: true,
|
|
142383
|
-
showFullExtent: true
|
|
142503
|
+
showFullExtent: true,
|
|
142504
|
+
extent: this[_referenceExtents]
|
|
142384
142505
|
});
|
|
142385
142506
|
|
|
142386
142507
|
// Create a rendering engine object for offscreen rendering
|
|
@@ -142469,7 +142590,9 @@ b"+i+"*=d\
|
|
|
142469
142590
|
rotation: this[_rotation],
|
|
142470
142591
|
zoom: 0,
|
|
142471
142592
|
minZoom: 0,
|
|
142472
|
-
maxZoom: 0
|
|
142593
|
+
maxZoom: 0,
|
|
142594
|
+
constrainOnlyCenter: true,
|
|
142595
|
+
center: getCenter(this[_referenceExtents])
|
|
142473
142596
|
});
|
|
142474
142597
|
|
|
142475
142598
|
this[_overviewMap] = new OverviewMap({
|
|
@@ -142487,7 +142610,7 @@ b"+i+"*=d\
|
|
|
142487
142610
|
keyboardEventTarget: document
|
|
142488
142611
|
});
|
|
142489
142612
|
|
|
142490
|
-
view.fit(this[_projection].getExtent(), this[_map$2].getSize());
|
|
142613
|
+
view.fit(this[_projection].getExtent(), { size: this[_map$2].getSize() });
|
|
142491
142614
|
|
|
142492
142615
|
/**
|
|
142493
142616
|
* OpenLayer's map has default active interactions
|
|
@@ -142537,7 +142660,8 @@ b"+i+"*=d\
|
|
|
142537
142660
|
|
|
142538
142661
|
this[_annotationManager] = new _AnnotationManager({
|
|
142539
142662
|
map: this[_map$2],
|
|
142540
|
-
pyramid: this[_pyramidMetadata]
|
|
142663
|
+
pyramid: this[_pyramidMetadata],
|
|
142664
|
+
drawingSource: this[_drawingSource]
|
|
142541
142665
|
});
|
|
142542
142666
|
|
|
142543
142667
|
// This updates the tiles offscreen rendering when zoom is applied to the view.
|
|
@@ -143031,7 +143155,7 @@ b"+i+"*=d\
|
|
|
143031
143155
|
this[_map$2].setTarget(options.container);
|
|
143032
143156
|
const view = this[_map$2].getView();
|
|
143033
143157
|
const projection = view.getProjection();
|
|
143034
|
-
view.fit(projection.getExtent(), this[_map$2].getSize());
|
|
143158
|
+
view.fit(projection.getExtent(), { size: this[_map$2].getSize() });
|
|
143035
143159
|
|
|
143036
143160
|
// Style scale element (overriding default Openlayers CSS "ol-scale-line")
|
|
143037
143161
|
const scaleElement = this[_controls].scale.element;
|
|
@@ -143058,6 +143182,26 @@ b"+i+"*=d\
|
|
|
143058
143182
|
scaleInnerElement.style.margin = '1px';
|
|
143059
143183
|
scaleInnerElement.style.willChange = 'contents,width';
|
|
143060
143184
|
|
|
143185
|
+
const overviewElement = this[_overviewMap].element;
|
|
143186
|
+
const overviewmapElement = Object.values(overviewElement.children).find(
|
|
143187
|
+
c => c.className === 'ol-overviewmap-map'
|
|
143188
|
+
);
|
|
143189
|
+
overviewmapElement.style.border = '1px solid black';
|
|
143190
|
+
// Try to fit the overview map into the target control overlay container
|
|
143191
|
+
const resizeFactor = 300;
|
|
143192
|
+
let width = Math.abs(this[_referenceExtents][1]) / resizeFactor;
|
|
143193
|
+
let height = Math.abs(this[_referenceExtents][2]) / resizeFactor;
|
|
143194
|
+
if (width > 400 || height > 400) {
|
|
143195
|
+
width /= 2;
|
|
143196
|
+
height /= 2;
|
|
143197
|
+
}
|
|
143198
|
+
if (width < 150 || height < 150) {
|
|
143199
|
+
width *= 1.5;
|
|
143200
|
+
height *= 1.5;
|
|
143201
|
+
}
|
|
143202
|
+
overviewmapElement.style.width = `${width}px`;
|
|
143203
|
+
overviewmapElement.style.height = `${height}px`;
|
|
143204
|
+
|
|
143061
143205
|
const container = this[_map$2].getTargetElement();
|
|
143062
143206
|
|
|
143063
143207
|
this[_drawingSource].on(VectorEventType.ADDFEATURE, (e) => {
|
|
@@ -143364,6 +143508,10 @@ b"+i+"*=d\
|
|
|
143364
143508
|
return
|
|
143365
143509
|
}
|
|
143366
143510
|
this[_map$2].addControl(this[_overviewMap]);
|
|
143511
|
+
const map = this[_overviewMap].getOverviewMap();
|
|
143512
|
+
const view = map.getView();
|
|
143513
|
+
const projection = view.getProjection();
|
|
143514
|
+
view.fit(projection.getExtent(), { size: map.getSize() });
|
|
143367
143515
|
}
|
|
143368
143516
|
|
|
143369
143517
|
/**
|
|
@@ -143725,6 +143873,8 @@ b"+i+"*=d\
|
|
|
143725
143873
|
this[_features].push(feature);
|
|
143726
143874
|
|
|
143727
143875
|
_setFeatureStyle(feature, styleOptions);
|
|
143876
|
+
const isVisible = Object.keys(styleOptions).length !== 0;
|
|
143877
|
+
this[_annotationManager].setMarkupVisibility(roi.uid, isVisible);
|
|
143728
143878
|
}
|
|
143729
143879
|
|
|
143730
143880
|
/**
|
|
@@ -143767,6 +143917,8 @@ b"+i+"*=d\
|
|
|
143767
143917
|
const id = feature.getId();
|
|
143768
143918
|
if (id === uid) {
|
|
143769
143919
|
_setFeatureStyle(feature, styleOptions);
|
|
143920
|
+
const isVisible = Object.keys(styleOptions).length !== 0;
|
|
143921
|
+
this[_annotationManager].setMarkupVisibility(id, isVisible);
|
|
143770
143922
|
}
|
|
143771
143923
|
});
|
|
143772
143924
|
}
|
|
@@ -143950,7 +144102,8 @@ b"+i+"*=d\
|
|
|
143950
144102
|
const view = new View({
|
|
143951
144103
|
center: getCenter(extent),
|
|
143952
144104
|
rotation: rotation,
|
|
143953
|
-
projection: projection
|
|
144105
|
+
projection: projection,
|
|
144106
|
+
extent: extent
|
|
143954
144107
|
});
|
|
143955
144108
|
|
|
143956
144109
|
// Creates the map with the defined layers and view and renders it.
|
|
@@ -143961,7 +144114,7 @@ b"+i+"*=d\
|
|
|
143961
144114
|
keyboardEventTarget: document
|
|
143962
144115
|
});
|
|
143963
144116
|
|
|
143964
|
-
view.fit(projection.getExtent(), this[_map$2].getSize());
|
|
144117
|
+
view.fit(projection.getExtent(), { size: this[_map$2].getSize() });
|
|
143965
144118
|
}
|
|
143966
144119
|
|
|
143967
144120
|
/** Renders the image in the specified viewport container.
|
|
@@ -143975,7 +144128,7 @@ b"+i+"*=d\
|
|
|
143975
144128
|
this[_map$2].setTarget(options.container);
|
|
143976
144129
|
const view = this[_map$2].getView();
|
|
143977
144130
|
const projection = view.getProjection();
|
|
143978
|
-
view.fit(projection.getExtent(), this[_map$2].getSize());
|
|
144131
|
+
view.fit(projection.getExtent(), { size: this[_map$2].getSize() });
|
|
143979
144132
|
|
|
143980
144133
|
this[_map$2].getInteractions().forEach((interaction) => {
|
|
143981
144134
|
this[_map$2].removeInteraction(interaction);
|