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

Initial rangeslider ranges #473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 26, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleanup rangeslider draw and reorder draw call
  • Loading branch information
mdtusz committed Apr 25, 2016
commit da32318defcba4e5e6c366c58e7f308ae5240978
4 changes: 2 additions & 2 deletions 4 src/components/rangeslider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
supplyLayoutDefaults: supplyLayoutDefaults
};

function draw(gd, minStart, maxStart) {
function draw(gd) {
if(!gd._fullLayout.xaxis) return;

var fullLayout = gd._fullLayout,
Expand All @@ -41,7 +41,7 @@ function draw(gd, minStart, maxStart) {
var height = (fullLayout.height - fullLayout.margin.b - fullLayout.margin.t) * options.thickness,
offsetShift = Math.floor(options.borderwidth / 2);

if(sliderContainer[0].length === 0 && !fullLayout._hasGL2D) createSlider(gd, minStart, maxStart);
if(sliderContainer[0].length === 0 && !fullLayout._hasGL2D) createSlider(gd);

// Need to default to 0 for when making gl plots
var bb = fullLayout.xaxis._boundingBox ?
Expand Down
2 changes: 1 addition & 1 deletion 2 src/plot_api/plot_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ Plotly.plot = function(gd, data, layout, config) {

function drawAxes() {
// draw ticks, titles, and calculate axis scaling (._b, ._m)
RangeSlider.draw(gd);
return Plotly.Axes.doTicks(gd, 'redraw');
}

Expand Down Expand Up @@ -310,6 +309,7 @@ Plotly.plot = function(gd, data, layout, config) {
Shapes.drawAll(gd);
Plotly.Annotations.drawAll(gd);
Legend.draw(gd);
RangeSlider.draw(gd);
RangeSelector.draw(gd);
}

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.