diff x/static/js/1266.cd6d9354.chunk.js.map @ 125:49f3d3878413 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author fubar
date Sat, 05 Oct 2024 23:58:05 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/x/static/js/1266.cd6d9354.chunk.js.map	Sat Oct 05 23:58:05 2024 +0000
@@ -0,0 +1,1 @@
+{"version":3,"file":"static/js/1266.cd6d9354.chunk.js","mappings":"ydAgBA,MAAMA,GAAYC,EAAAA,EAAAA,KAAAA,EAAa,KAAM,CACnCC,MAAO,CACLC,WAAY,MACZC,QAAS,MACTC,cAAe,OACfC,WAAY,QAEdC,MAAO,CACLJ,WAAY,MACZC,QAAS,MACTC,cAAe,OACfC,WAAY,YAGHE,GAAiBC,EAAAA,EAAAA,WAAS,UAAU,MAC/CC,IAIA,MAAM,UAAEC,EAAS,QAAEC,GAAYF,GACzB,QAAEG,GAAYb,IACpB,OACEc,EAAAA,cAAA,OAAKC,MAAOJ,EAAWK,OAAQJ,EAASK,UAAWJ,EAAQN,OACzDO,EAAAA,cAACI,EAAiB,CAACR,MAAOA,IAGhC,IAEaQ,GAAoBT,EAAAA,EAAAA,WAAS,UAAU,MAClDC,IAIA,MAAM,UAAEC,EAAS,QAAEQ,EAAO,QAAEP,EAAO,MAAEQ,EAAK,cAAEC,EAAa,OAAEC,GAAWZ,GAChE,SAAEa,EAAQ,MAAER,EAAK,cAAES,EAAa,QAAEC,GAAYL,EAC9CM,EAAUF,EAAcG,cACxBC,GAAOC,EAAAA,EAAAA,IAAwBH,EAASf,EAAWY,GACnDO,GAAQC,EAAAA,EAAAA,KACRC,EAAY,KACbC,EAAAA,EAAAA,aAAYb,GACfL,QACAmB,aAAcd,EAAMc,cAGhBC,EAAQb,EACXc,KACCC,GACE,CACEA,GACAC,EAAAA,EAAAA,IAAO,CACLC,QAASF,EAAKE,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AAA,cAACI,EAAAA,GAAiB,CAACR,MAAOA,QAKlCgH,EAEJ,C","sources":["../../../plugins/dotplot-view/src/DotplotView/components/Axes.tsx","../../../plugins/dotplot-view/src/DotplotView/components/Grid.tsx","../../../plugins/dotplot-view/src/DotplotView/svgcomponents/SVGBackground.tsx","../../../plugins/dotplot-view/src/DotplotView/svgcomponents/SVGDotplotView.tsx"],"sourcesContent":["import React from 'react'\nimport { makeStyles } from 'tss-react/mui'\nimport { observer } from 'mobx-react'\nimport { getSnapshot } from 'mobx-state-tree'\nimport {\n  getFillProps,\n  getStrokeProps,\n  getTickDisplayStr,\n} from '@jbrowse/core/util'\nimport { bpToPx } from '@jbrowse/core/util/Base1DUtils'\nimport { useTheme } from '@mui/material'\n\n// locals\nimport { getBlockLabelKeysToHide } from './util'\nimport { DotplotViewModel } from '../model'\n\nconst useStyles = makeStyles()(() => ({\n  vtext: {\n    gridColumn: '1/2',\n    gridRow: '1/2',\n    pointerEvents: 'none',\n    userSelect: 'none',\n  },\n  htext: {\n    gridColumn: '2/2',\n    gridRow: '2/2',\n    pointerEvents: 'none',\n    userSelect: 'none',\n  },\n}))\nexport const HorizontalAxis = observer(function ({\n  model,\n}: {\n  model: DotplotViewModel\n}) {\n  const { viewWidth, borderY } = model\n  const { classes } = useStyles()\n  return (\n    <svg width={viewWidth} height={borderY} className={classes.htext}>\n      <HorizontalAxisRaw model={model} />\n    </svg>\n  )\n})\n\nexport const HorizontalAxisRaw = observer(function ({\n  model,\n}: {\n  model: DotplotViewModel\n}) {\n  const { viewWidth, borderX, borderY, hview, htextRotation, hticks } = model\n  const { offsetPx, width, dynamicBlocks, bpPerPx } = hview\n  const dblocks = dynamicBlocks.contentBlocks\n  const hide = getBlockLabelKeysToHide(dblocks, viewWidth, offsetPx)\n  const theme = useTheme()\n  const hviewSnap = {\n    ...getSnapshot(hview),\n    width,\n    staticBlocks: hview.staticBlocks,\n  }\n\n  const ticks = hticks\n    .map(\n      tick =>\n        [\n          tick,\n          bpToPx({\n            refName: tick.refName,\n            coord: tick.base,\n            self: hviewSnap,\n          })?.offsetPx,\n        ] as const,\n    )\n    .filter(f => f[1] !== undefined)\n    .map(f => [f[0], f[1]! - offsetPx] as const)\n\n  return (\n    <>\n      {dblocks\n        .filter(region => !hide.has(region.key))\n        .map(region => {\n          const x = region.offsetPx\n          const y = 0\n          const xoff = Math.floor(x - hview.offsetPx)\n\n          return (\n            <text\n              transform={`rotate(${htextRotation},${xoff},${y})`}\n              key={JSON.stringify(region)}\n              x={xoff}\n              y={y + 1}\n              fontSize={11}\n              dominantBaseline=\"hanging\"\n              textAnchor=\"end\"\n              {...getFillProps(theme.palette.text.primary)}\n            >\n              {region.refName}\n            </text>\n          )\n        })}\n      {ticks.map(([tick, x]) =>\n        x > 0 && x < width ? (\n          <line\n            key={`line-${JSON.stringify(tick)}`}\n            x1={x}\n            x2={x}\n            y1={0}\n            y2={tick.type === 'major' ? 6 : 4}\n            strokeWidth={1}\n            {...getFillProps(theme.palette.text.primary)}\n          />\n        ) : null,\n      )}\n      {ticks\n        .filter(t => t[0].type === 'major')\n        .map(([tick, x]) =>\n          x > 10 && x < width ? (\n            <text\n              x={x - 7}\n              y={0}\n              transform={`rotate(${htextRotation},${x},0)`}\n              key={`text-${JSON.stringify(tick)}`}\n              fontSize={11}\n              dominantBaseline=\"middle\"\n              textAnchor=\"end\"\n              {...getFillProps(theme.palette.text.primary)}\n            >\n              {getTickDisplayStr(tick.base + 1, bpPerPx)}\n            </text>\n          ) : null,\n        )}\n      <text\n        y={borderY - 12}\n        x={(viewWidth - borderX) / 2}\n        textAnchor=\"middle\"\n        fontSize={11}\n        dominantBaseline=\"hanging\"\n        {...getFillProps(theme.palette.text.primary)}\n      >\n        {hview.assemblyNames.join(',')}\n      </text>\n    </>\n  )\n})\nexport const VerticalAxis = observer(function ({\n  model,\n}: {\n  model: DotplotViewModel\n}) {\n  const { borderX, viewHeight } = model\n  const { classes } = useStyles()\n  return (\n    <svg className={classes.vtext} width={borderX} height={viewHeight}>\n      <VerticalAxisRaw model={model} />\n    </svg>\n  )\n})\n\nexport const VerticalAxisRaw = observer(function ({\n  model,\n}: {\n  model: DotplotViewModel\n}) {\n  const { viewHeight, borderX, borderY, vview, vtextRotation, vticks } = model\n  const { offsetPx, width, dynamicBlocks, bpPerPx } = vview\n  const dblocks = dynamicBlocks.contentBlocks\n  const hide = getBlockLabelKeysToHide(dblocks, viewHeight, offsetPx)\n  const theme = useTheme()\n  const vviewSnap = {\n    ...getSnapshot(vview),\n    width,\n    staticBlocks: vview.staticBlocks,\n  }\n  const ticks = vticks\n    .map(\n      tick =>\n        [\n          tick,\n          bpToPx({\n            refName: tick.refName,\n            coord: tick.base,\n            self: vviewSnap,\n          })?.offsetPx,\n        ] as const,\n    )\n    .filter(f => f[1] !== undefined)\n    .map(f => [f[0], f[1]! - offsetPx] as const)\n\n  return (\n    <>\n      {dblocks\n        .filter(region => !hide.has(region.key))\n        .map(region => {\n          const y = region.offsetPx\n          const x = borderX\n          const yoff = Math.floor(viewHeight - y + offsetPx)\n\n          return (\n            <text\n              transform={`rotate(${vtextRotation},${x},${y})`}\n              key={JSON.stringify(region)}\n              x={x}\n              y={yoff}\n              fontSize={11}\n              textAnchor=\"end\"\n              {...getFillProps(theme.palette.text.primary)}\n            >\n              {region.refName}\n            </text>\n          )\n        })}\n      {ticks.map(([tick, y]) =>\n        y > 0 ? (\n          <line\n            key={`line-${JSON.stringify(tick)}`}\n            y1={viewHeight - y}\n            y2={viewHeight - y}\n            x1={borderX}\n            x2={borderX - (tick.type === 'major' ? 6 : 4)}\n            strokeWidth={1}\n            {...getStrokeProps(theme.palette.grey[400])}\n          />\n        ) : null,\n      )}\n      {ticks\n        .filter(t => t[0].type === 'major')\n        .map(([tick, y]) =>\n          y > 10 && y < viewHeight ? (\n            <text\n              y={viewHeight - y - 3}\n              x={borderX - 7}\n              key={`text-${JSON.stringify(tick)}`}\n              textAnchor=\"end\"\n              dominantBaseline=\"hanging\"\n              fontSize={11}\n              {...getFillProps(theme.palette.text.primary)}\n            >\n              {getTickDisplayStr(tick.base + 1, bpPerPx)}\n            </text>\n          ) : null,\n        )}\n      <text\n        y={(viewHeight - borderY) / 2}\n        x={12}\n        transform={`rotate(-90,12,${(viewHeight - borderY) / 2})`}\n        textAnchor=\"middle\"\n        fontSize={11}\n        {...getFillProps(theme.palette.text.primary)}\n      >\n        {vview.assemblyNames.join(',')}\n      </text>\n    </>\n  )\n})\n","import React from 'react'\nimport { observer } from 'mobx-react'\nimport { useTheme } from '@mui/material'\n\n// locals\nimport { DotplotViewModel } from '../model'\nimport { getFillProps, getStrokeProps } from '@jbrowse/core/util'\n\nexport const GridRaw = observer(function ({\n  model,\n  children,\n}: {\n  model: DotplotViewModel\n  children?: React.ReactNode\n}) {\n  const { viewWidth, viewHeight, hview, vview } = model\n  const hblocks = hview.dynamicBlocks.contentBlocks\n  const vblocks = vview.dynamicBlocks.contentBlocks\n  if (!hblocks.length || !vblocks.length) {\n    return null\n  }\n  const htop = hview.displayedRegionsTotalPx - hview.offsetPx\n  const vtop = vview.displayedRegionsTotalPx - vview.offsetPx\n  const hbottom = hblocks[0]!.offsetPx - hview.offsetPx\n  const vbottom = vblocks[0]!.offsetPx - vview.offsetPx\n  const theme = useTheme()\n  const stroke = theme.palette.divider\n\n  // Uses math.max/min avoid making very large SVG rect offscreen element,\n  // which can sometimes fail to draw\n  const rx = Math.max(hbottom, 0)\n  const ry = Math.max(viewHeight - vtop, 0)\n  const w = Math.min(htop - hbottom, viewWidth)\n  const h = Math.min(viewHeight - vbottom - ry, viewHeight)\n\n  let lastx = Number.POSITIVE_INFINITY\n  let lasty = Number.POSITIVE_INFINITY\n  return (\n    <>\n      <rect\n        x={rx}\n        y={ry}\n        width={w}\n        height={h}\n        {...getFillProps(theme.palette.background.default)}\n      />\n      <g>\n        {hblocks.map(region => {\n          const x = region.offsetPx - hview.offsetPx\n          const render = Math.floor(x) !== Math.floor(lastx)\n          if (render) {\n            lastx = x\n          }\n          return render ? (\n            <line\n              key={JSON.stringify(region)}\n              x1={x}\n              y1={0}\n              x2={x}\n              y2={viewHeight}\n              {...getStrokeProps(stroke)}\n            />\n          ) : null\n        })}\n        {vblocks.map(region => {\n          const y = viewHeight - (region.offsetPx - vview.offsetPx)\n          const render = Math.floor(y) !== Math.floor(lasty)\n          if (render) {\n            lasty = y\n          }\n          return render ? (\n            <line\n              key={JSON.stringify(region)}\n              x1={0}\n              y1={y}\n              x2={viewWidth}\n              y2={y}\n              {...getStrokeProps(stroke)}\n            />\n          ) : null\n        })}\n        <line\n          x1={htop}\n          y1={0}\n          x2={htop}\n          y2={viewHeight}\n          {...getStrokeProps(stroke)}\n        />\n        <line\n          x1={0}\n          y1={viewHeight - vtop}\n          x2={viewWidth}\n          y2={viewHeight - vtop}\n          {...getStrokeProps(stroke)}\n        />\n      </g>\n      {children}\n    </>\n  )\n})\n\nexport default function Grid({\n  model,\n  children,\n}: {\n  model: DotplotViewModel\n  children?: React.ReactNode\n}) {\n  const { viewWidth, viewHeight } = model\n  return (\n    <svg\n      width={viewWidth}\n      height={viewHeight}\n      style={{ background: 'rgba(0,0,0,0.12)' }}\n    >\n      <GridRaw model={model}>{children}</GridRaw>\n    </svg>\n  )\n}\n","import React from 'react'\nimport { useTheme } from '@mui/material'\nimport { stripAlpha } from '@jbrowse/core/util'\n\nexport default function SVGBackground({\n  width,\n  height,\n}: {\n  width: number\n  height: number\n}) {\n  const theme = useTheme()\n  return (\n    <rect\n      x={0}\n      y={0}\n      width={width}\n      height={height}\n      fill={stripAlpha(theme.palette.background.default)}\n    />\n  )\n}\n","import React from 'react'\nimport { when } from 'mobx'\nimport { getSession, renderToStaticMarkup } from '@jbrowse/core/util'\nimport { ThemeProvider } from '@mui/material'\nimport { createJBrowseTheme } from '@jbrowse/core/ui'\nimport { getRoot } from 'mobx-state-tree'\n\n// locals\nimport { DotplotViewModel, ExportSvgOptions } from '../model'\nimport { GridRaw } from '../components/Grid'\nimport { HorizontalAxisRaw, VerticalAxisRaw } from '../components/Axes'\nimport SVGBackground from './SVGBackground'\n\n// render LGV to SVG\nexport async function renderToSvg(\n  model: DotplotViewModel,\n  opts: ExportSvgOptions,\n) {\n  await when(() => model.initialized)\n  const { themeName = 'default', Wrapper = ({ children }) => children } = opts\n\n  const { createRootFn } = getRoot<any>(model)\n  const session = getSession(model)\n  const theme = session.allThemes?.()[themeName]\n  const { width, borderX, viewWidth, viewHeight, tracks, height } = model\n  const shift = 50\n  const displayResults = await Promise.all(\n    tracks.map(async track => {\n      const display = track.displays[0]\n      await when(() => (display.ready !== undefined ? display.ready : true))\n      return { track, result: await display.renderSvg({ ...opts, theme }) }\n    }),\n  )\n  const w = width + shift * 2\n\n  // the xlink namespace is used for rendering <image> tag\n  return renderToStaticMarkup(\n    <ThemeProvider theme={createJBrowseTheme(theme)}>\n      <Wrapper>\n        <svg\n          width={width}\n          height={height}\n          xmlns=\"http://www.w3.org/2000/svg\"\n          xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n          viewBox={[0, 0, w, height].toString()}\n        >\n          <SVGBackground width={w} height={height} />\n          <VerticalAxisRaw model={model} />\n          <g transform={`translate(${borderX} 0)`}>\n            <GridRaw model={model} />\n            <defs>\n              <clipPath id=\"clip-ruler\">\n                <rect x={0} y={0} width={viewWidth} height={viewHeight} />\n              </clipPath>\n            </defs>\n            <g clipPath=\"url(#clip-ruler)\">\n              {displayResults.map(({ result }, i) => (\n                /* biome-ignore lint/suspicious/noArrayIndexKey: */\n                <g key={i}>{result}</g>\n              ))}\n            </g>\n          </g>\n          <g transform={`translate(${borderX} ${viewHeight})`}>\n            <HorizontalAxisRaw model={model} />\n          </g>\n        </svg>\n      </Wrapper>\n    </ThemeProvider>,\n    createRootFn,\n  )\n}\n"],"names":["useStyles","makeStyles","vtext","gridColumn","gridRow","pointerEvents","userSelect","htext","HorizontalAxis","observer","model","viewWidth","borderY","classes","React","width","height","className","HorizontalAxisRaw","borderX","hview","htextRotation","hticks","offsetPx","dynamicBlocks","bpPerPx","dblocks","contentBlocks","hide","getBlockLabelKeysToHide","theme","useTheme","hviewSnap","getSnapshot","staticBlocks","ticks","map","tick","bpToPx","refName","coord","base","self","filter","f","undefined","region","has","key","x","xoff","Math","floor","_extends","transform","JSON","stringify","y","fontSize","dominantBaseline","textAnchor","getFillProps","palette","text","primary","x1","x2","y1","y2","type","strokeWidth","t","getTickDisplayStr","assemblyNames","join","VerticalAxis","viewHeight","VerticalAxisRaw","vview","vtextRotation","vticks","vviewSnap","yoff","getStrokeProps","grey","GridRaw","children","hblocks","vblocks","length","htop","displayedRegionsTotalPx","vtop","hbottom","vbottom","stroke","divider","rx","max","ry","w","min","h","lastx","Number","POSITIVE_INFINITY","lasty","background","default","render","Grid","style","SVGBackground","fill","stripAlpha","async","renderToSvg","opts","when","initialized","themeName","Wrapper","createRootFn","getRoot","session","getSession","allThemes","tracks","displayResults","Promise","all","display","track","displays","ready","result","renderSvg","shift","renderToStaticMarkup","ThemeProvider","createJBrowseTheme","xmlns","xmlnsXlink","viewBox","toString","id","clipPath","i"],"sourceRoot":""}
\ No newline at end of file