@jbrowse/plugin-circular-view 1.5.3 → 1.5.4

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.
@@ -1,15 +1,15 @@
1
1
  import { Region } from '@jbrowse/core/util';
2
2
  export declare class Slice {
3
- key: string;
4
3
  region: Region & {
5
4
  widthBp: number;
6
5
  elided: boolean;
7
6
  };
7
+ radianWidth: number;
8
+ key: string;
8
9
  offsetRadians: number;
9
10
  startRadians: number;
10
11
  endRadians: number;
11
12
  bpPerRadian: number;
12
- radianWidth: number;
13
13
  flipped: boolean;
14
14
  constructor(view: {
15
15
  bpPerRadian: number;
@@ -38,14 +38,9 @@ function ownKeys(object, enumerableOnly) {
38
38
 
39
39
  if (Object.getOwnPropertySymbols) {
40
40
  var symbols = Object.getOwnPropertySymbols(object);
41
-
42
- if (enumerableOnly) {
43
- symbols = symbols.filter(function (sym) {
44
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
45
- });
46
- }
47
-
48
- keys.push.apply(keys, symbols);
41
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
42
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
43
+ })), keys.push.apply(keys, symbols);
49
44
  }
50
45
 
51
46
  return keys;
@@ -53,19 +48,12 @@ function ownKeys(object, enumerableOnly) {
53
48
 
54
49
  function _objectSpread2(target) {
55
50
  for (var i = 1; i < arguments.length; i++) {
56
- var source = arguments[i] != null ? arguments[i] : {};
57
-
58
- if (i % 2) {
59
- ownKeys(Object(source), true).forEach(function (key) {
60
- _defineProperty(target, key, source[key]);
61
- });
62
- } else if (Object.getOwnPropertyDescriptors) {
63
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
64
- } else {
65
- ownKeys(Object(source)).forEach(function (key) {
66
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
67
- });
68
- }
51
+ var source = null != arguments[i] ? arguments[i] : {};
52
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
53
+ _defineProperty(target, key, source[key]);
54
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
55
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
56
+ });
69
57
  }
70
58
 
71
59
  return target;
@@ -126,6 +114,9 @@ function _defineProperties(target, props) {
126
114
  function _createClass(Constructor, protoProps, staticProps) {
127
115
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
128
116
  if (staticProps) _defineProperties(Constructor, staticProps);
117
+ Object.defineProperty(Constructor, "prototype", {
118
+ writable: false
119
+ });
129
120
  return Constructor;
130
121
  }
131
122
 
@@ -149,12 +140,15 @@ function _inherits(subClass, superClass) {
149
140
  throw new TypeError("Super expression must either be null or a function");
150
141
  }
151
142
 
152
- subClass.prototype = Object.create(superClass && superClass.prototype, {
153
- constructor: {
154
- value: subClass,
155
- writable: true,
156
- configurable: true
157
- }
143
+ Object.defineProperty(subClass, "prototype", {
144
+ value: Object.create(superClass && superClass.prototype, {
145
+ constructor: {
146
+ value: subClass,
147
+ writable: true,
148
+ configurable: true
149
+ }
150
+ }),
151
+ writable: false
158
152
  });
159
153
  if (superClass) _setPrototypeOf(subClass, superClass);
160
154
  }
@@ -662,12 +656,12 @@ var Slice = /*#__PURE__*/function () {
662
656
  function Slice(view, region, currentRadianOffset, radianWidth) {
663
657
  _classCallCheck(this, Slice);
664
658
 
659
+ this.region = region;
660
+ this.radianWidth = radianWidth;
665
661
  var bpPerRadian = view.bpPerRadian;
666
662
  this.key = util.assembleLocString(region);
667
- this.region = region;
668
663
  this.offsetRadians = currentRadianOffset;
669
664
  this.bpPerRadian = bpPerRadian;
670
- this.radianWidth = radianWidth;
671
665
  this.flipped = false;
672
666
  this.startRadians = this.offsetRadians;
673
667
  this.endRadians = region.widthBp / this.bpPerRadian + this.offsetRadians;