Commit ae03090f by Valera Rozuvan Committed by Alexander Kryklia

GST work in progress.

parent 32c70a52
......@@ -129,8 +129,7 @@ class GraphicalSliderToolModule(XModule):
"""
#substitute plot
plot_div = '<div class="' + self.html_class + '_plot" id="' + self.html_id + '_plot" \
style="width: 600px; height: 600px; padding: 0px; position: relative;"> \
This is plot</div>'
style="width: 600px; height: 600px; padding: 0px; position: relative;">This is plot</div>'
html_string = html_string.replace('$plot$', plot_div)
# substitute sliders
......@@ -140,7 +139,7 @@ class GraphicalSliderToolModule(XModule):
vars = [x['@var'] for x in sliders]
slider_div = '<div class="{element_class}_slider" id="{element_id}_slider_{var}" \
data-var="{var}">This is slider</div>'
data-var="{var}"></div>'
for var in vars:
html_string = re.sub(r'\$slider\s+' + var + r'\$',
......
......@@ -28,6 +28,8 @@ define('Graph', [], function () {
return;
function createFunctions() {
var c1;
functions = [];
if (typeof config.plot['function'] === 'undefined') {
......@@ -39,7 +41,11 @@ define('Graph', [], function () {
} else if ($.isPlainObject(config.plot['function']) === true) {
} else if ($.isArray(config.plot['function'])) {
for (c1 = 0; c1 < config.plot['function'].length; c1++) {
if (typeof config.plot['function'][c1] === 'string') {
addFunction(config.plot['function'][c1]);
}
}
}
return;
......
......@@ -112,6 +112,7 @@ define('Sliders', [], function () {
'min': valueMin,
'max': valueMax,
'value': constValue,
'step': 0.01,
'change': sliderOnChange
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment