gosling.js 0.15.0 → 0.17.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/editor/example/json-spec/basic-semantic-zoom.d.ts +3 -0
- package/dist/editor/example/json-spec/basic-semantic-zoom.d.ts.map +1 -0
- package/dist/editor/example/json-spec/cancer-variant.d.ts +5 -0
- package/dist/editor/example/json-spec/cancer-variant.d.ts.map +1 -0
- package/dist/editor/example/json-spec/circos.d.ts +5 -0
- package/dist/editor/example/json-spec/circos.d.ts.map +1 -0
- package/dist/editor/example/json-spec/circular-overview-linear-detail-views.d.ts +3 -0
- package/dist/editor/example/json-spec/circular-overview-linear-detail-views.d.ts.map +1 -0
- package/dist/editor/example/json-spec/debug.d.ts +3 -0
- package/dist/editor/example/json-spec/debug.d.ts.map +1 -0
- package/dist/editor/example/json-spec/gene-annotation.d.ts +14 -0
- package/dist/editor/example/json-spec/gene-annotation.d.ts.map +1 -0
- package/dist/editor/example/json-spec/gene-transcript.d.ts +3 -0
- package/dist/editor/example/json-spec/gene-transcript.d.ts.map +1 -0
- package/dist/editor/example/json-spec/give.d.ts +3 -0
- package/dist/editor/example/json-spec/give.d.ts.map +1 -0
- package/dist/editor/example/json-spec/gosling-data.d.ts +17 -0
- package/dist/editor/example/json-spec/gosling-data.d.ts.map +1 -0
- package/dist/editor/example/json-spec/gremlin.d.ts +3 -0
- package/dist/editor/example/json-spec/gremlin.d.ts.map +1 -0
- package/dist/editor/example/json-spec/ideograms.d.ts +4 -0
- package/dist/editor/example/json-spec/ideograms.d.ts.map +1 -0
- package/dist/editor/example/json-spec/index.d.ts +35 -0
- package/dist/editor/example/json-spec/index.d.ts.map +1 -0
- package/dist/editor/example/json-spec/layout-and-arrangement.d.ts +6 -0
- package/dist/editor/example/json-spec/layout-and-arrangement.d.ts.map +1 -0
- package/dist/editor/example/json-spec/mark-displacement.d.ts +3 -0
- package/dist/editor/example/json-spec/mark-displacement.d.ts.map +1 -0
- package/dist/editor/example/json-spec/matrix-hffc6.d.ts +3 -0
- package/dist/editor/example/json-spec/matrix-hffc6.d.ts.map +1 -0
- package/dist/editor/example/json-spec/matrix.d.ts +4 -0
- package/dist/editor/example/json-spec/matrix.d.ts.map +1 -0
- package/dist/editor/example/json-spec/mouse-event.d.ts +4 -0
- package/dist/editor/example/json-spec/mouse-event.d.ts.map +1 -0
- package/dist/editor/example/json-spec/pathogenic.d.ts +4 -0
- package/dist/editor/example/json-spec/pathogenic.d.ts.map +1 -0
- package/dist/editor/example/json-spec/perf-alignment.d.ts +3 -0
- package/dist/editor/example/json-spec/perf-alignment.d.ts.map +1 -0
- package/dist/editor/example/json-spec/pileup.d.ts +4 -0
- package/dist/editor/example/json-spec/pileup.d.ts.map +1 -0
- package/dist/editor/example/json-spec/responsive-alignment.d.ts +24 -0
- package/dist/editor/example/json-spec/responsive-alignment.d.ts.map +1 -0
- package/dist/editor/example/json-spec/responsive-track-wise-comparison.d.ts +4 -0
- package/dist/editor/example/json-spec/responsive-track-wise-comparison.d.ts.map +1 -0
- package/dist/editor/example/json-spec/responsive.d.ts +7 -0
- package/dist/editor/example/json-spec/responsive.d.ts.map +1 -0
- package/dist/editor/example/json-spec/sars-cov-2.d.ts +4 -0
- package/dist/editor/example/json-spec/sars-cov-2.d.ts.map +1 -0
- package/dist/editor/example/json-spec/semantic-zoom.d.ts +9 -0
- package/dist/editor/example/json-spec/semantic-zoom.d.ts.map +1 -0
- package/dist/editor/example/json-spec/track-template.d.ts +3 -0
- package/dist/editor/example/json-spec/track-template.d.ts.map +1 -0
- package/dist/editor/example/json-spec/visual-linking.d.ts +3 -0
- package/dist/editor/example/json-spec/visual-linking.d.ts.map +1 -0
- package/dist/editor/example/spec/visual-encoding.d.ts +5 -0
- package/dist/editor/example/spec/visual-encoding.d.ts.map +1 -0
- package/dist/{exported-utils-d4f1abea.js → exported-utils-c7f92c46.js} +27 -13
- package/dist/exported-utils-c7f92c46.js.map +1 -0
- package/dist/gosling.js +92 -32
- package/dist/gosling.js.map +1 -1
- package/dist/src/compiler/higlass-model.d.ts.map +1 -1
- package/dist/src/core/gosling-component.test.d.ts +2 -0
- package/dist/src/core/gosling-component.test.d.ts.map +1 -0
- package/dist/src/core/mark/bar.d.ts.map +1 -1
- package/dist/src/core/utils/assembly.d.ts +6 -1
- package/dist/src/core/utils/assembly.d.ts.map +1 -1
- package/dist/src/tracks/gosling-track/gosling-track.d.ts.map +1 -1
- package/dist/utils.js +1 -1
- package/package.json +4 -4
- package/dist/exported-utils-d4f1abea.js.map +0 -1
package/dist/gosling.js
CHANGED
|
@@ -34,7 +34,7 @@ import "bezier-js";
|
|
|
34
34
|
import { scaleLinear, scaleSequential, scaleOrdinal, scaleBand } from "d3-scale";
|
|
35
35
|
import { sampleSize, isEqual, uniqBy, cloneDeepWith } from "lodash-es";
|
|
36
36
|
import { interpolateViridis } from "d3-scale-chromatic";
|
|
37
|
-
import { A as Ajv, I as IsChannelDeep, r as resolveSuperposedTracks, t as traverseTracks, a as IsTemplateTrack, g as getTextStyle, c as computeChromSizes, b as cartesianToPolar, u as uuid, R as RADIAN_GAP, v as valueToRadian, p as pointsToDegree, d as commonjsGlobal, e as RemoteFile, f as IsOneOfFilter, h as IsRangeFilter, i as IsIncludeFilter, j as getChannelKeysByAggregateFnc, k as getChannelKeysByType, s as sanitizeChrName, l as filterUsingGenoPos, m as IsDataDeepTileset, n as IsDomainChr, o as IsDomainInterval, q as IsDomainChrInterval, S as SUPPORTED_CHANNELS, w as insertItemToArray, x as
|
|
37
|
+
import { A as Ajv, I as IsChannelDeep, r as resolveSuperposedTracks, t as traverseTracks, a as IsTemplateTrack, g as getTextStyle, c as computeChromSizes, b as cartesianToPolar, u as uuid, R as RADIAN_GAP, v as valueToRadian, p as pointsToDegree, d as commonjsGlobal, e as RemoteFile, f as IsOneOfFilter, h as IsRangeFilter, i as IsIncludeFilter, j as getChannelKeysByAggregateFnc, k as getChannelKeysByType, s as sanitizeChrName, l as filterUsingGenoPos, m as IsDataDeepTileset, n as IsDomainChr, o as IsDomainInterval, q as IsDomainChrInterval, S as SUPPORTED_CHANNELS, w as insertItemToArray, x as getAutoCompleteObject, y as IsChannelValue, z as getValueUsingChannel, B as rectProperty, C as pointProperty, D as barProperty, E as IsStackedChannel, F as IsDomainArray, P as PREDEFINED_COLOR_STR_MAP, G as IsRangeArray, H as Is2DTrack, J as isTabularDataFetcher, K as drawPreEmbellishment, L as drawMark, M as drawPostEmbellishment, N as getRelativeGenomicPosition, O as hasDataTransform, Q as IsXAxis, T as IsMouseEventsDeep, U as colorToHex, V as flatArrayToPairArray, W as DEWFAULT_TITLE_PADDING_ON_TOP_AND_BOTTOM, X as traverseTracksAndViews, Y as traverseViewArrangements, Z as DEFAULT_VIEW_SPACING, _ as DEFAULT_INNER_RADIUS_PROP, $ as IsDummyTrack, a0 as IsOverlaidTrack, a1 as IsYAxis, a2 as DEFAULT_CIRCULAR_VIEW_PADDING, a3 as IsDataDeep, a4 as IsHiGlassMatrix, a5 as getHiGlassColorRange, a6 as DEFAULT_TEXT_STYLE, a7 as overrideDataTemplates, a8 as traverseToFixSpecDownstream, a9 as GenomicPositionHelper, aa as isObject } from "./exported-utils-c7f92c46.js";
|
|
38
38
|
import higlassRegister from "higlass-register";
|
|
39
39
|
import { TextTrack } from "higlass-text";
|
|
40
40
|
import RBush from "rbush";
|
|
@@ -52,7 +52,7 @@ import require$$0 from "react-dom";
|
|
|
52
52
|
import { HiGlassComponent } from "higlass";
|
|
53
53
|
import { ResizeSensor } from "css-element-queries";
|
|
54
54
|
const name = "gosling.js";
|
|
55
|
-
const version = "0.
|
|
55
|
+
const version = "0.17.0";
|
|
56
56
|
const $ref$2 = "#/definitions/GoslingSpec";
|
|
57
57
|
const $schema$2 = "http://json-schema.org/draft-07/schema#";
|
|
58
58
|
const definitions$2 = {
|
|
@@ -23122,12 +23122,7 @@ const HIGLASS_AXIS_SIZE = 30;
|
|
|
23122
23122
|
const getViewTemplate = (assembly) => {
|
|
23123
23123
|
return {
|
|
23124
23124
|
genomePositionSearchBoxVisible: false,
|
|
23125
|
-
genomePositionSearchBox:
|
|
23126
|
-
autocompleteServer: "https://higlass.io/api/v1",
|
|
23127
|
-
autocompleteId: getAutoCompleteId(assembly),
|
|
23128
|
-
chromInfoServer: "https://higlass.io/api/v1",
|
|
23129
|
-
chromInfoId: assembly != null ? assembly : "hg38"
|
|
23130
|
-
},
|
|
23125
|
+
genomePositionSearchBox: getAutoCompleteObject(assembly),
|
|
23131
23126
|
layout: { w: 12, h: 12, x: 0, y: 0 },
|
|
23132
23127
|
tracks: {
|
|
23133
23128
|
top: [],
|
|
@@ -23764,7 +23759,7 @@ class GoslingTrackModel {
|
|
|
23764
23759
|
this.theme = theme != null ? theme : getTheme();
|
|
23765
23760
|
this.dataAggregated = data;
|
|
23766
23761
|
this.specOriginal = spec;
|
|
23767
|
-
this.specComplete =
|
|
23762
|
+
this.specComplete = JSON.parse(JSON.stringify(spec));
|
|
23768
23763
|
this.channelScales = {};
|
|
23769
23764
|
this.mouseEventModel = new MouseEventModel();
|
|
23770
23765
|
const validity = this.validateSpec();
|
|
@@ -24432,11 +24427,11 @@ const config$1 = {
|
|
|
24432
24427
|
}
|
|
24433
24428
|
};
|
|
24434
24429
|
const factory$1 = (HGC, context, options) => {
|
|
24435
|
-
var _assembly2, _processedTileInfo, _mouseDownX, _mouseDownY, _isRangeBrushActivated, _gBrush, _loadingTextStyleObj, _loadingTextBg, _loadingText, _tilesToId, tilesToId_fn, _binsPerTile, binsPerTile_get, _generateTabularData, generateTabularData_fn, _onMouseDown, onMouseDown_fn, _onMouseMove, onMouseMove_fn, _onMouseUp, onMouseUp_fn, _onMouseOut, onMouseOut_fn, _getElementsWithinMouse, getElementsWithinMouse_fn, _publishTrackEvents, publishTrackEvents_fn, _onRangeBrush, onRangeBrush_fn, _highlightMarks, highlightMarks_fn, _publishOnNewTrack, publishOnNewTrack_fn, _hasStretchableGraphics, hasStretchableGraphics_fn, _isTooStretched, isTooStretched_fn;
|
|
24430
|
+
var _assembly2, _processedTileInfo, _mouseDownX, _mouseDownY, _isRangeBrushActivated, _gBrush, _loadingTextStyleObj, _loadingTextBg, _loadingText, _processedTileMap, _tilesToId, tilesToId_fn, _binsPerTile, binsPerTile_get, _generateTabularData, generateTabularData_fn, _onMouseDown, onMouseDown_fn, _onMouseMove, onMouseMove_fn, _onMouseUp, onMouseUp_fn, _onMouseOut, onMouseOut_fn, _getElementsWithinMouse, getElementsWithinMouse_fn, _publishTrackEvents, publishTrackEvents_fn, _onRangeBrush, onRangeBrush_fn, _highlightMarks, highlightMarks_fn, _publishOnNewTrack, publishOnNewTrack_fn, _hasStretchableGraphics, hasStretchableGraphics_fn, _isTooStretched, isTooStretched_fn;
|
|
24436
24431
|
const { tileProxy } = HGC.services;
|
|
24437
|
-
const {
|
|
24432
|
+
const { TiledPixiTrack } = HGC.tracks;
|
|
24438
24433
|
const loadingTextStyle = getTextStyle({ color: "black", size: 12 });
|
|
24439
|
-
const _GoslingTrackClass = class _GoslingTrackClass extends
|
|
24434
|
+
const _GoslingTrackClass = class _GoslingTrackClass extends TiledPixiTrack {
|
|
24440
24435
|
/* *
|
|
24441
24436
|
*
|
|
24442
24437
|
* Constructor
|
|
@@ -24450,11 +24445,6 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24450
24445
|
* Construct tabular data from a higlass tileset and a gosling track model.
|
|
24451
24446
|
*/
|
|
24452
24447
|
__privateAdd(this, _generateTabularData);
|
|
24453
|
-
/* *
|
|
24454
|
-
*
|
|
24455
|
-
* Mouse methods
|
|
24456
|
-
*
|
|
24457
|
-
* */
|
|
24458
24448
|
__privateAdd(this, _onMouseDown);
|
|
24459
24449
|
__privateAdd(this, _onMouseMove);
|
|
24460
24450
|
__privateAdd(this, _onMouseUp);
|
|
@@ -24486,8 +24476,7 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24486
24476
|
*/
|
|
24487
24477
|
__privateAdd(this, _hasStretchableGraphics);
|
|
24488
24478
|
/**
|
|
24489
|
-
* Used in drawTile()
|
|
24490
|
-
* Checks if the tile Graphic is too stretched. If so, it returns true.
|
|
24479
|
+
* Used in drawTile(). Checks if the tile Graphic is too stretched. If so, it returns true.
|
|
24491
24480
|
* @param stretchFactor The factor by which the tile is stretched
|
|
24492
24481
|
* @returns True if the tile is too stretched, false otherwise
|
|
24493
24482
|
*/
|
|
@@ -24523,7 +24512,10 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24523
24512
|
__privateAdd(this, _loadingText, new HGC.libraries.PIXI.Text("", loadingTextStyle));
|
|
24524
24513
|
__publicField(this, "prevVisibleAndFetchedTiles");
|
|
24525
24514
|
__publicField(this, "resolvedTracks");
|
|
24515
|
+
// This is used to persist processed tile data across draw() calls.
|
|
24516
|
+
__privateAdd(this, _processedTileMap, /* @__PURE__ */ new WeakMap());
|
|
24526
24517
|
__publicField(this, "hideMousePosition");
|
|
24518
|
+
const { isShowGlobalMousePosition } = context;
|
|
24527
24519
|
context.dataFetcher.track = this;
|
|
24528
24520
|
__privateSet(this, _processedTileInfo, {});
|
|
24529
24521
|
__privateSet(this, _assembly2, this.options.spec.assembly);
|
|
@@ -24559,15 +24551,11 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24559
24551
|
});
|
|
24560
24552
|
this.pMask.on("mouseout", __privateMethod(this, _onMouseOut, onMouseOut_fn).bind(this));
|
|
24561
24553
|
this.flipText = this.options.spec.orientation === "vertical";
|
|
24562
|
-
if (this.hideMousePosition) {
|
|
24563
|
-
this.hideMousePosition();
|
|
24564
|
-
this.hideMousePosition = void 0;
|
|
24565
|
-
}
|
|
24566
24554
|
if (((_d = this.options) == null ? void 0 : _d.showMousePosition) && !this.hideMousePosition) {
|
|
24567
24555
|
this.hideMousePosition = HGC.utils.showMousePosition(
|
|
24568
24556
|
this,
|
|
24569
24557
|
Is2DTrack(this.getResolvedTracks()[0]),
|
|
24570
|
-
|
|
24558
|
+
isShowGlobalMousePosition()
|
|
24571
24559
|
);
|
|
24572
24560
|
}
|
|
24573
24561
|
this.pLabel.removeChild(this.trackNotFoundText);
|
|
@@ -24601,6 +24589,11 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24601
24589
|
const isBamDataFetcher = this.dataFetcher instanceof BamDataFetcher;
|
|
24602
24590
|
this.processAllTiles(isBamDataFetcher);
|
|
24603
24591
|
super.draw();
|
|
24592
|
+
Object.values(this.fetchedTiles).forEach((tile) => {
|
|
24593
|
+
if (!tile.drawnAtScale)
|
|
24594
|
+
return;
|
|
24595
|
+
[tile.graphics.scale.x, tile.graphics.position.x] = this.getXScaleAndOffset(tile.drawnAtScale);
|
|
24596
|
+
});
|
|
24604
24597
|
this.prevVisibleAndFetchedTiles = this.visibleAndFetchedTiles();
|
|
24605
24598
|
};
|
|
24606
24599
|
if (isTabularDataFetcher(this.dataFetcher) && !isEqual(this.visibleAndFetchedTiles(), this.prevVisibleAndFetchedTiles)) {
|
|
@@ -24614,6 +24607,17 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24614
24607
|
this.firstDraw = false;
|
|
24615
24608
|
}
|
|
24616
24609
|
}
|
|
24610
|
+
/**
|
|
24611
|
+
* Copied from BarTrack
|
|
24612
|
+
*/
|
|
24613
|
+
getXScaleAndOffset(drawnAtScale) {
|
|
24614
|
+
const dA = drawnAtScale.domain();
|
|
24615
|
+
const dB = this._xScale.domain();
|
|
24616
|
+
const tileK = (dA[1] - dA[0]) / (dB[1] - dB[0]);
|
|
24617
|
+
const newRange = this._xScale.domain().map(drawnAtScale);
|
|
24618
|
+
const posOffset = newRange[0];
|
|
24619
|
+
return [tileK, -posOffset * tileK];
|
|
24620
|
+
}
|
|
24617
24621
|
/*
|
|
24618
24622
|
* Do whatever is necessary before rendering a new tile. This function is called from `receivedTiles()`.
|
|
24619
24623
|
* Overrides initTile in BarTrack
|
|
@@ -24654,7 +24658,8 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24654
24658
|
this.pBackground.clear();
|
|
24655
24659
|
this.pBackground.removeChildren();
|
|
24656
24660
|
this.pBorder.clear();
|
|
24657
|
-
this.pBorder.removeChildren();
|
|
24661
|
+
const children = this.pBorder.removeChildren();
|
|
24662
|
+
children.forEach((c) => c.destroy());
|
|
24658
24663
|
this.displayedLegends = [];
|
|
24659
24664
|
tileInfo.goslingModels.forEach((model) => {
|
|
24660
24665
|
const trackWidth = this.dimensions[0];
|
|
@@ -24679,6 +24684,7 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24679
24684
|
this.getResolvedTracks(true);
|
|
24680
24685
|
this.clearMouseEventData();
|
|
24681
24686
|
this.textsBeingUsed = 0;
|
|
24687
|
+
__privateSet(this, _processedTileMap, /* @__PURE__ */ new WeakMap());
|
|
24682
24688
|
this.processAllTiles(true);
|
|
24683
24689
|
this.draw();
|
|
24684
24690
|
this.forceDraw();
|
|
@@ -24725,6 +24731,7 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24725
24731
|
setPosition(newPosition) {
|
|
24726
24732
|
super.setPosition(newPosition);
|
|
24727
24733
|
[this.pMain.position.x, this.pMain.position.y] = this.position;
|
|
24734
|
+
[this.pMouseOver.position.x, this.pMouseOver.position.y] = this.position;
|
|
24728
24735
|
this.mRangeBrush.setOffset(...newPosition);
|
|
24729
24736
|
}
|
|
24730
24737
|
/**
|
|
@@ -24790,6 +24797,9 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24790
24797
|
var _a, _b;
|
|
24791
24798
|
this.tileSize = (_b = (_a = this.tilesetInfo) == null ? void 0 : _a.tile_size) != null ? _b : 1024;
|
|
24792
24799
|
const tiles = this.visibleAndFetchedTiles();
|
|
24800
|
+
if (tiles.every((tile) => __privateGet(this, _processedTileMap).get(tile) !== void 0)) {
|
|
24801
|
+
return;
|
|
24802
|
+
}
|
|
24793
24803
|
tiles.forEach((tile) => __privateMethod(this, _generateTabularData, generateTabularData_fn).call(this, tile, force));
|
|
24794
24804
|
this.combineAllTilesIfNeeded();
|
|
24795
24805
|
const models = tiles.flatMap((tile) => this.transformDataAndCreateModels(tile));
|
|
@@ -24798,6 +24808,9 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24798
24808
|
if (flatTileData.length !== 0) {
|
|
24799
24809
|
this.options.siblingIds.forEach((id) => publish("rawData", { id, data: flatTileData }));
|
|
24800
24810
|
}
|
|
24811
|
+
tiles.forEach((tile) => {
|
|
24812
|
+
__privateGet(this, _processedTileMap).set(tile, true);
|
|
24813
|
+
});
|
|
24801
24814
|
}
|
|
24802
24815
|
/**
|
|
24803
24816
|
* This is currently for testing the new way of rendering visual elements. Called by this.draw()
|
|
@@ -24821,7 +24834,7 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24821
24834
|
callback();
|
|
24822
24835
|
}
|
|
24823
24836
|
/**
|
|
24824
|
-
*
|
|
24837
|
+
* This method is called in the TiledPixiTrack constructor `super(context, options)`.
|
|
24825
24838
|
* So be aware to use defined variables.
|
|
24826
24839
|
*/
|
|
24827
24840
|
calculateVisibleTiles() {
|
|
@@ -24866,7 +24879,7 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24866
24879
|
} else {
|
|
24867
24880
|
const xTiles = tileProxy.calculateTiles(
|
|
24868
24881
|
zoomLevel,
|
|
24869
|
-
this.
|
|
24882
|
+
this._xScale,
|
|
24870
24883
|
this.tilesetInfo.min_pos[0],
|
|
24871
24884
|
this.tilesetInfo.max_pos[0],
|
|
24872
24885
|
this.tilesetInfo.max_zoom,
|
|
@@ -24890,7 +24903,31 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24890
24903
|
}
|
|
24891
24904
|
}
|
|
24892
24905
|
/**
|
|
24893
|
-
*
|
|
24906
|
+
* Copied from HorizontalTiled1DPixiTrack
|
|
24907
|
+
*/
|
|
24908
|
+
calculateZoomLevel() {
|
|
24909
|
+
if (!this.tilesetInfo) {
|
|
24910
|
+
throw Error("tilesetInfo not parsed");
|
|
24911
|
+
}
|
|
24912
|
+
if ("resolutions" in this.tilesetInfo) {
|
|
24913
|
+
const zoomIndexX = tileProxy.calculateZoomLevelFromResolutions(
|
|
24914
|
+
this.tilesetInfo.resolutions,
|
|
24915
|
+
this._xScale
|
|
24916
|
+
);
|
|
24917
|
+
return zoomIndexX;
|
|
24918
|
+
}
|
|
24919
|
+
const xZoomLevel = tileProxy.calculateZoomLevel(
|
|
24920
|
+
this._xScale,
|
|
24921
|
+
this.tilesetInfo.min_pos[0],
|
|
24922
|
+
this.tilesetInfo.max_pos[0],
|
|
24923
|
+
this.tilesetInfo.bins_per_dimension || this.tilesetInfo.tile_size
|
|
24924
|
+
);
|
|
24925
|
+
let zoomLevel = Math.min(xZoomLevel, this.maxZoom);
|
|
24926
|
+
zoomLevel = Math.max(zoomLevel, 0);
|
|
24927
|
+
return zoomLevel;
|
|
24928
|
+
}
|
|
24929
|
+
/**
|
|
24930
|
+
* Get the tile's position in its coordinate system. Based on method in Tiled1DPixiTrack
|
|
24894
24931
|
*/
|
|
24895
24932
|
getTilePosAndDimensions(zoomLevel, tilePos) {
|
|
24896
24933
|
if (!this.tilesetInfo) {
|
|
@@ -24927,7 +24964,7 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24927
24964
|
}
|
|
24928
24965
|
}
|
|
24929
24966
|
/**
|
|
24930
|
-
* Gets the indices of the visible data a tile.
|
|
24967
|
+
* Gets the indices of the visible data a tile. Based on method in Tiled1DPixiTrack
|
|
24931
24968
|
*/
|
|
24932
24969
|
getIndicesOfVisibleDataInTile(tile) {
|
|
24933
24970
|
const visible = this._xScale.range();
|
|
@@ -24945,7 +24982,6 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24945
24982
|
}
|
|
24946
24983
|
/**
|
|
24947
24984
|
* Overrides method in TiledPixiTrack
|
|
24948
|
-
* @param loadedTiles
|
|
24949
24985
|
*/
|
|
24950
24986
|
receivedTiles(loadedTiles) {
|
|
24951
24987
|
super.receivedTiles(loadedTiles);
|
|
@@ -24998,6 +25034,18 @@ const factory$1 = (HGC, context, options) => {
|
|
|
24998
25034
|
const isBamDataFetcher = this.dataFetcher instanceof BamDataFetcher;
|
|
24999
25035
|
return includesDisplaceTransform && !hasDenseTiles() && !isBamDataFetcher;
|
|
25000
25036
|
}
|
|
25037
|
+
/**
|
|
25038
|
+
* Copied from Tiled1DPixiTrack. The ID of the local tile
|
|
25039
|
+
*/
|
|
25040
|
+
tileToLocalId(tile) {
|
|
25041
|
+
return `${tile.join(".")}`;
|
|
25042
|
+
}
|
|
25043
|
+
/**
|
|
25044
|
+
* Copied from Tiled1DPixiTrack. The ID of the tile on the server.
|
|
25045
|
+
*/
|
|
25046
|
+
tileToRemoteId(tile) {
|
|
25047
|
+
return `${tile.join(".")}`;
|
|
25048
|
+
}
|
|
25001
25049
|
/**
|
|
25002
25050
|
* Creates an array of SingleTracks if there are overlaid tracks.
|
|
25003
25051
|
* This method cannot be private because it is called by functions which are called by super.draw();
|
|
@@ -25076,7 +25124,7 @@ const factory$1 = (HGC, context, options) => {
|
|
|
25076
25124
|
} catch (e) {
|
|
25077
25125
|
}
|
|
25078
25126
|
const [trackWidth, trackHeight] = this.dimensions;
|
|
25079
|
-
const axisSize = IsXAxis(resolvedSpec) ? HIGLASS_AXIS_SIZE : 0;
|
|
25127
|
+
const axisSize = IsXAxis(resolvedSpec) && this.options.spec.layout === "linear" ? HIGLASS_AXIS_SIZE : 0;
|
|
25080
25128
|
const [w, h] = [trackWidth, trackHeight + axisSize];
|
|
25081
25129
|
const circularFactor = Math.min(w, h) / Math.min(resolvedSpec.width, resolvedSpec.height);
|
|
25082
25130
|
if (resolvedSpec.innerRadius) {
|
|
@@ -25092,9 +25140,20 @@ const factory$1 = (HGC, context, options) => {
|
|
|
25092
25140
|
});
|
|
25093
25141
|
return tileInfo.goslingModels;
|
|
25094
25142
|
}
|
|
25143
|
+
/* *
|
|
25144
|
+
*
|
|
25145
|
+
* Mouse methods
|
|
25146
|
+
*
|
|
25147
|
+
* */
|
|
25148
|
+
/**
|
|
25149
|
+
* This is for the HiGlass mouseMoveZoom event. However, GoslingTrack has its own way of handling mouse events.
|
|
25150
|
+
*/
|
|
25151
|
+
mouseMoveZoomHandler() {
|
|
25152
|
+
return;
|
|
25153
|
+
}
|
|
25095
25154
|
// set in HorizontalTiled1DPixiTrack
|
|
25096
25155
|
/**
|
|
25097
|
-
*
|
|
25156
|
+
* Called by showHoverMenu() in HiGlassComponent
|
|
25098
25157
|
*/
|
|
25099
25158
|
getMouseOverHtml(mouseX, mouseY) {
|
|
25100
25159
|
var _a, _b, _c, _d, _e;
|
|
@@ -25248,6 +25307,7 @@ const factory$1 = (HGC, context, options) => {
|
|
|
25248
25307
|
_loadingTextStyleObj = new WeakMap();
|
|
25249
25308
|
_loadingTextBg = new WeakMap();
|
|
25250
25309
|
_loadingText = new WeakMap();
|
|
25310
|
+
_processedTileMap = new WeakMap();
|
|
25251
25311
|
_tilesToId = new WeakSet();
|
|
25252
25312
|
tilesToId_fn = function(xTiles, yTiles, zoomLevel) {
|
|
25253
25313
|
if (!yTiles) {
|