oncoprintjs 6.0.0 → 6.0.2
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 +17 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/dist/js/oncoprintmodel.d.ts +3 -0
- package/package.json +2 -2
- package/rules/geneticrules.ts +55 -12
- package/src/js/oncoprintmodel.ts +21 -10
- package/src/js/oncoprinttrackoptionsview.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -1177,6 +1177,12 @@ var OncoprintModel = /** @class */ (function () {
|
|
|
1177
1177
|
writable: true,
|
|
1178
1178
|
value: void 0
|
|
1179
1179
|
});
|
|
1180
|
+
Object.defineProperty(this, "track_gap_change_callback", {
|
|
1181
|
+
enumerable: true,
|
|
1182
|
+
configurable: true,
|
|
1183
|
+
writable: true,
|
|
1184
|
+
value: void 0
|
|
1185
|
+
});
|
|
1180
1186
|
Object.defineProperty(this, "track_data", {
|
|
1181
1187
|
enumerable: true,
|
|
1182
1188
|
configurable: true,
|
|
@@ -1460,6 +1466,7 @@ var OncoprintModel = /** @class */ (function () {
|
|
|
1460
1466
|
this.track_sort_direction_changeable = {};
|
|
1461
1467
|
this.track_sort_direction = {}; // 1: ascending, -1: descending, 0: not
|
|
1462
1468
|
this.track_sort_direction_change_callback = {};
|
|
1469
|
+
this.track_gap_change_callback = {};
|
|
1463
1470
|
this.track_data = {};
|
|
1464
1471
|
this.track_rule_set_id = {}; // track id -> rule set id
|
|
1465
1472
|
this.track_active_rules = {}; // from track id to active rule map (map with rule ids as keys)
|
|
@@ -1697,6 +1704,7 @@ var OncoprintModel = /** @class */ (function () {
|
|
|
1697
1704
|
writable: true,
|
|
1698
1705
|
value: function (trackId, show) {
|
|
1699
1706
|
this.track_show_gaps[trackId] = show;
|
|
1707
|
+
this.track_gap_change_callback[trackId](trackId, show);
|
|
1700
1708
|
this.ids_after_a_gap.update(this);
|
|
1701
1709
|
}
|
|
1702
1710
|
});
|
|
@@ -2546,11 +2554,18 @@ var OncoprintModel = /** @class */ (function () {
|
|
|
2546
2554
|
this.track_expand_button_getter[track_id] =
|
|
2547
2555
|
params.expandButtonTextGetter;
|
|
2548
2556
|
}
|
|
2557
|
+
this.track_sort_direction[track_id] = ifndef(params.init_sort_direction, 1);
|
|
2549
2558
|
this.track_can_show_gaps[track_id] = ifndef(params.track_can_show_gaps, false);
|
|
2550
|
-
|
|
2559
|
+
var trackShowGaps = ifndef(params.show_gaps_on_init, false);
|
|
2560
|
+
this.track_show_gaps[track_id] = trackShowGaps;
|
|
2561
|
+
var trackNotSorted = this.track_sort_direction[track_id] === 0;
|
|
2562
|
+
if (trackShowGaps && trackNotSorted) {
|
|
2563
|
+
this.track_sort_direction[track_id] = 1;
|
|
2564
|
+
}
|
|
2551
2565
|
this.track_sort_cmp_fn[track_id] = params.sortCmpFn;
|
|
2552
2566
|
this.track_sort_direction_changeable[track_id] = ifndef(params.sort_direction_changeable, false);
|
|
2553
2567
|
this.track_sort_direction_change_callback[track_id] = ifndef(params.onSortDirectionChange, function () { });
|
|
2568
|
+
this.track_gap_change_callback[track_id] = ifndef(params.onGapChange, function () { });
|
|
2554
2569
|
this.track_data[track_id] = ifndef(params.data, []);
|
|
2555
2570
|
this.track_data_id_key[track_id] = ifndef(params.data_id_key, 'id');
|
|
2556
2571
|
this.track_info[track_id] = ifndef(params.track_info, '');
|
|
@@ -2566,7 +2581,6 @@ var OncoprintModel = /** @class */ (function () {
|
|
|
2566
2581
|
if (params.important_ids) {
|
|
2567
2582
|
this.setTrackImportantIds(track_id, params.important_ids);
|
|
2568
2583
|
}
|
|
2569
|
-
this.track_sort_direction[track_id] = ifndef(params.init_sort_direction, 1);
|
|
2570
2584
|
params.target_group = ifndef(params.target_group, 0);
|
|
2571
2585
|
this.ensureTrackGroupExists(params.target_group);
|
|
2572
2586
|
// add track to target group
|
|
@@ -10042,6 +10056,7 @@ var OncoprintTrackOptionsView = /** @class */ (function () {
|
|
|
10042
10056
|
configurable: true,
|
|
10043
10057
|
writable: true,
|
|
10044
10058
|
value: function (model, getCellViewHeight) {
|
|
10059
|
+
this.setTrackShowGaps(model, getCellViewHeight);
|
|
10045
10060
|
this.renderAllOptions(model);
|
|
10046
10061
|
this.resize(model, getCellViewHeight);
|
|
10047
10062
|
}
|