Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a435981

Browse filesBrowse files
committed
partial support for range selectors on world calendars
1 parent c1c24e8 commit a435981
Copy full SHA for a435981

File tree

Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed

‎src/components/rangeselector/get_update_object.js

Copy file name to clipboardExpand all lines: src/components/rangeselector/get_update_object.js
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111

1212
var d3 = require('d3');
1313

14-
var Lib = require('../../lib');
15-
16-
1714
module.exports = function getUpdateObject(axisLayout, buttonLayout) {
1815
var axName = axisLayout._name;
1916
var update = {};
@@ -33,7 +30,7 @@ module.exports = function getUpdateObject(axisLayout, buttonLayout) {
3330

3431
function getXRange(axisLayout, buttonLayout) {
3532
var currentRange = axisLayout.range;
36-
var base = new Date(Lib.dateTime2ms(currentRange[1]));
33+
var base = new Date(axisLayout.r2l(currentRange[1]));
3734

3835
var step = buttonLayout.step,
3936
count = buttonLayout.count;
@@ -42,13 +39,13 @@ function getXRange(axisLayout, buttonLayout) {
4239

4340
switch(buttonLayout.stepmode) {
4441
case 'backward':
45-
range0 = Lib.ms2DateTime(+d3.time[step].utc.offset(base, -count));
42+
range0 = axisLayout.l2r(+d3.time[step].utc.offset(base, -count));
4643
break;
4744

4845
case 'todate':
4946
var base2 = d3.time[step].utc.offset(base, -count);
5047

51-
range0 = Lib.ms2DateTime(+d3.time[step].utc.ceil(base2));
48+
range0 = axisLayout.l2r(+d3.time[step].utc.ceil(base2));
5249
break;
5350
}
5451

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.