Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
c2dd8800
Commit
c2dd8800
authored
Dec 18, 2012
by
Valera Rozuvan
Committed by
Alexander Kryklia
Jan 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dynamic range part 1.
parent
51db556e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
9 deletions
+25
-9
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/graph.js
+25
-9
No files found.
common/lib/xmodule/xmodule/js/src/graphical_slider_tool/graph.js
View file @
c2dd8800
...
@@ -27,8 +27,8 @@ define('Graph', ['logme'], function (logme) {
...
@@ -27,8 +27,8 @@ define('Graph', ['logme'], function (logme) {
}
}
// Configure some settings for the graph.
// Configure some settings for the graph.
setGraphAxes
();
setGraphXRange
();
setGraphXRange
();
setGraphAxes
();
// Get the user defined functions. If there aren't any, don't do
// Get the user defined functions. If there aren't any, don't do
// anything else.
// anything else.
...
@@ -135,15 +135,29 @@ define('Graph', ['logme'], function (logme) {
...
@@ -135,15 +135,29 @@ define('Graph', ['logme'], function (logme) {
function
setGraphXRange
()
{
function
setGraphXRange
()
{
var
xRangeStr
,
xRangeBlobs
,
tempNum
;
var
xRangeStr
,
xRangeBlobs
,
tempNum
;
xrange
=
{
xrange
=
{};
'start'
:
0
,
'end'
:
10
,
if
(
$
.
isPlainObject
(
config
.
plot
.
xrange
)
===
false
)
{
'step'
:
0.1
logme
(
'ERROR: Expected config.plot.xrange to be an object. It is not.'
);
};
logme
(
'config.plot.xrange = '
,
config
.
plot
.
xrange
);
return
false
;
}
if
(
typeof
config
.
plot
.
xrange
.
min
!==
'string'
)
{
logme
(
'ERROR: Expected config.plot.xrange.min to be a string. It is not.'
);
logme
(
'config.plot.xrange.min = '
,
config
.
plot
.
xrange
.
min
);
return
false
;
}
if
(
typeof
config
.
plot
.
xrange
.
max
!==
'string'
)
{
logme
(
'ERROR: Expected config.plot.xrange.max to be a string. It is not.'
);
logme
(
'config.plot.xrange.max = '
,
config
.
plot
.
xrange
.
max
);
return
false
;
}
// The 'xrange' is a string containing two floating point numbers
// separated by a comma. The first number is the starting
// x-coordinate , the second number is the ending x-coordinate
if
(
typeof
config
.
plot
[
'xrange'
]
===
'string'
)
{
if
(
typeof
config
.
plot
[
'xrange'
]
===
'string'
)
{
xRangeStr
=
config
.
plot
[
'xrange'
];
xRangeStr
=
config
.
plot
[
'xrange'
];
xRangeBlobs
=
xRangeStr
.
split
(
','
);
xRangeBlobs
=
xRangeStr
.
split
(
','
);
...
@@ -193,6 +207,8 @@ define('Graph', ['logme'], function (logme) {
...
@@ -193,6 +207,8 @@ define('Graph', ['logme'], function (logme) {
}
else
{
}
else
{
logme
(
'ERROR: num_points is not a string.'
);
logme
(
'ERROR: num_points is not a string.'
);
}
}
return
true
;
}
}
function
createFunctions
()
{
function
createFunctions
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment