@jbrowse/plugin-wiggle 2.1.7 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/BigWigAdapter/configSchema.d.ts +2 -2
  2. package/dist/BigWigAdapter/configSchema.js +12 -1
  3. package/dist/BigWigAdapter/configSchema.js.map +1 -1
  4. package/dist/DensityRenderer/configSchema.js +11 -1
  5. package/dist/DensityRenderer/configSchema.js.map +1 -1
  6. package/dist/LinePlotRenderer/configSchema.js +14 -1
  7. package/dist/LinePlotRenderer/configSchema.js.map +1 -1
  8. package/dist/LinearWiggleDisplay/components/Tooltip.d.ts +1 -1
  9. package/dist/LinearWiggleDisplay/models/configSchema.js +38 -1
  10. package/dist/LinearWiggleDisplay/models/configSchema.js.map +1 -1
  11. package/dist/LinearWiggleDisplay/models/model.d.ts +203 -10
  12. package/dist/LinearWiggleDisplay/models/model.js +588 -408
  13. package/dist/LinearWiggleDisplay/models/model.js.map +1 -1
  14. package/dist/MultiDensityRenderer/configSchema.js +11 -1
  15. package/dist/MultiDensityRenderer/configSchema.js.map +1 -1
  16. package/dist/MultiLineRenderer/configSchema.js +17 -1
  17. package/dist/MultiLineRenderer/configSchema.js.map +1 -1
  18. package/dist/MultiLinearWiggleDisplay/components/Tooltip.d.ts +1 -1
  19. package/dist/MultiLinearWiggleDisplay/models/configSchema.js +38 -1
  20. package/dist/MultiLinearWiggleDisplay/models/configSchema.js.map +1 -1
  21. package/dist/MultiLinearWiggleDisplay/models/model.d.ts +3 -3
  22. package/dist/MultiQuantitativeTrack/configSchema.d.ts +3 -0
  23. package/dist/MultiQuantitativeTrack/configSchema.js +18 -0
  24. package/dist/MultiQuantitativeTrack/configSchema.js.map +1 -0
  25. package/dist/MultiQuantitativeTrack/index.js +2 -2
  26. package/dist/MultiQuantitativeTrack/index.js.map +1 -1
  27. package/dist/MultiRowLineRenderer/configSchema.js +17 -1
  28. package/dist/MultiRowLineRenderer/configSchema.js.map +1 -1
  29. package/dist/MultiRowXYPlotRenderer/configSchema.js +23 -1
  30. package/dist/MultiRowXYPlotRenderer/configSchema.js.map +1 -1
  31. package/dist/MultiWiggleAdapter/configSchema.d.ts +2 -2
  32. package/dist/MultiWiggleAdapter/configSchema.js +14 -1
  33. package/dist/MultiWiggleAdapter/configSchema.js.map +1 -1
  34. package/dist/MultiXYPlotRenderer/configSchema.js +23 -1
  35. package/dist/MultiXYPlotRenderer/configSchema.js.map +1 -1
  36. package/dist/QuantitativeTrack/configSchema.d.ts +3 -0
  37. package/dist/QuantitativeTrack/configSchema.js +18 -0
  38. package/dist/QuantitativeTrack/configSchema.js.map +1 -0
  39. package/dist/QuantitativeTrack/index.js +2 -2
  40. package/dist/QuantitativeTrack/index.js.map +1 -1
  41. package/dist/Tooltip.d.ts +2 -2
  42. package/dist/WiggleBaseRenderer.d.ts +4 -0
  43. package/dist/XYPlotRenderer/configSchema.js +23 -1
  44. package/dist/XYPlotRenderer/configSchema.js.map +1 -1
  45. package/dist/configSchema.d.ts +2 -2
  46. package/dist/configSchema.js +25 -1
  47. package/dist/configSchema.js.map +1 -1
  48. package/dist/drawxy.js +4 -4
  49. package/dist/drawxy.js.map +1 -1
  50. package/dist/index.d.ts +3 -307
  51. package/esm/BigWigAdapter/configSchema.d.ts +2 -2
  52. package/esm/BigWigAdapter/configSchema.js +12 -1
  53. package/esm/BigWigAdapter/configSchema.js.map +1 -1
  54. package/esm/DensityRenderer/configSchema.js +12 -2
  55. package/esm/DensityRenderer/configSchema.js.map +1 -1
  56. package/esm/LinePlotRenderer/configSchema.js +15 -2
  57. package/esm/LinePlotRenderer/configSchema.js.map +1 -1
  58. package/esm/LinearWiggleDisplay/components/Tooltip.d.ts +1 -1
  59. package/esm/LinearWiggleDisplay/models/configSchema.js +38 -1
  60. package/esm/LinearWiggleDisplay/models/configSchema.js.map +1 -1
  61. package/esm/LinearWiggleDisplay/models/model.d.ts +203 -10
  62. package/esm/LinearWiggleDisplay/models/model.js +588 -408
  63. package/esm/LinearWiggleDisplay/models/model.js.map +1 -1
  64. package/esm/MultiDensityRenderer/configSchema.js +12 -2
  65. package/esm/MultiDensityRenderer/configSchema.js.map +1 -1
  66. package/esm/MultiLineRenderer/configSchema.js +18 -2
  67. package/esm/MultiLineRenderer/configSchema.js.map +1 -1
  68. package/esm/MultiLinearWiggleDisplay/components/Tooltip.d.ts +1 -1
  69. package/esm/MultiLinearWiggleDisplay/models/configSchema.js +38 -1
  70. package/esm/MultiLinearWiggleDisplay/models/configSchema.js.map +1 -1
  71. package/esm/MultiLinearWiggleDisplay/models/model.d.ts +3 -3
  72. package/esm/MultiQuantitativeTrack/configSchema.d.ts +3 -0
  73. package/esm/MultiQuantitativeTrack/configSchema.js +16 -0
  74. package/esm/MultiQuantitativeTrack/configSchema.js.map +1 -0
  75. package/esm/MultiQuantitativeTrack/index.js +3 -3
  76. package/esm/MultiQuantitativeTrack/index.js.map +1 -1
  77. package/esm/MultiRowLineRenderer/configSchema.js +18 -2
  78. package/esm/MultiRowLineRenderer/configSchema.js.map +1 -1
  79. package/esm/MultiRowXYPlotRenderer/configSchema.js +24 -2
  80. package/esm/MultiRowXYPlotRenderer/configSchema.js.map +1 -1
  81. package/esm/MultiWiggleAdapter/configSchema.d.ts +2 -2
  82. package/esm/MultiWiggleAdapter/configSchema.js +14 -1
  83. package/esm/MultiWiggleAdapter/configSchema.js.map +1 -1
  84. package/esm/MultiXYPlotRenderer/configSchema.js +24 -2
  85. package/esm/MultiXYPlotRenderer/configSchema.js.map +1 -1
  86. package/esm/QuantitativeTrack/configSchema.d.ts +3 -0
  87. package/esm/QuantitativeTrack/configSchema.js +16 -0
  88. package/esm/QuantitativeTrack/configSchema.js.map +1 -0
  89. package/esm/QuantitativeTrack/index.js +3 -3
  90. package/esm/QuantitativeTrack/index.js.map +1 -1
  91. package/esm/Tooltip.d.ts +2 -2
  92. package/esm/WiggleBaseRenderer.d.ts +4 -0
  93. package/esm/XYPlotRenderer/configSchema.js +24 -2
  94. package/esm/XYPlotRenderer/configSchema.js.map +1 -1
  95. package/esm/configSchema.d.ts +2 -2
  96. package/esm/configSchema.js +25 -1
  97. package/esm/configSchema.js.map +1 -1
  98. package/esm/drawxy.js +4 -4
  99. package/esm/drawxy.js.map +1 -1
  100. package/esm/index.d.ts +3 -307
  101. package/package.json +2 -2
  102. package/src/BigWigAdapter/__snapshots__/BigWigAdapter.test.ts.snap +14 -14
  103. package/src/BigWigAdapter/configSchema.ts +15 -1
  104. package/src/DensityRenderer/__snapshots__/DensityRenderer.test.js.snap +9 -3
  105. package/src/DensityRenderer/configSchema.ts +13 -2
  106. package/src/LinePlotRenderer/configSchema.ts +16 -2
  107. package/src/LinearWiggleDisplay/models/configSchema.ts +40 -2
  108. package/src/LinearWiggleDisplay/models/model.tsx +192 -12
  109. package/src/MultiDensityRenderer/configSchema.ts +13 -2
  110. package/src/MultiLineRenderer/configSchema.ts +18 -3
  111. package/src/MultiLinearWiggleDisplay/models/configSchema.ts +41 -1
  112. package/src/MultiQuantitativeTrack/configSchema.ts +23 -0
  113. package/src/MultiQuantitativeTrack/index.ts +3 -10
  114. package/src/MultiRowLineRenderer/configSchema.ts +19 -2
  115. package/src/MultiRowXYPlotRenderer/configSchema.ts +25 -2
  116. package/src/MultiWiggleAdapter/configSchema.ts +17 -1
  117. package/src/MultiXYPlotRenderer/configSchema.ts +25 -2
  118. package/src/QuantitativeTrack/configSchema.ts +23 -0
  119. package/src/QuantitativeTrack/index.ts +3 -10
  120. package/src/WiggleBaseRenderer.tsx +1 -1
  121. package/src/XYPlotRenderer/__snapshots__/XYPlotRenderer.test.js.snap +9 -3
  122. package/src/XYPlotRenderer/configSchema.ts +25 -2
  123. package/src/__snapshots__/index.test.js.snap +1 -1
  124. package/src/configSchema.ts +26 -1
  125. package/src/drawxy.ts +4 -4
@@ -1,16 +1,27 @@
1
1
  import { types } from 'mobx-state-tree'
2
2
 
3
3
  import { ConfigurationSchema } from '@jbrowse/core/configuration'
4
- import ConfigSchema from '../configSchema'
4
+ import baseWiggleRendererConfigSchema from '../configSchema'
5
+
6
+ /**
7
+ * #config MultiRowLineRenderer
8
+ */
9
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
5
10
 
6
11
  const configSchema = ConfigurationSchema(
7
12
  'MultiRowLineRenderer',
8
13
  {
14
+ /**
15
+ * #slot
16
+ */
9
17
  displayCrossHatches: {
10
18
  type: 'boolean',
11
19
  description: 'choose to draw cross hatches (sideways lines)',
12
20
  defaultValue: false,
13
21
  },
22
+ /**
23
+ * #slot
24
+ */
14
25
  summaryScoreMode: {
15
26
  type: 'stringEnum',
16
27
  model: types.enumeration('Score type', ['max', 'min', 'avg', 'whiskers']),
@@ -19,7 +30,13 @@ const configSchema = ConfigurationSchema(
19
30
  defaultValue: 'avg',
20
31
  },
21
32
  },
22
- { baseConfiguration: ConfigSchema, explicitlyTyped: true },
33
+ {
34
+ /**
35
+ * #baseConfiguration
36
+ */
37
+ baseConfiguration: baseWiggleRendererConfigSchema,
38
+ explicitlyTyped: true,
39
+ },
23
40
  )
24
41
 
25
42
  export default configSchema
@@ -1,20 +1,34 @@
1
1
  import { types } from 'mobx-state-tree'
2
2
 
3
3
  import { ConfigurationSchema } from '@jbrowse/core/configuration'
4
- import ConfigSchema from '../configSchema'
4
+ import baseWiggleRendererConfigSchema from '../configSchema'
5
+
6
+ /**
7
+ * #config MultiRowXYPlotRenderer
8
+ */
9
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
5
10
 
6
11
  const configSchema = ConfigurationSchema(
7
12
  'MultiRowXYPlotRenderer',
8
13
  {
14
+ /**
15
+ * #slot
16
+ */
9
17
  filled: {
10
18
  type: 'boolean',
11
19
  defaultValue: true,
12
20
  },
21
+ /**
22
+ * #slot
23
+ */
13
24
  displayCrossHatches: {
14
25
  type: 'boolean',
15
26
  description: 'choose to draw cross hatches (sideways lines)',
16
27
  defaultValue: false,
17
28
  },
29
+ /**
30
+ * #slot
31
+ */
18
32
  summaryScoreMode: {
19
33
  type: 'stringEnum',
20
34
  model: types.enumeration('Score type', ['max', 'min', 'avg', 'whiskers']),
@@ -22,12 +36,21 @@ const configSchema = ConfigurationSchema(
22
36
  'choose whether to use max/min/average or whiskers which combines all three into the same rendering',
23
37
  defaultValue: 'whiskers',
24
38
  },
39
+ /**
40
+ * #slot
41
+ */
25
42
  minSize: {
26
43
  type: 'number',
27
44
  defaultValue: 0,
28
45
  },
29
46
  },
30
- { baseConfiguration: ConfigSchema, explicitlyTyped: true },
47
+ {
48
+ /**
49
+ * #baseConfiguration
50
+ */
51
+ baseConfiguration: baseWiggleRendererConfigSchema,
52
+ explicitlyTyped: true,
53
+ },
31
54
  )
32
55
 
33
56
  export default configSchema
@@ -1,16 +1,32 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
2
 
3
- export default ConfigurationSchema(
3
+ /**
4
+ * #config MultiWiggleAdapter
5
+ */
6
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
7
+
8
+ const MultiWiggleAdapter = ConfigurationSchema(
4
9
  'MultiWiggleAdapter',
5
10
  {
11
+ /**
12
+ * #slot
13
+ */
6
14
  subadapters: {
7
15
  type: 'frozen',
8
16
  defaultValue: [],
17
+ description: 'array of subadapter JSON objects',
9
18
  },
19
+ /**
20
+ * #slot
21
+ */
10
22
  bigWigs: {
11
23
  type: 'frozen',
24
+ description:
25
+ 'array of bigwig filenames, alternative to the subadapters slot',
12
26
  defaultValue: [],
13
27
  },
14
28
  },
15
29
  { explicitlyTyped: true },
16
30
  )
31
+
32
+ export default MultiWiggleAdapter
@@ -1,19 +1,33 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
2
  import { types } from 'mobx-state-tree'
3
- import ConfigSchema from '../configSchema'
3
+ import baseWiggleRendererConfigSchema from '../configSchema'
4
+
5
+ /**
6
+ * #config MultiXYPlotRenderer
7
+ */
8
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
4
9
 
5
10
  const configSchema = ConfigurationSchema(
6
11
  'MultiXYPlotRenderer',
7
12
  {
13
+ /**
14
+ * #slot
15
+ */
8
16
  filled: {
9
17
  type: 'boolean',
10
18
  defaultValue: true,
11
19
  },
20
+ /**
21
+ * #slot
22
+ */
12
23
  displayCrossHatches: {
13
24
  type: 'boolean',
14
25
  description: 'choose to draw cross hatches (sideways lines)',
15
26
  defaultValue: false,
16
27
  },
28
+ /**
29
+ * #slot
30
+ */
17
31
  summaryScoreMode: {
18
32
  type: 'stringEnum',
19
33
  model: types.enumeration('Score type', ['max', 'min', 'avg', 'whiskers']),
@@ -21,11 +35,20 @@ const configSchema = ConfigurationSchema(
21
35
  'choose whether to use max/min/average or whiskers which combines all three into the same rendering',
22
36
  defaultValue: 'avg',
23
37
  },
38
+ /**
39
+ * #slot
40
+ */
24
41
  minSize: {
25
42
  type: 'number',
26
43
  defaultValue: 0,
27
44
  },
28
45
  },
29
- { baseConfiguration: ConfigSchema, explicitlyTyped: true },
46
+ {
47
+ /**
48
+ * #baseConfiguration
49
+ */
50
+ baseConfiguration: baseWiggleRendererConfigSchema,
51
+ explicitlyTyped: true,
52
+ },
30
53
  )
31
54
  export default configSchema
@@ -0,0 +1,23 @@
1
+ import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
+ import { createBaseTrackConfig } from '@jbrowse/core/pluggableElementTypes/models'
3
+ import PluginManager from '@jbrowse/core/PluginManager'
4
+
5
+ /**
6
+ * #config QuantitativeTrack
7
+ */
8
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
9
+
10
+ function configSchemaFactory(pluginManager: PluginManager) {
11
+ return ConfigurationSchema(
12
+ 'QuantitativeTrack',
13
+ {},
14
+ {
15
+ /**
16
+ * #baseConfiguration
17
+ */
18
+ baseConfiguration: createBaseTrackConfig(pluginManager),
19
+ },
20
+ )
21
+ }
22
+
23
+ export default configSchemaFactory
@@ -1,18 +1,11 @@
1
- import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
- import {
3
- createBaseTrackConfig,
4
- createBaseTrackModel,
5
- } from '@jbrowse/core/pluggableElementTypes/models'
1
+ import { createBaseTrackModel } from '@jbrowse/core/pluggableElementTypes/models'
6
2
  import TrackType from '@jbrowse/core/pluggableElementTypes/TrackType'
7
3
  import PluginManager from '@jbrowse/core/PluginManager'
4
+ import configSchemaF from './configSchema'
8
5
 
9
6
  export default (pluginManager: PluginManager) => {
10
7
  pluginManager.addTrackType(() => {
11
- const configSchema = ConfigurationSchema(
12
- 'QuantitativeTrack',
13
- {},
14
- { baseConfiguration: createBaseTrackConfig(pluginManager) },
15
- )
8
+ const configSchema = configSchemaF(pluginManager)
16
9
  return new TrackType({
17
10
  name: 'QuantitativeTrack',
18
11
  configSchema,
@@ -82,7 +82,7 @@ export default abstract class WiggleBaseRenderer extends FeatureRendererType {
82
82
  }
83
83
  }
84
84
 
85
- /*
85
+ /**
86
86
  * draw features to context given props, to be used by derived renderer
87
87
  * classes
88
88
  */
@@ -1,10 +1,16 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`several features 1`] = `
4
- Object {
4
+ {
5
5
  "imageData": Any<Object>,
6
- "reducedFeatures": Array [
7
- Object {
6
+ "reducedFeatures": [
7
+ {
8
+ "end": 100,
9
+ "score": 1,
10
+ "start": 1,
11
+ "uniqueId": "t1",
12
+ },
13
+ {
8
14
  "end": 200,
9
15
  "score": 2,
10
16
  "start": 101,
@@ -1,19 +1,33 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
- import ConfigSchema from '../configSchema'
2
+ import baseWiggleRendererConfigSchema from '../configSchema'
3
3
  import { types } from 'mobx-state-tree'
4
4
 
5
+ /**
6
+ * #config XYPlotRenderer
7
+ */
8
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
9
+
5
10
  const configSchema = ConfigurationSchema(
6
11
  'XYPlotRenderer',
7
12
  {
13
+ /**
14
+ * #slot
15
+ */
8
16
  filled: {
9
17
  type: 'boolean',
10
18
  defaultValue: true,
11
19
  },
20
+ /**
21
+ * #slot
22
+ */
12
23
  displayCrossHatches: {
13
24
  type: 'boolean',
14
25
  description: 'choose to draw cross hatches (sideways lines)',
15
26
  defaultValue: false,
16
27
  },
28
+ /**
29
+ * #slot
30
+ */
17
31
  summaryScoreMode: {
18
32
  type: 'stringEnum',
19
33
  model: types.enumeration('Score type', ['max', 'min', 'avg', 'whiskers']),
@@ -21,12 +35,21 @@ const configSchema = ConfigurationSchema(
21
35
  'choose whether to use max/min/average or whiskers which combines all three into the same rendering',
22
36
  defaultValue: 'whiskers',
23
37
  },
38
+ /**
39
+ * #slot
40
+ */
24
41
  minSize: {
25
42
  type: 'number',
26
43
  defaultValue: 0,
27
44
  },
28
45
  },
29
- { baseConfiguration: ConfigSchema, explicitlyTyped: true },
46
+ {
47
+ /**
48
+ * #baseConfiguration
49
+ */
50
+ baseConfiguration: baseWiggleRendererConfigSchema,
51
+ explicitlyTyped: true,
52
+ },
30
53
  )
31
54
 
32
55
  export default configSchema
@@ -1,3 +1,3 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`plugin in a stock JBrowse 1`] = `Object {}`;
3
+ exports[`plugin in a stock JBrowse 1`] = `{}`;
@@ -1,29 +1,50 @@
1
1
  import { ConfigurationSchema } from '@jbrowse/core/configuration'
2
2
  import { types } from 'mobx-state-tree'
3
3
 
4
- export default ConfigurationSchema(
4
+ /**
5
+ * #config WiggleRenderer
6
+ * this is the "base wiggle renderer config schema"
7
+ */
8
+ function x() {} // eslint-disable-line @typescript-eslint/no-unused-vars
9
+
10
+ const WiggleRenderer = ConfigurationSchema(
5
11
  'WiggleRenderer',
6
12
  {
13
+ /**
14
+ * #slot
15
+ */
7
16
  color: {
8
17
  type: 'color',
9
18
  description: 'the color of track, overrides posColor and negColor',
10
19
  defaultValue: '#f0f',
11
20
  },
21
+ /**
22
+ * #slot
23
+ */
12
24
  posColor: {
13
25
  type: 'color',
14
26
  description: 'the color to use when the score is positive',
15
27
  defaultValue: 'blue',
16
28
  },
29
+ /**
30
+ * #slot
31
+ */
17
32
  negColor: {
18
33
  type: 'color',
19
34
  description: 'the color to use when the score is negative',
20
35
  defaultValue: 'red',
21
36
  },
37
+ /**
38
+ * #slot
39
+ */
22
40
  clipColor: {
23
41
  type: 'color',
24
42
  description: 'the color of the clipping marker',
25
43
  defaultValue: 'red',
26
44
  },
45
+ /**
46
+ * #slot
47
+ */
27
48
  bicolorPivot: {
28
49
  type: 'stringEnum',
29
50
  model: types.enumeration('Scale type', [
@@ -35,6 +56,9 @@ export default ConfigurationSchema(
35
56
  description: 'type of bicolor pivot',
36
57
  defaultValue: 'numeric',
37
58
  },
59
+ /**
60
+ * #slot
61
+ */
38
62
  bicolorPivotValue: {
39
63
  type: 'number',
40
64
  defaultValue: 0,
@@ -43,3 +67,4 @@ export default ConfigurationSchema(
43
67
  },
44
68
  { explicitlyTyped: true },
45
69
  )
70
+ export default WiggleRenderer
package/src/drawxy.ts CHANGED
@@ -83,7 +83,7 @@ export function drawXY(
83
83
  const getHeight = (n: number) => (filled ? toOrigin(n) : Math.max(minSize, 1))
84
84
  let hasClipping = false
85
85
 
86
- let prevLeftPx = 0
86
+ let prevLeftPx = -Infinity
87
87
  const reducedFeatures = []
88
88
  const crossingOrigin = niceMin < pivotValue && niceMax > pivotValue
89
89
 
@@ -96,7 +96,7 @@ export function drawXY(
96
96
  for (const feature of features.values()) {
97
97
  const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx)
98
98
  if (feature.get('summary')) {
99
- const w = rightPx - leftPx + fudgeFactor
99
+ const w = Math.max(rightPx - leftPx + fudgeFactor, minSize)
100
100
  const max = feature.get('maxScore')
101
101
  const c = colorCallback(feature, max)
102
102
  const effectiveC = crossingOrigin
@@ -255,7 +255,7 @@ export function drawLine(
255
255
 
256
256
  let lastVal
257
257
 
258
- let prevLeftPx = 0
258
+ let prevLeftPx = -Infinity
259
259
  const reducedFeatures = []
260
260
  for (const feature of features.values()) {
261
261
  const [leftPx, rightPx] = featureSpanPx(feature, region, bpPerPx)
@@ -347,7 +347,7 @@ export function drawDensity(
347
347
  }
348
348
  const [niceMin, niceMax] = scale2.domain()
349
349
 
350
- let prevLeftPx = 0
350
+ let prevLeftPx = -Infinity
351
351
  let hasClipping = false
352
352
  const reducedFeatures = []
353
353
  for (const feature of features.values()) {