oncoprintjs 6.0.7 → 6.1.1
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.es.js +13 -13
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/js/bucketsort.d.ts +3 -3
- package/dist/js/oncoprint.d.ts +7 -6
- package/dist/js/oncoprintheaderview.d.ts +1 -0
- package/dist/js/oncoprintlabelview.d.ts +1 -0
- package/dist/js/oncoprintlegendrenderer.d.ts +1 -0
- package/dist/js/oncoprintminimapview.d.ts +2 -1
- package/dist/js/oncoprintmodel.d.ts +37 -36
- package/dist/js/oncoprintruleset.d.ts +8 -8
- package/dist/js/oncoprintshape.d.ts +20 -20
- package/dist/js/oncoprintshapetovertexes.d.ts +1 -1
- package/dist/js/oncoprinttooltip.d.ts +2 -1
- package/dist/js/oncoprinttrackinfoview.d.ts +1 -0
- package/dist/js/oncoprinttrackoptionsview.d.ts +2 -1
- package/dist/js/oncoprintwebglcellview.d.ts +8 -7
- package/dist/js/oncoprintzoomslider.d.ts +2 -1
- package/dist/js/polyfill.d.ts +1 -1
- package/dist/js/utils.d.ts +1 -1
- package/dist/js/workers/clustering-worker.d.ts +5 -5
- package/package.json +6 -9
- package/src/js/oncoprintmodel.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -364,7 +364,7 @@ function fastParseInt16(x) {
|
|
|
364
364
|
return ret;
|
|
365
365
|
}
|
|
366
366
|
function rgbString(color) {
|
|
367
|
-
return "rgb("
|
|
367
|
+
return "rgb(".concat(color[0], ",").concat(color[1], ",").concat(color[2], ")");
|
|
368
368
|
}
|
|
369
369
|
|
|
370
370
|
var string_type = typeof '';
|
|
@@ -1646,7 +1646,7 @@ var OncoprintModel = /** @class */ (function () {
|
|
|
1646
1646
|
var indexesAfterGap = model.column_indexes_after_a_gap.get();
|
|
1647
1647
|
// the indexes come AFTER a gap, so we need to include zero up front
|
|
1648
1648
|
// in order to get initial slice of data
|
|
1649
|
-
var groupStartIndexes = tslib.
|
|
1649
|
+
var groupStartIndexes = tslib.__spreadArray([0], indexesAfterGap, true);
|
|
1650
1650
|
// using the group start indexes, slice the id data into corresponding groups
|
|
1651
1651
|
return groupStartIndexes.map(function (n, i) {
|
|
1652
1652
|
if (i === groupStartIndexes.length - 1) {
|
|
@@ -3804,7 +3804,7 @@ function rgbaToHex(rgba) {
|
|
|
3804
3804
|
if (hexB.length === 1) {
|
|
3805
3805
|
hexB = '0' + hexB;
|
|
3806
3806
|
}
|
|
3807
|
-
return "#"
|
|
3807
|
+
return "#".concat(hexR).concat(hexG).concat(hexB);
|
|
3808
3808
|
}
|
|
3809
3809
|
|
|
3810
3810
|
function rectangleToSVG(params, offset_x, offset_y) {
|
|
@@ -3970,7 +3970,7 @@ var svgfactory = {
|
|
|
3970
3970
|
fillOpacity = fillSpecification.value[3];
|
|
3971
3971
|
}
|
|
3972
3972
|
else {
|
|
3973
|
-
fill = "url(#"
|
|
3973
|
+
fill = "url(#".concat(fillSpecification.value, ")");
|
|
3974
3974
|
}
|
|
3975
3975
|
return makesvgelement('rect', {
|
|
3976
3976
|
x: x,
|
|
@@ -4536,7 +4536,7 @@ var Line = /** @class */ (function (_super) {
|
|
|
4536
4536
|
}(Shape));
|
|
4537
4537
|
|
|
4538
4538
|
function getVertexShaderSource(columnsRightAfterGapsSize) {
|
|
4539
|
-
return "precision highp float;\n attribute float aPosVertex;\n attribute float aColVertex;\n attribute float aVertexOncoprintColumn;\n\n uniform float gapSize;\n\n uniform float columnsRightAfterGaps["
|
|
4539
|
+
return "precision highp float;\n attribute float aPosVertex;\n attribute float aColVertex;\n attribute float aVertexOncoprintColumn;\n\n uniform float gapSize;\n\n uniform float columnsRightAfterGaps[".concat(columnsRightAfterGapsSize, "]; // sorted in ascending order\n\n uniform float columnWidth;\n uniform float scrollX;\n uniform float zoomX;\n uniform float scrollY;\n uniform float zoomY;\n uniform mat4 uMVMatrix;\n uniform mat4 uPMatrix;\n uniform float offsetY;\n uniform float supersamplingRatio;\n uniform float positionBitPackBase;\n uniform float texSize;\n varying float texCoord;\n \n \n\n vec3 getUnpackedPositionVec3() {\n \tfloat pos0 = floor(aPosVertex / (positionBitPackBase * positionBitPackBase));\n \tfloat pos0Contr = pos0 * positionBitPackBase * positionBitPackBase;\n \tfloat pos1 = floor((aPosVertex - pos0Contr)/positionBitPackBase);\n \tfloat pos1Contr = pos1 * positionBitPackBase;\n \tfloat pos2 = aPosVertex - pos0Contr - pos1Contr;\n \treturn vec3(pos0, pos1, pos2);\n }\n\n float getGapOffset() {\n // first do binary search to compute the number of gaps before this column, G(c)\n // G(c) = the index in columnsRightAfterGaps of the first entry thats greater than c\n \n int lower_incl = 0;\n int upper_excl = ").concat(columnsRightAfterGapsSize, ";\n int numGaps = 0;\n \n for (int loopDummyVar = 0; loopDummyVar == 0; loopDummyVar += 0) {\n if (lower_incl >= upper_excl) {\n break;\n }\n \n int middle = (lower_incl + upper_excl)/2;\n if (columnsRightAfterGaps[middle] < aVertexOncoprintColumn) {\n // G(c) > middle\n lower_incl = middle + 1;\n } else if (columnsRightAfterGaps[middle] == aVertexOncoprintColumn) {\n // G(c) = middle + 1\n numGaps = middle + 1;\n break;\n } else {\n // columnsRightAfterGaps[middle] > column, so G(c) <= middle\n if (middle == 0) {\n // 0 <= G(c) <= 0 -> G(c) = 0\n numGaps = 0;\n break;\n } else if (columnsRightAfterGaps[middle-1] < aVertexOncoprintColumn) {\n // G(c) = middle\n numGaps = middle;\n break;\n } else {\n // columnsRightAfterGaps[middle-1] >= column, so G(c) <= middle-1\n upper_excl = middle;\n }\n }\n }\n \n // multiply it by the gap size to get the total offset\n return float(numGaps)*gapSize;\n }\n\n void main(void) {\n \tgl_Position = vec4(getUnpackedPositionVec3(), 1.0);\n \tgl_Position[0] += aVertexOncoprintColumn*columnWidth;\n \tgl_Position *= vec4(zoomX, zoomY, 1.0, 1.0);\n\n // gaps should not be affected by zoom:\n gl_Position[0] += getGapOffset();\n\n // offsetY is given zoomed:\n \tgl_Position[1] += offsetY;\n\n \tgl_Position -= vec4(scrollX, scrollY, 0.0, 0.0);\n \tgl_Position[0] *= supersamplingRatio;\n \tgl_Position[1] *= supersamplingRatio;\n \tgl_Position = uPMatrix * uMVMatrix * gl_Position;\n\n \ttexCoord = (aColVertex + 0.5) / texSize;\n }");
|
|
4540
4540
|
}
|
|
4541
4541
|
function getFragmentShaderSource() {
|
|
4542
4542
|
return "precision mediump float;\n varying float texCoord;\n uniform sampler2D uSampler;\n void main(void) {\n gl_FragColor = texture2D(uSampler, vec2(texCoord, 0.5));\n }";
|
|
@@ -4916,7 +4916,7 @@ var OncoprintWebGLCellView = /** @class */ (function () {
|
|
|
4916
4916
|
var clientRect = self.$overlay_canvas[0].getBoundingClientRect();
|
|
4917
4917
|
self.hoveredGap = overlappingGap;
|
|
4918
4918
|
tooltip.center = false;
|
|
4919
|
-
tooltip.show(250, clientRect.left + overlappingGap.origin_x, clientRect.top + overlappingGap.origin_y - 20, $__default["default"]("<span>"
|
|
4919
|
+
tooltip.show(250, clientRect.left + overlappingGap.origin_x, clientRect.top + overlappingGap.origin_y - 20, $__default["default"]("<span>".concat(overlappingGap.data.tooltipFormatter(), "</span>")), false);
|
|
4920
4920
|
}
|
|
4921
4921
|
if (!overlapping_data && !overlappingGap) {
|
|
4922
4922
|
tooltip.hideIfNotAlreadyGoingTo(150);
|
|
@@ -5780,7 +5780,7 @@ var OncoprintWebGLCellView = /** @class */ (function () {
|
|
|
5780
5780
|
shapeToVertexes(_shape, zindex, function (pos, col) {
|
|
5781
5781
|
pos = pos.map(Math.round);
|
|
5782
5782
|
position_1.push(packPos(pos));
|
|
5783
|
-
var col_hash = col[0]
|
|
5783
|
+
var col_hash = "".concat(col[0], ",").concat(col[1], ",").concat(col[2], ",").concat(col[3]);
|
|
5784
5784
|
var col_index = color_bank_index[col_hash];
|
|
5785
5785
|
if (typeof col_index === 'undefined') {
|
|
5786
5786
|
col_index = color_vertexes.length;
|
|
@@ -9538,7 +9538,7 @@ var OncoprintHeaderView = /** @class */ (function () {
|
|
|
9538
9538
|
'pointer-events': 'auto',
|
|
9539
9539
|
});
|
|
9540
9540
|
// add label
|
|
9541
|
-
$__default["default"]("<span>"
|
|
9541
|
+
$__default["default"]("<span>".concat(group.header.label.text, "</span>"))
|
|
9542
9542
|
.appendTo($headerDiv)
|
|
9543
9543
|
.css({
|
|
9544
9544
|
'margin-right': 10,
|
|
@@ -11495,7 +11495,7 @@ var OncoprintZoomSlider = /** @class */ (function () {
|
|
|
11495
11495
|
'min-height': params.btn_size,
|
|
11496
11496
|
'min-width': params.btn_size,
|
|
11497
11497
|
'background-color': '#ffffff',
|
|
11498
|
-
border: "solid "
|
|
11498
|
+
border: "solid ".concat(icon_div_border_size, "px black"),
|
|
11499
11499
|
'border-radius': '3px',
|
|
11500
11500
|
cursor: 'pointer',
|
|
11501
11501
|
})
|
|
@@ -11516,7 +11516,7 @@ var OncoprintZoomSlider = /** @class */ (function () {
|
|
|
11516
11516
|
'min-height': params.btn_size,
|
|
11517
11517
|
'min-width': params.btn_size,
|
|
11518
11518
|
'background-color': '#ffffff',
|
|
11519
|
-
border: "solid "
|
|
11519
|
+
border: "solid ".concat(icon_div_border_size, "px black"),
|
|
11520
11520
|
'border-radius': '3px',
|
|
11521
11521
|
cursor: 'pointer',
|
|
11522
11522
|
})
|
|
@@ -12004,7 +12004,7 @@ var OncoprintMinimapView = /** @class */ (function () {
|
|
|
12004
12004
|
})
|
|
12005
12005
|
.addClass('oncoprint-zoomtofit-btn')
|
|
12006
12006
|
.appendTo($div);
|
|
12007
|
-
$__default["default"]("<img src=\""
|
|
12007
|
+
$__default["default"]("<img src=\"".concat(img, "\" alt=\"Zoom to Fit Icon\" />"))
|
|
12008
12008
|
.css({
|
|
12009
12009
|
height: btn_height - 4,
|
|
12010
12010
|
width: btn_width - 4,
|
|
@@ -13434,7 +13434,7 @@ var Oncoprint = /** @class */ (function () {
|
|
|
13434
13434
|
position: 'absolute',
|
|
13435
13435
|
top: '0px',
|
|
13436
13436
|
left: '0px',
|
|
13437
|
-
'pointer-events': 'none',
|
|
13437
|
+
'pointer-events': 'none', // since column label canvas is on top of cell overlay canvas, we need to make it not capture any mouse events
|
|
13438
13438
|
})
|
|
13439
13439
|
.addClass('noselect')
|
|
13440
13440
|
.addClass('oncoprintjs__column_label_canvas');
|