@d-i-t-a/reader 2.0.0-beta.20 → 2.0.0-beta.21

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/esm/index.js CHANGED
@@ -49267,7 +49267,7 @@ var _blacklistIdClassForCssSelectors = [
49267
49267
  ];
49268
49268
  var lastMouseDownX = -1;
49269
49269
  var lastMouseDownY = -1;
49270
- var bodyEventListenersSet = false;
49270
+ var bodyEventListeners = [];
49271
49271
  var TextHighlighter = class {
49272
49272
  constructor(delegate, layerSettings, properties, hasEventListener, options, api) {
49273
49273
  this.lastSelectedHighlight = void 0;
@@ -49332,7 +49332,7 @@ var TextHighlighter = class {
49332
49332
  this.initializeToolbox();
49333
49333
  lastMouseDownX = -1;
49334
49334
  lastMouseDownY = -1;
49335
- bodyEventListenersSet = false;
49335
+ bodyEventListeners = [];
49336
49336
  let self2 = this;
49337
49337
  async function unselect() {
49338
49338
  if (self2.lastSelectedHighlight === void 0) {
@@ -50774,6 +50774,7 @@ var TextHighlighter = class {
50774
50774
  popup.showPopup(foundElement.dataset.definition, ev);
50775
50775
  }
50776
50776
  let result = this.delegate.definitionsModule?.properties?.definitions?.filter((el) => el.order === Number(foundElement?.dataset.order))[0];
50777
+ console.log(result);
50777
50778
  if (this.delegate.definitionsModule?.api?.click) {
50778
50779
  this.delegate.definitionsModule.api?.click(lodash.omit(result, "callbacks"), lodash.omit(foundHighlight, "definition"));
50779
50780
  this.delegate.emit("definition.click", result, foundHighlight);
@@ -50791,8 +50792,8 @@ var TextHighlighter = class {
50791
50792
  const doc = win.document;
50792
50793
  let self2 = this;
50793
50794
  if (!doc.getElementById(id2)) {
50794
- if (!bodyEventListenersSet) {
50795
- bodyEventListenersSet = true;
50795
+ if (!bodyEventListeners[id2]) {
50796
+ bodyEventListeners[id2] = true;
50796
50797
  async function mousedown(ev) {
50797
50798
  lastMouseDownX = ev.clientX;
50798
50799
  lastMouseDownY = ev.clientY;