higlass 2.1.5 → 2.2.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/dist/higlass.mjs CHANGED
@@ -13782,7 +13782,7 @@ const getXylofon = () => (
13782
13782
  /** @type {const} */
13783
13783
  [window, map$5((c) => c.charCodeAt(0))(
13784
13784
  // @ts-expect-error - A global added by `vite.config.js`.
13785
- "2.1.5"
13785
+ "2.2.0"
13786
13786
  ).map((number3) => number3 <= 999 ? `00${number3}`.slice(-3) : number3).join("")]
13787
13787
  );
13788
13788
  const gradient = (steps, width2 = 1, height2 = 100, fromX = 0, fromY = 0, toX = 0, toY = 100) => {
@@ -14036,6 +14036,27 @@ let CombinedTrack = /* @__PURE__ */ function() {
14036
14036
  }
14037
14037
  return mouseOverHtml;
14038
14038
  }
14039
+ /**
14040
+ * Get the uids of any items that are below the mouse
14041
+ *
14042
+ * @param {*} trackX
14043
+ * @param {*} trackY
14044
+ * @returns
14045
+ */
14046
+ }, {
14047
+ key: "getMouseOverUids",
14048
+ value: function getMouseOverUids(trackX, trackY) {
14049
+ const mouseOverUids = [];
14050
+ for (const childTrack of this.childTracks) {
14051
+ if (childTrack.getMouseOverUids) {
14052
+ const trackMouseOverUids = childTrack.getMouseOverUids(trackX, trackY);
14053
+ if (trackMouseOverUids) {
14054
+ mouseOverUids.push(...trackMouseOverUids);
14055
+ }
14056
+ }
14057
+ }
14058
+ return mouseOverUids;
14059
+ }
14039
14060
  }]);
14040
14061
  }();
14041
14062
  const isTrackOrChildTrack = (testTrack, track) => {
@@ -47688,7 +47709,7 @@ const calculate1DVisibleTiles = (tilesetInfo, scale) => {
47688
47709
  const zoomLevel = calculate1DZoomLevel(tilesetInfo, scale, tilesetInfo.max_zoom);
47689
47710
  if (tilesetInfo.resolutions) {
47690
47711
  const sortedResolutions = tilesetInfo.resolutions.map((x) => +x).sort((a, b) => b - a);
47691
- const xTiles2 = calculateTilesFromResolution$1(sortedResolutions[zoomLevel], scale, tilesetInfo.min_pos[0], tilesetInfo.max_pos[0]);
47712
+ const xTiles2 = calculateTilesFromResolution$1(sortedResolutions[zoomLevel], scale, tilesetInfo.min_pos[0], tilesetInfo.max_pos[0], tilesetInfo.bins_per_dimension || tilesetInfo.tile_size);
47692
47713
  const tiles2 = xTiles2.map((x) => [zoomLevel, x]);
47693
47714
  return tiles2;
47694
47715
  }
@@ -75298,7 +75319,7 @@ let Tiled1DPixiTrack = /* @__PURE__ */ function(_TiledPixiTrack) {
75298
75319
  this.zoomLevel = this.calculateZoomLevel();
75299
75320
  if (this.tilesetInfo.resolutions) {
75300
75321
  const sortedResolutions = this.tilesetInfo.resolutions.map((x) => +x).sort((a, b) => b - a);
75301
- const xTiles2 = api.calculateTilesFromResolution(sortedResolutions[this.zoomLevel], this._xScale, this.tilesetInfo.min_pos[0], this.tilesetInfo.max_pos[0]);
75322
+ const xTiles2 = api.calculateTilesFromResolution(sortedResolutions[this.zoomLevel], this._xScale, this.tilesetInfo.min_pos[0], this.tilesetInfo.max_pos[0], this.tilesetInfo.bins_per_dimension || this.tilesetInfo.tile_size);
75302
75323
  const tiles2 = xTiles2.map((x) => [this.zoomLevel, x]);
75303
75324
  this.setVisibleTiles(tiles2);
75304
75325
  return;
@@ -90309,7 +90330,7 @@ Object.assign(LruCache.prototype, {
90309
90330
  toJSON,
90310
90331
  toString: toString2
90311
90332
  });
90312
- const version = "2.1.5";
90333
+ const version = "2.2.0";
90313
90334
  const configs = {
90314
90335
  ..._configs,
90315
90336
  IS_TRACK_RANGE_SELECTABLE,
@@ -107779,6 +107800,7 @@ ${svgString}`;
107779
107800
  isFromVerticalTrack: evt.isFromVerticalTrack
107780
107801
  });
107781
107802
  this.showHoverMenu(evt);
107803
+ this.showHoverUids(evt);
107782
107804
  }
107783
107805
  }, {
107784
107806
  key: "getMinMaxValue",
@@ -107797,6 +107819,22 @@ ${svgString}`;
107797
107819
  }
107798
107820
  return [track.minVisibleValueInTiles(ignoreFixedScale), track.maxVisibleValueInTiles(ignoreFixedScale)];
107799
107821
  }
107822
+ /*
107823
+ * Someone has hovered over an item in sourceTrack so we need to inform
107824
+ * any other track that has that item that it's been hovered over.
107825
+ */
107826
+ }, {
107827
+ key: "showHoverUids",
107828
+ value: function showHoverUids(evt) {
107829
+ var _a;
107830
+ const mouseOverUids = ((_a = evt.track) == null ? void 0 : _a.getMouseOverUids) ? evt.track.getMouseOverUids(evt.relTrackX, evt.relTrackY) : null;
107831
+ for (const track of this.iterateOverTracks()) {
107832
+ const trackObj = getTrackObjById(this.tiledPlots, track.viewId, track.trackId);
107833
+ if (trackObj.itemsHovered) {
107834
+ trackObj.itemsHovered(mouseOverUids);
107835
+ }
107836
+ }
107837
+ }
107800
107838
  /**
107801
107839
  * Show a menu displaying some information about the track under it
107802
107840
  */
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "higlass",
3
- "version": "2.1.5",
3
+ "version": "2.2.0",
4
4
  "description": "HiGlass Hi-C / genomic / large data viewer",
5
5
  "author": "Peter Kerpedjiev <pkerpedjiev@gmail.com>",
6
6
  "main": "dist/hglib.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "higlass",
3
- "version": "2.1.5",
3
+ "version": "2.2.0",
4
4
  "description": "HiGlass Hi-C / genomic / large data viewer",
5
5
  "author": "Peter Kerpedjiev <pkerpedjiev@gmail.com>",
6
6
  "main": "dist/hglib.js",