ol 7.1.1-dev.1669817699137 → 7.1.1-dev.1669879706951
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/interaction/Snap.d.ts.map +1 -1
- package/interaction/Snap.js +12 -13
- package/package.json +1 -1
- package/source/Stamen.js +2 -2
- package/util.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Snap.d.ts","sourceRoot":"","sources":["Snap.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"Snap.d.ts","sourceRoot":"","sources":["Snap.js"],"names":[],"mappings":";;;;;YA2Bc,OAAO,kBAAkB,EAAE,UAAU,GAAC,IAAI;;;;iBAC1C,OAAO,aAAa,EAAE,KAAK,GAAC,IAAI;;;;;;aAKhC,OAAO,eAAe,EAAE,OAAO;;;;aAC/B,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAoC1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;IACE;;OAEG;IACH,2CAoGC;IAnFC;;;OAGG;IACH,gBAAqD;IAErD;;;OAGG;IACH,gBAAmE;IAEnE;;;OAGG;IACH,cAA6D;IAE7D;;;OAGG;IACH,kBAA2D;IAE3D;;;OAGG;IACH,8BAA+B;IAE/B;;;OAGG;IACH,mCAAoC;IAEpC;;;;;OAKG;IACH,gCAAiC;IAEjC;;;;;;OAMG;IACH,yBAA0B;IAE1B;;;OAGG;IACH,wBACoE;IAEpE;;;;OAIG;IACH,eAAyB;IAEzB;;;;OAIG;IACH,6BAUC;IAGH;;;;;;OAMG;IACH,oBALW,OAAO,eAAe,EAAE,OAAO,wCA0CzC;IAED;;;OAGG;IACH,2BAEC;IAED;;;OAGG;IACH,8BAEC;IAED;;;OAGG;IACH,qBASC;IAeD;;;OAGG;IACH,0BAGC;IAED;;;OAGG;IACH,6BAGC;IAED;;;OAGG;IACH,6BAUC;IAgBD;;;;;;OAMG;IACH,uBALW,OAAO,eAAe,EAAE,OAAO,wCA0BzC;IAED;;;;;OAKG;IACH,YAFW,OAAO,WAAW,EAAE,OAAO,QAkDrC;IAED;;;;;OAKG;IACH,cALW,OAAO,aAAa,EAAE,KAAK,mBAC3B,OAAO,kBAAkB,EAAE,UAAU,OACrC,OAAO,WAAW,EAAE,OAAO,GAC1B,MAAM,GAAC,IAAI,CAuGtB;IAED;;;OAGG;IACH,uBAGC;IAED;;;;OAIG;IACH,+BAiBC;IAED;;;;OAIG;IACH,2CAQC;IAED;;;;OAIG;IACH,mCAKC;IAED;;;;OAIG;IACH,wCAQC;IAED;;;;OAIG;IACH,mCAIC;IAED;;;;OAIG;IACH,qCAWC;IAED;;;;OAIG;IACH,8BAEC;IAED;;;;OAIG;IACH,gCAQC;CACF"}
|
package/interaction/Snap.js
CHANGED
|
@@ -7,7 +7,7 @@ import PointerInteraction from './Pointer.js';
|
|
|
7
7
|
import RBush from '../structs/RBush.js';
|
|
8
8
|
import VectorEventType from '../source/VectorEventType.js';
|
|
9
9
|
import {FALSE, TRUE} from '../functions.js';
|
|
10
|
-
import {boundingExtent, createEmpty} from '../extent.js';
|
|
10
|
+
import {boundingExtent, buffer, createEmpty} from '../extent.js';
|
|
11
11
|
import {
|
|
12
12
|
closestOnCircle,
|
|
13
13
|
closestOnSegment,
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
fromUserCoordinate,
|
|
19
19
|
getUserProjection,
|
|
20
20
|
toUserCoordinate,
|
|
21
|
+
toUserExtent,
|
|
21
22
|
} from '../proj.js';
|
|
22
23
|
import {getUid} from '../util.js';
|
|
23
24
|
import {listen, unlistenByKey} from '../events.js';
|
|
@@ -427,15 +428,16 @@ class Snap extends PointerInteraction {
|
|
|
427
428
|
* @return {Result|null} Snap result
|
|
428
429
|
*/
|
|
429
430
|
snapTo(pixel, pixelCoordinate, map) {
|
|
430
|
-
const
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
431
|
+
const projection = map.getView().getProjection();
|
|
432
|
+
const projectedCoordinate = fromUserCoordinate(pixelCoordinate, projection);
|
|
433
|
+
|
|
434
|
+
const box = toUserExtent(
|
|
435
|
+
buffer(
|
|
436
|
+
boundingExtent([projectedCoordinate]),
|
|
437
|
+
map.getView().getResolution() * this.pixelTolerance_
|
|
438
|
+
),
|
|
439
|
+
projection
|
|
440
|
+
);
|
|
439
441
|
|
|
440
442
|
const segments = this.rBush_.getInExtent(box);
|
|
441
443
|
|
|
@@ -444,9 +446,6 @@ class Snap extends PointerInteraction {
|
|
|
444
446
|
return null;
|
|
445
447
|
}
|
|
446
448
|
|
|
447
|
-
const projection = map.getView().getProjection();
|
|
448
|
-
const projectedCoordinate = fromUserCoordinate(pixelCoordinate, projection);
|
|
449
|
-
|
|
450
449
|
let closestVertex;
|
|
451
450
|
let minSquaredDistance = Infinity;
|
|
452
451
|
|
package/package.json
CHANGED
package/source/Stamen.js
CHANGED
|
@@ -21,11 +21,11 @@ const ATTRIBUTIONS = [
|
|
|
21
21
|
*/
|
|
22
22
|
const LayerConfig = {
|
|
23
23
|
'terrain': {
|
|
24
|
-
extension: '
|
|
24
|
+
extension: 'png',
|
|
25
25
|
opaque: true,
|
|
26
26
|
},
|
|
27
27
|
'terrain-background': {
|
|
28
|
-
extension: '
|
|
28
|
+
extension: 'png',
|
|
29
29
|
opaque: true,
|
|
30
30
|
},
|
|
31
31
|
'terrain-labels': {
|
package/util.js
CHANGED