Skip to content

Commit fb12ed4

Browse files
committed
spectra_displayer: fix fromTo actions
1 parent 9eecf5c commit fb12ed4

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

src/modules/types/science/spectra/spectra_displayer/controller.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ define(['modules/default/defaultcontroller', 'lodash'], function (Default, _) {
7171
type: ['array'],
7272
label: 'Annotation file'
7373
},
74-
fromTo: {
75-
type: 'fromTo',
76-
label: 'From - To data'
77-
},
7874
series_xy1d: {
7975
type: 'array',
8076
label: 'List of series in 1D format ( [ x, y, x, y, ... ] )'
@@ -140,7 +136,8 @@ define(['modules/default/defaultcontroller', 'lodash'], function (Default, _) {
140136
Controller.prototype.variablesIn = ['chart', 'xArray', 'xyArray', 'jcamp', 'annotations', 'series_xy1d'];
141137

142138
Controller.prototype.actionsIn = {
143-
fromTo: 'From-To',
139+
fromToX: 'From - To X',
140+
fromToY: 'From - To Y',
144141
addSerie: 'Add a serie',
145142
removeSerie: 'Remove a serie',
146143
removeSerieByName: 'Remove serie (name as input)',

src/src/util/versioning.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
define(['src/util/versionhandler', 'src/util/debug', 'src/main/variables', 'lib/semver/semver'], function (VersionHandler, Debug, Variables, semver) {
44

5-
var version = '2.15.0';
5+
var version = '2.15.1';
66

77
if (!semver.valid(version)) {
88
throw new Error('Version number is invalid: ' + version);

src/src/util/viewmigration.js

+13
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,19 @@ define(['src/util/versioning', 'src/util/debug', 'lib/semver/semver'], function
313313
delete group.filterRow;
314314

315315
}, 'slick_grid');
316+
},
317+
318+
'2.15.1', function (view) {
319+
eachModule(view, function(module) {
320+
var actions_in = module.actions_in;
321+
if (actions_in && actions_in.length) {
322+
actions_in.forEach(function (action) {
323+
if (action && action.rel === 'fromTo') {
324+
action.rel = 'fromToX';
325+
}
326+
});
327+
}
328+
}, 'spectra_displayer');
316329
}
317330

318331
// Add new migration functions here

0 commit comments

Comments
 (0)