@edgepdf/viewer-react 0.0.27 → 0.0.28
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/dist/index.js +6 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10595,7 +10595,7 @@ var MarkerManager = class {
|
|
|
10595
10595
|
showDeleteButton: true
|
|
10596
10596
|
};
|
|
10597
10597
|
// Default icon type is always 'pin'
|
|
10598
|
-
defaultIconType = "pin";
|
|
10598
|
+
defaultIconType = "pin-gray";
|
|
10599
10599
|
iconBasePath = "./images/";
|
|
10600
10600
|
// Default to library's images folder
|
|
10601
10601
|
/**
|
|
@@ -10685,7 +10685,7 @@ var MarkerManager = class {
|
|
|
10685
10685
|
href: options.href,
|
|
10686
10686
|
target: options.target,
|
|
10687
10687
|
showLabel: options.showLabel ?? true,
|
|
10688
|
-
iconType: options.iconType || "pin",
|
|
10688
|
+
iconType: options.iconType || "pin-gray",
|
|
10689
10689
|
referenceId: options.referenceId,
|
|
10690
10690
|
draggable: options.draggable,
|
|
10691
10691
|
editable: options.editable,
|
|
@@ -11274,23 +11274,11 @@ var MarkerManager = class {
|
|
|
11274
11274
|
*/
|
|
11275
11275
|
createCustomIcon(iconType) {
|
|
11276
11276
|
const iconUrl = `${this.iconBasePath}${iconType}.png`;
|
|
11277
|
-
const getOffsetBasedOnIconType = (iconType2) => {
|
|
11278
|
-
if (iconType2 === "pin") {
|
|
11279
|
-
return [15, 40];
|
|
11280
|
-
}
|
|
11281
|
-
if (iconType2 === "pin-gray-selected" || iconType2 === "pin-yellow-selected") {
|
|
11282
|
-
return [16, 36];
|
|
11283
|
-
}
|
|
11284
|
-
if (iconType2 === "pin-gray" || iconType2 === "pin-yellow") {
|
|
11285
|
-
return [16, 36];
|
|
11286
|
-
}
|
|
11287
|
-
return [15, 40];
|
|
11288
|
-
};
|
|
11289
11277
|
return import_leaflet3.default.icon({
|
|
11290
11278
|
iconUrl,
|
|
11291
11279
|
iconSize: [30, 40],
|
|
11292
11280
|
// Default marker size
|
|
11293
|
-
iconAnchor:
|
|
11281
|
+
iconAnchor: [16, 36],
|
|
11294
11282
|
// Point of the icon which will correspond to marker's location
|
|
11295
11283
|
popupAnchor: [0, 0],
|
|
11296
11284
|
// Point from which the popup should open relative to the iconAnchor
|
|
@@ -11307,7 +11295,7 @@ var MarkerManager = class {
|
|
|
11307
11295
|
* @returns Leaflet marker instance
|
|
11308
11296
|
*/
|
|
11309
11297
|
createLeafletMarker(marker) {
|
|
11310
|
-
const iconType = marker.iconType || "pin";
|
|
11298
|
+
const iconType = marker.iconType || "pin-gray";
|
|
11311
11299
|
const customIcon = this.createCustomIcon(iconType);
|
|
11312
11300
|
const markerOptions = {
|
|
11313
11301
|
title: marker.label,
|
|
@@ -11325,7 +11313,7 @@ var MarkerManager = class {
|
|
|
11325
11313
|
leafletMarker.bindTooltip(marker.label, {
|
|
11326
11314
|
permanent: false,
|
|
11327
11315
|
direction: "top",
|
|
11328
|
-
offset: [0, -
|
|
11316
|
+
offset: [0, -30],
|
|
11329
11317
|
className: "edgepdf-marker-tooltip"
|
|
11330
11318
|
});
|
|
11331
11319
|
}
|
|
@@ -11422,7 +11410,7 @@ var MarkerManager = class {
|
|
|
11422
11410
|
const overlaySize = 40;
|
|
11423
11411
|
const borderWidth = 1;
|
|
11424
11412
|
const overlayAnchorX = 20;
|
|
11425
|
-
const overlayAnchorY =
|
|
11413
|
+
const overlayAnchorY = 35;
|
|
11426
11414
|
const overlayHTML = `
|
|
11427
11415
|
<div style="
|
|
11428
11416
|
width: ${overlaySize}px;
|
package/package.json
CHANGED