@edgepdf/viewer-react 0.0.26 → 0.0.27

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11274,11 +11274,23 @@ 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
+ };
11277
11289
  return import_leaflet3.default.icon({
11278
11290
  iconUrl,
11279
11291
  iconSize: [30, 40],
11280
11292
  // Default marker size
11281
- iconAnchor: [30, 10],
11293
+ iconAnchor: getOffsetBasedOnIconType(iconType),
11282
11294
  // Point of the icon which will correspond to marker's location
11283
11295
  popupAnchor: [0, 0],
11284
11296
  // Point from which the popup should open relative to the iconAnchor
@@ -11313,7 +11325,7 @@ var MarkerManager = class {
11313
11325
  leafletMarker.bindTooltip(marker.label, {
11314
11326
  permanent: false,
11315
11327
  direction: "top",
11316
- offset: [-13, -10],
11328
+ offset: [0, -40],
11317
11329
  className: "edgepdf-marker-tooltip"
11318
11330
  });
11319
11331
  }
@@ -11409,8 +11421,8 @@ var MarkerManager = class {
11409
11421
  }
11410
11422
  const overlaySize = 40;
11411
11423
  const borderWidth = 1;
11412
- const overlayAnchorX = 35;
11413
- const overlayAnchorY = 10;
11424
+ const overlayAnchorX = 20;
11425
+ const overlayAnchorY = 40;
11414
11426
  const overlayHTML = `
11415
11427
  <div style="
11416
11428
  width: ${overlaySize}px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgepdf/viewer-react",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "EdgePDF Viewer - React components for viewing PDF documents with interactive markers and zoom controls",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",