Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #139 from cBioPortal/expose-more
Browse files Browse the repository at this point in the history
Small typescript changes, and expose more to import
  • Loading branch information
adamabeshouse authored Sep 9, 2020
2 parents 25c93a3 + 4b314f9 commit 358eba5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/js/oncoprintruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,14 @@ export class RuleSet {
throw "Not implemented on base class";
}

public apply(data:Datum[], cell_width:number, cell_height:number, out_active_rules:ActiveRules|undefined, data_id_key:string&keyof Datum, important_ids?:ColumnProp<boolean>) {
public apply(data:Datum[], cell_width:number, cell_height:number, out_active_rules?:ActiveRules|undefined, data_id_key?:string&keyof Datum, important_ids?:ColumnProp<boolean>) {
// Returns a list of lists of concrete shapes, in the same order as data
// optional parameter important_ids determines which ids count towards active rules (optional parameter data_id_key
// is used for this too)
var ret = [];
for (var i = 0; i < data.length; i++) {
var datum = data[i];
var should_mark_active = !important_ids || !!important_ids[datum[data_id_key]];
var should_mark_active = !important_ids || !!important_ids[datum[data_id_key!]];
var rules = this.getRulesWithId(datum);
if (typeof out_active_rules !== 'undefined' && should_mark_active) {
for (let j = 0; j < rules.length; j++) {
Expand Down Expand Up @@ -968,7 +968,7 @@ class StackedBarRuleSet extends ConditionRuleSet {
}
}

class GeneticAlterationRuleSet extends LookupRuleSet {
export class GeneticAlterationRuleSet extends LookupRuleSet {
constructor(params:IGeneticAlterationRuleSetParams) {
super(params);
this.addRulesFromParams(params);
Expand Down
2 changes: 1 addition & 1 deletion src/js/oncoprintshapetosvg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function lineToSVG(params:ComputedLineParams, offset_x:number, offset_y:number)
});
}

export default function(oncoprint_shape_computed_params:ComputedShapeParams, offset_x:number, offset_y:number) {
export default function shapeToSVG(oncoprint_shape_computed_params:ComputedShapeParams, offset_x:number, offset_y:number) {
var type = oncoprint_shape_computed_params.type;
if (type === 'rectangle') {
return rectangleToSVG(oncoprint_shape_computed_params as ComputedRectangleParams, offset_x, offset_y);
Expand Down

0 comments on commit 358eba5

Please sign in to comment.