Skip to content

Commit

Permalink
Partial revert of #4319 after noting that test file in config_demo di…
Browse files Browse the repository at this point in the history
…dn't render at all

resolutions
  • Loading branch information
cmdcolin committed Apr 11, 2024
1 parent 846cb8f commit 3f96b78
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions plugins/hic/src/HicRenderer/HicRenderer.tsx
Expand Up @@ -73,16 +73,12 @@ export default class HicRenderer extends ServerSideRendererType {
const res = await (dataAdapter as HicDataAdapter).getResolution(
bpPerPx / resolution,
)
function horizontallyFlip() {
ctx.scale(-1, 1)
const width = (region.end - region.start) / bpPerPx
ctx.translate(-width, 0)
}

const width = (region.end - region.start) / bpPerPx
const w = res / (bpPerPx * Math.sqrt(2))
const baseColor = colord(readConfObject(config, 'baseColor'))
const offset = region.start
if (features.length) {
const offset = features[0].bin1
let maxScore = 0
let minBin = 0
let maxBin = 0
Expand All @@ -95,7 +91,8 @@ export default class HicRenderer extends ServerSideRendererType {
await abortBreakPoint(signal)

if (region.reversed === true) {
horizontallyFlip()
ctx.scale(-1, 1)
ctx.translate(-width, 0)
}
ctx.rotate(-Math.PI / 4)
let start = Date.now()
Expand Down

0 comments on commit 3f96b78

Please sign in to comment.