Skip to content

gl2d better ticks #1766

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 7 commits into from
Jun 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 0 additions & 7 deletions src/plots/gl2d/scene2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,6 @@ proto.computeTickMarks = function() {
this.xaxis.setScale();
this.yaxis.setScale();

// override _length from backward compatibility
// even though setScale 'should' give the correct result
this.xaxis._length =
this.glplot.viewBox[2] - this.glplot.viewBox[0];
this.yaxis._length =
this.glplot.viewBox[3] - this.glplot.viewBox[1];

var nextTicks = [
Axes.calcTicks(this.xaxis),
Axes.calcTicks(this.yaxis)
Expand Down
Binary file modified test/image/baselines/gl2d_10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_axes_booleans.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_axes_labels.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_axes_lines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_axes_range_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_axes_range_type.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_connect_gaps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_date_axes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_error_bars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_heatmapgl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_multiple_subplots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_scatter-colorscale-colorbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_scatter-marker-line-colorscales.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_simple_inset.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_size_margins.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_stacked_coupled_subplots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/gl2d_stacked_subplots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions test/jasmine/tests/gl2d_click_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ describe('Test hover and click interactions', function() {
bordercolor: _mock.data[0].x.map(function(_, i) { return i % 2 ? 'red' : 'green'; })
};

var run = makeRunner([655, 317], {
var run = makeRunner([634, 321], {
x: 15.772,
y: 0.387,
label: ['0.387'],
Expand All @@ -249,7 +249,7 @@ describe('Test hover and click interactions', function() {
var _mock = Lib.extendDeep({}, mock1);
_mock.data[0].hoverinfo = 'none';

var run = makeRunner([655, 317], {
var run = makeRunner([634, 321], {
x: 15.772,
y: 0.387,
curveNumber: 0,
Expand Down
12 changes: 6 additions & 6 deletions test/jasmine/tests/gl_plot_interact_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -826,10 +826,10 @@ describe('Test gl2d plots', function() {
var _mock = Lib.extendDeep({}, mock);
var relayoutCallback = jasmine.createSpy('relayoutCallback');

var originalX = [-0.022068095838587643, 5.022068095838588];
var originalY = [-0.21331533513634046, 5.851205650049042];
var newX = [-0.23224043715846995, 4.811895754518705];
var newY = [-1.2962655110623016, 4.768255474123081];
var originalX = [-0.3037383177570093, 5.303738317757009];
var originalY = [-0.5532219548705213, 6.191112269783224];
var newX = [-0.5373831775700935, 5.070093457943925];
var newY = [-1.7575673521301187, 4.986766872523626];
var precision = 5;

Plotly.plot(gd, _mock)
Expand Down Expand Up @@ -1326,10 +1326,10 @@ describe('Test gl2d interactions', function() {
dragmode: 'pan'
})
.then(function() {
assertAnnotation([327, 325]);
assertAnnotation([327, 315]);

drag([250, 200], [200, 150]);
assertAnnotation([277, 275]);
assertAnnotation([277, 265]);

return Plotly.relayout(gd, {
'xaxis.range': [1.5, 2.5],
Expand Down