Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Aug 8, 2023
1 parent a03bdcc commit fa5d07b
Show file tree
Hide file tree
Showing 3 changed files with 459 additions and 467 deletions.
20 changes: 13 additions & 7 deletions plugins/dotplot-view/src/DotplotView/model.ts
Expand Up @@ -37,6 +37,7 @@ import PhotoCameraIcon from '@mui/icons-material/PhotoCamera'
// locals
import { Dotplot1DView, DotplotHView, DotplotVView } from './1dview'
import { getBlockLabelKeysToHide, makeTicks } from './components/util'
import { BaseBlock } from './blockTypes'

// lazies
const ExportSvgDialog = lazy(() => import('./components/ExportSvgDialog'))
Expand All @@ -53,6 +54,16 @@ export interface ExportSvgOptions {
themeName?: string
}

const len = (a: string) => measureText(a.slice(0, 30))
const pxWidthForBlocks = (blocks: BaseBlock[], hide: Set<string>) => {
return max([
...blocks.filter(b => !hide.has(b.key)).map(b => len(b.refName)),
...blocks
.filter(b => !hide.has(b.key))
.map(b => len(b.end.toLocaleString('en-us'))),
])
}

/**
* #stateModel DotplotView
* #category view
Expand Down Expand Up @@ -612,14 +623,9 @@ export default function stateModelFactory(pm: PluginManager) {

const vhide = getBlockLabelKeysToHide(vblocks, viewHeight, voffset)
const hhide = getBlockLabelKeysToHide(hblocks, viewWidth, hoffset)
const by = pxWidthForBlocks(hblocks, hhide)
const bx = pxWidthForBlocks(vblocks, vhide)

const len = (a: string) => measureText(a.slice(0, 30))
const by = max(
hblocks.filter(b => !hhide.has(b.key)).map(b => len(b.refName)),
)
const bx = max(
vblocks.filter(b => !vhide.has(b.key)).map(b => len(b.refName)),
)
// these are set via autorun to avoid dependency cycle
self.setBorderY(Math.max(by + padding, 50))
self.setBorderX(Math.max(bx + padding, 50))
Expand Down
6 changes: 3 additions & 3 deletions website/release_announcement_drafts/v2.6.2.md
Expand Up @@ -3,9 +3,9 @@ This is a small bugfix release. We now use `inlineSourceMap` instead of external
This means our "src" is no longer published to NPM.

We also fixed the "Stranded sequencing" coloring option on alignments tracks,
which is espescially useful for stranded paired-end RNA-seq. We renamed to
option "Color by->First of pair strand" also, which corresponds to the
terminology of IGV.
which is especially useful for stranded paired-end RNA-seq. We renamed to option
"Color by->First of pair strand" also, which corresponds to the terminology of
IGV.

![](https://user-images.githubusercontent.com/6511937/253022637-0f71e54a-47c5-4318-a497-7a4ba465071a.png)

Expand Down

0 comments on commit fa5d07b

Please sign in to comment.