genoverse 4.0.1 → 4.0.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.
- package/README.md +1 -1
- package/dist/0caf4c6cf244a90efcc5.woff2 +0 -0
- package/dist/{15d98c18221c8bcb2334.ttf → 0d03b1bbd1d62c1e1284.ttf} +0 -0
- package/dist/216.css +6 -6
- package/dist/216.css.map +1 -1
- package/dist/59edf72a325ac2048d60.woff2 +0 -0
- package/dist/952.genoverse.js +1 -1
- package/dist/952.genoverse.js.map +1 -1
- package/dist/{79da213423ac0def2058.ttf → e615bbcb258550973c16.ttf} +0 -0
- package/dist/genoverse.js +1 -1
- package/dist/genoverse.js.map +1 -1
- package/package.json +1 -1
- package/src/js/Genoverse.js +14 -11
- package/src/js/Track/Model.js +10 -8
- package/src/js/plugins/focusRegion.js +7 -7
- package/dist/4896d4b04430cc3dfb06.woff2 +0 -0
- package/dist/d79c2ec96ab9ff1161a2.woff2 +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genoverse",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "Genoverse is a portable, customizable, back-end independent JavaScript and HTML5 based genome browser which allows the user to explore data in a dynamic and interactive manner.",
|
|
5
5
|
"main": "src/js/Genoverse.js",
|
|
6
6
|
"directories": {
|
package/src/js/Genoverse.js
CHANGED
|
@@ -146,17 +146,20 @@ const Genoverse = Base.extend({
|
|
|
146
146
|
this.loadedPlugins[plugin.name] = true;
|
|
147
147
|
};
|
|
148
148
|
|
|
149
|
-
const pluginImports = Object.keys(pluginsByName).
|
|
150
|
-
(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
149
|
+
const pluginImports = Object.keys(pluginsByName).reduce(
|
|
150
|
+
(ready, pluginName) => ready.then(
|
|
151
|
+
() => import(`./plugins/${pluginName}`).then(
|
|
152
|
+
imported => initializePlugin({
|
|
153
|
+
name : pluginName,
|
|
154
|
+
conf : pluginsByName[pluginName].conf,
|
|
155
|
+
exports : imported.default,
|
|
156
|
+
})
|
|
157
|
+
)
|
|
158
|
+
),
|
|
159
|
+
this.jQuery.Deferred().resolve()
|
|
160
|
+
);
|
|
158
161
|
|
|
159
|
-
return this.jQuery.when(
|
|
162
|
+
return this.jQuery.when(pluginImports);
|
|
160
163
|
},
|
|
161
164
|
|
|
162
165
|
init: function () {
|
|
@@ -543,7 +546,7 @@ const Genoverse = Base.extend({
|
|
|
543
546
|
onTracks: function (func, ...args) {
|
|
544
547
|
this.tracks.forEach(
|
|
545
548
|
(track) => {
|
|
546
|
-
if (track.disabled) {
|
|
549
|
+
if (track.disabled || !track._interface) { // if track._interface is undefined, the track has not been fully initialized yet
|
|
547
550
|
return;
|
|
548
551
|
}
|
|
549
552
|
|
package/src/js/Track/Model.js
CHANGED
|
@@ -126,18 +126,20 @@ export default Base.extend({
|
|
|
126
126
|
data : this.urlParams,
|
|
127
127
|
dataType : this.dataType,
|
|
128
128
|
xhrFields : this.xhrFields,
|
|
129
|
-
}).
|
|
129
|
+
}).done(
|
|
130
130
|
(data) => {
|
|
131
131
|
this.receiveData(data, chr, bin[0], bin[1]);
|
|
132
132
|
}
|
|
133
|
-
).
|
|
133
|
+
).fail(
|
|
134
134
|
(xhr, statusText, ...args) => {
|
|
135
|
-
this.track
|
|
136
|
-
this.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
135
|
+
if (this.track?.controller?.showError) {
|
|
136
|
+
this.track.controller.showError(
|
|
137
|
+
this.showServerErrors && xhr.responseJSON?.message
|
|
138
|
+
? xhr.responseJSON.message
|
|
139
|
+
: `${statusText} while getting the data, see console for more details`,
|
|
140
|
+
[ xhr, statusText, ...args ]
|
|
141
|
+
);
|
|
142
|
+
}
|
|
141
143
|
}
|
|
142
144
|
).always(
|
|
143
145
|
() => {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import './controlPanel';
|
|
1
|
+
import controlPanel from './controlPanel';
|
|
2
2
|
|
|
3
3
|
const plugin = function () {
|
|
4
4
|
this.controls.push({
|
|
5
|
-
icon
|
|
6
|
-
|
|
7
|
-
name
|
|
8
|
-
action
|
|
9
|
-
init
|
|
5
|
+
icon : '<i class="fas fa-map-marker-alt"></i>',
|
|
6
|
+
class : 'gv-button-large',
|
|
7
|
+
name : `Reset focus to ${this.focusRegion && this.focusRegion.name ? this.focusRegion.name : `${this.chr}:${this.start}-${this.end}`}`,
|
|
8
|
+
action : (browser) => { browser.moveTo(browser.focusRegion.chr, browser.focusRegion.start, browser.focusRegion.end, true); },
|
|
9
|
+
init : (browser) => { browser.focusRegion = browser.focusRegion || { chr: browser.chr, start: browser.start, end: browser.end }; },
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export default { focusRegion: plugin };
|
|
13
|
+
export default { focusRegion: plugin, requires: controlPanel };
|
|
Binary file
|
|
Binary file
|