-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathScaleOptionTask.js
More file actions
33 lines (27 loc) · 872 Bytes
/
ScaleOptionTask.js
File metadata and controls
33 lines (27 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import ValueReader from '../../readers/ValueReader';
import ObjectReader from '../../readers/ObjectReader';
export default function ScaleOptionTask(optionsTask, defaultConfig) {
var _data = {},
_hash = {};
var _dataTemplate = new ObjectReader({
scale: new ValueReader(["number"], false, defaultConfig.scale),
minimumScale: new ValueReader(["number"], false, defaultConfig.minimumScale),
maximumScale: new ValueReader(["number"], false, defaultConfig.maximumScale)
});
function process() {
var context = {
isChanged: false,
hash: _hash
};
_data = _dataTemplate.read(_data, optionsTask.getOptions(), "options", context);
return context.isChanged;
}
function getOptions() {
return _data;
}
return {
process: process,
getOptions: getOptions,
description: "Checks control scale options."
};
};