Skip to content
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

Implement ticklabelposition for cartesian subplots and colorbars #5275

Merged
merged 52 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
4da7e58
declare calcBreaksLength once
archmoj Nov 9, 2020
3ea0bb7
refactor inside and outside ticks
archmoj Nov 9, 2020
c7a23b4
fix issue 5262
archmoj Nov 12, 2020
a9d9140
rename axes.makeTransFn to makeTransTickFn
archmoj Nov 5, 2020
ee2d648
rename transFn function in cartesian axes
archmoj Nov 5, 2020
fa07cc5
create makeTransTickLabelFn and handle period case inside it
archmoj Nov 5, 2020
9e63c04
implement ticklabelposition for cartesian axes
archmoj Nov 13, 2020
7a6fd0f
add image tests
archmoj Nov 13, 2020
c262d4b
store and use ticklabel bounding boxes to increase pad for inside labels
archmoj Nov 18, 2020
74f594d
autorange call to account extra pad for inside tick labels
archmoj Nov 18, 2020
5ca95d3
save initial ranges after insideticklabel is done
archmoj Nov 19, 2020
8a34a95
better fit based on tick angle - increase pad only when text does not…
archmoj Nov 19, 2020
22e9519
ensure plotinfo in axes redraw
archmoj Nov 19, 2020
95751cb
reset autorange flag for inside tick labels during GUI edits
archmoj Nov 19, 2020
ab37122
fixup interactions
archmoj Nov 19, 2020
432e448
Merge remote-tracking branch 'origin/master' into ticklabelposition
archmoj Nov 21, 2020
e840f8f
update attribute description
archmoj Nov 23, 2020
2361958
revise ticklabelposition supply defaults
archmoj Nov 23, 2020
91ea2f6
validate new scaleanchor matches mocks
archmoj Nov 23, 2020
47c5773
hide out of range inside text labels during redraws
archmoj Nov 23, 2020
591b321
adjust padding for inside tick labels
archmoj Nov 23, 2020
bd379f8
improve overlap detection for aligned tick labels
archmoj Nov 23, 2020
05893b3
use lib function to convert from deg to rad
archmoj Nov 24, 2020
b5f09fb
revisit ticklabelposition logic
archmoj Nov 24, 2020
6e80dc9
fix issue 5301
archmoj Nov 24, 2020
21b59e4
fixups u and v
archmoj Nov 24, 2020
e01dc32
correct linewidth effect
archmoj Nov 24, 2020
b46327c
fixup tickangle for inside tick labels
archmoj Nov 25, 2020
aa57518
handle multi-line dates on x-axis
archmoj Nov 25, 2020
70e708a
adjust pad for inside labels and make more room for end labels to appear
archmoj Nov 25, 2020
fa0f3b2
validate new mocks
archmoj Nov 25, 2020
c87cda6
add jsamine tests for ticklabelposition defaults
archmoj Nov 25, 2020
c59fcd9
clear function to hide inside tick labels and ensure subplot
archmoj Nov 25, 2020
d2c656d
simplify reading axis end positions to hide inside tick labels
archmoj Nov 25, 2020
d7423af
ensure ax._rl in hide function
archmoj Nov 25, 2020
60addca
compute linear range if not defined
archmoj Nov 26, 2020
a83d5af
add ticklabelposition option to colorbar
archmoj Nov 26, 2020
01efcf5
add inside and outside ticklabelposition options to mocks
archmoj Nov 26, 2020
5244a09
use fresh linear range in the hide function
archmoj Nov 26, 2020
a7518ec
add image test for issue 5301 - and before fixing another bug on the …
archmoj Nov 26, 2020
8efa7bd
adjust vertical ticklabels on x axes
archmoj Nov 26, 2020
2ff6cfb
revisit positioning of inside tick labels after bug fix
archmoj Nov 26, 2020
2108c8d
test another angle on the mock
archmoj Nov 26, 2020
a1d021b
adjustment for vertical tick labels inside
archmoj Nov 26, 2020
6f575a3
adjustment for vertical labels on the x axis and update baselines
archmoj Nov 26, 2020
0e52adb
remove duplicate pad functions
archmoj Dec 1, 2020
999f877
revert guiEdit and fixup autorange interactions for inside tick labels
archmoj Dec 1, 2020
7b22175
revise axId scope
archmoj Dec 2, 2020
445eee4
fixup autorange on interactions
archmoj Dec 2, 2020
5f252f5
consider some offset from top of the bounding box when hiding a horiz…
archmoj Dec 2, 2020
90c3097
adjust position on bar_multiline_labels mock
archmoj Dec 2, 2020
40c09b7
add comment about U and V
archmoj Dec 2, 2020
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
revert guiEdit and fixup autorange interactions for inside tick labels
  • Loading branch information
archmoj committed Dec 1, 2020
commit 999f87776ba5a0ede3a980c821c7430594b50c52
4 changes: 1 addition & 3 deletions src/plot_api/plot_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,8 @@ function insideTickLabelsAutorange(gd) {
var obj = gd._fullLayout._insideTickLabelsAutorange;
if(!obj) return;

relayout(gd, obj);
gd._fullLayout._insideTickLabelsAutorangeDone = true;
return relayout(gd, obj);
}

function emitAfterPlot(gd) {
Expand Down Expand Up @@ -2448,8 +2448,6 @@ function update(gd, traceUpdate, layoutUpdate, _traces) {
*/
function guiEdit(func) {
return function wrappedEdit(gd) {
gd._fullLayout._insideTickLabelsAutorangeDone = false;

gd._fullLayout._guiEditing = true;
var p = func.apply(null, arguments);
gd._fullLayout._guiEditing = false;
Expand Down
8 changes: 8 additions & 0 deletions src/plot_api/subroutines.js
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,14 @@ exports.doAutoRangeAndConstraints = function(gd) {

for(var i = 0; i < axList.length; i++) {
ax = axList[i];

if(
gd._fullLayout._insideTickLabelsAutorangeDone &&
((ax._anchorAxis || {}).ticklabelposition || '').indexOf('inside') !== -1
) {
continue;
}

if(!autoRangeDone[ax._id]) {
autoRangeDone[ax._id] = 1;
cleanAxisConstraints(gd, ax);
Expand Down