@jbrowse/plugin-circular-view 3.0.5 → 3.2.0

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.
@@ -152,7 +152,7 @@ function stateModelFactory(pluginManager) {
152
152
  },
153
153
  get elidedRegions() {
154
154
  const visible = [];
155
- self.displayedRegions.forEach(region => {
155
+ for (const region of self.displayedRegions) {
156
156
  const widthBp = region.end - region.start;
157
157
  const widthPx = widthBp / self.bpPerPx;
158
158
  if (widthPx < self.minVisibleWidth) {
@@ -172,7 +172,7 @@ function stateModelFactory(pluginManager) {
172
172
  else {
173
173
  visible.push({ ...region, widthBp, elided: false });
174
174
  }
175
- });
175
+ }
176
176
  for (let i = 0; i < visible.length; i += 1) {
177
177
  const v = visible[i];
178
178
  if (v.elided && v.regions.length === 1) {
@@ -183,11 +183,11 @@ function stateModelFactory(pluginManager) {
183
183
  },
184
184
  get assemblyNames() {
185
185
  const assemblyNames = [];
186
- self.displayedRegions.forEach(displayedRegion => {
186
+ for (const displayedRegion of self.displayedRegions) {
187
187
  if (!assemblyNames.includes(displayedRegion.assemblyName)) {
188
188
  assemblyNames.push(displayedRegion.assemblyName);
189
189
  }
190
- });
190
+ }
191
191
  return assemblyNames;
192
192
  },
193
193
  get initialized() {
@@ -324,11 +324,13 @@ function stateModelFactory(pluginManager) {
324
324
  hideTrack(trackId) {
325
325
  const schema = pluginManager.pluggableConfigSchemaType('track');
326
326
  const conf = (0, mobx_state_tree_1.resolveIdentifier)(schema, (0, mobx_state_tree_1.getRoot)(self), trackId);
327
- const t = self.tracks.filter(t => t.configuration === conf);
327
+ const tracks = self.tracks.filter(t => t.configuration === conf);
328
328
  (0, mobx_1.transaction)(() => {
329
- t.forEach(t => self.tracks.remove(t));
329
+ for (const track of tracks) {
330
+ self.tracks.remove(track);
331
+ }
330
332
  });
331
- return t.length;
333
+ return tracks.length;
332
334
  },
333
335
  toggleFitToWindowLock() {
334
336
  self.lockedFitToWindow = !self.lockedFitToWindow;
@@ -15,8 +15,8 @@ function LaunchCircularViewF(pluginManager) {
15
15
  throw new Error(`Assembly "${assembly}" not found when launching circular genome view`);
16
16
  }
17
17
  view.setDisplayedRegions(asm.regions || []);
18
- tracks.forEach(track => {
18
+ for (const track of tracks) {
19
19
  view.showTrack(track);
20
- });
20
+ }
21
21
  });
22
22
  }
@@ -114,7 +114,7 @@ function stateModelFactory(pluginManager) {
114
114
  },
115
115
  get elidedRegions() {
116
116
  const visible = [];
117
- self.displayedRegions.forEach(region => {
117
+ for (const region of self.displayedRegions) {
118
118
  const widthBp = region.end - region.start;
119
119
  const widthPx = widthBp / self.bpPerPx;
120
120
  if (widthPx < self.minVisibleWidth) {
@@ -134,7 +134,7 @@ function stateModelFactory(pluginManager) {
134
134
  else {
135
135
  visible.push({ ...region, widthBp, elided: false });
136
136
  }
137
- });
137
+ }
138
138
  for (let i = 0; i < visible.length; i += 1) {
139
139
  const v = visible[i];
140
140
  if (v.elided && v.regions.length === 1) {
@@ -145,11 +145,11 @@ function stateModelFactory(pluginManager) {
145
145
  },
146
146
  get assemblyNames() {
147
147
  const assemblyNames = [];
148
- self.displayedRegions.forEach(displayedRegion => {
148
+ for (const displayedRegion of self.displayedRegions) {
149
149
  if (!assemblyNames.includes(displayedRegion.assemblyName)) {
150
150
  assemblyNames.push(displayedRegion.assemblyName);
151
151
  }
152
- });
152
+ }
153
153
  return assemblyNames;
154
154
  },
155
155
  get initialized() {
@@ -286,11 +286,13 @@ function stateModelFactory(pluginManager) {
286
286
  hideTrack(trackId) {
287
287
  const schema = pluginManager.pluggableConfigSchemaType('track');
288
288
  const conf = resolveIdentifier(schema, getRoot(self), trackId);
289
- const t = self.tracks.filter(t => t.configuration === conf);
289
+ const tracks = self.tracks.filter(t => t.configuration === conf);
290
290
  transaction(() => {
291
- t.forEach(t => self.tracks.remove(t));
291
+ for (const track of tracks) {
292
+ self.tracks.remove(track);
293
+ }
292
294
  });
293
- return t.length;
295
+ return tracks.length;
294
296
  },
295
297
  toggleFitToWindowLock() {
296
298
  self.lockedFitToWindow = !self.lockedFitToWindow;
@@ -12,8 +12,8 @@ export default function LaunchCircularViewF(pluginManager) {
12
12
  throw new Error(`Assembly "${assembly}" not found when launching circular genome view`);
13
13
  }
14
14
  view.setDisplayedRegions(asm.regions || []);
15
- tracks.forEach(track => {
15
+ for (const track of tracks) {
16
16
  view.showTrack(track);
17
- });
17
+ }
18
18
  });
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/plugin-circular-view",
3
- "version": "3.0.5",
3
+ "version": "3.2.0",
4
4
  "description": "JBrowse 2 circular view",
5
5
  "keywords": [
6
6
  "jbrowse",
@@ -36,7 +36,7 @@
36
36
  "clean": "rimraf dist esm *.tsbuildinfo"
37
37
  },
38
38
  "dependencies": {
39
- "@jbrowse/core": "^3.0.5",
39
+ "@jbrowse/core": "^3.2.0",
40
40
  "@mui/icons-material": "^6.0.0",
41
41
  "@mui/material": "^6.0.0",
42
42
  "@types/file-saver": "^2.0.0",
@@ -56,5 +56,5 @@
56
56
  "distModule": "esm/index.js",
57
57
  "srcModule": "src/index.ts",
58
58
  "module": "esm/index.js",
59
- "gitHead": "a03749efe19e51609922272b845a331897346789"
59
+ "gitHead": "c750e3f56706a490c19ba75abd807fec5e38aebf"
60
60
  }