Skip to content

Commit

Permalink
use oncoprintjs-2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dippindots committed Mar 25, 2019
1 parent 0755104 commit e136047
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"node-sass": "^4.9.3",
"numeral": "^2.0.6",
"object-sizeof": "^1.2.0",
"oncoprintjs": "2.0.0",
"oncoprintjs": "2.0.1",
"parameter-validator": "^1.0.2",
"pdfobject": "^2.0.201604172",
"pegjs": "^0.10.0",
Expand Down
14 changes: 0 additions & 14 deletions src/shared/lib/svgToPdfDownload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,6 @@ function base64ToArrayBuffer(base64:string) {
export default function svgToPdfDownload(fileName: string, svg: any) {
const width = svg.scrollWidth || parseInt((svg.attributes.getNamedItem('width') as Attr).nodeValue!), height = svg.scrollHeight || parseInt((svg.attributes.getNamedItem('height') as Attr).nodeValue!);

// dealing with oncoprint svg (temporarily)
_.forEach((svg as Element).childNodes, (element => {
if ((element as Element).attributes.getNamedItem('x') !== null && (element as Element).attributes.getNamedItem('y') !== null && (element as Element).nodeName === 'g') {
(element as Element).attributes.removeNamedItem('y');
(element as Element).attributes.removeNamedItem('x');
}
_.forEach((element as ChildNode).childNodes,(child => {
if ((child as Element).attributes.getNamedItem('x') !== null && (child as Element).attributes.getNamedItem('y') !== null && (child as Element).nodeName === 'g') {
(child as Element).attributes.removeNamedItem('y');
(child as Element).attributes.removeNamedItem('x');
}
}))
}));

// create a new jsPDF instance
let direction = 'l';
if (height > width) {
Expand Down
2 changes: 1 addition & 1 deletion src/shared/theme/cBioPoralTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const CBIOPORTAL_VICTORY_THEME = {
strokeWidth:1,
stroke:"black"
},
labels: baseLabelStyles,
labels: assign({}, baseLabelStyles, { fontFamily: sansSerif }),
title: assign({}, baseLabelStyles, { padding: 5 })
}
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9335,10 +9335,10 @@ once@~1.3.0:
dependencies:
wrappy "1"

[email protected].0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/oncoprintjs/-/oncoprintjs-2.0.0.tgz#ffeb378a0e914b51ff546808ca7a42b4195a2114"
integrity sha512-MT5QAQFvfqxAi6JItU43nY6wMszv/3n9DklAhZBsgUEQPCGgRzkX46kgXpbvPj571iMNE6xX/h0B/cs5GLIRwQ==
[email protected].1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/oncoprintjs/-/oncoprintjs-2.0.1.tgz#6bb3a178995f9f739b0c7c0696dac31f4c96cbe0"
integrity sha512-X7LHQiGGOfWKOq2mX9JD8KkRoflu7oWgXW8PkdmEcnh5T7t1EQ3PmV2jVmnJJTnWbSyQsr6n3atdTpqgGWtyYA==
dependencies:
express "^4.15.3"
gl-matrix "2.3.2"
Expand Down

0 comments on commit e136047

Please sign in to comment.