8000 Merging #2860 to master by etpinard · Pull Request #2865 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Merging #2860 to master #2865

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 22 commits into from
Aug 2, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
69dc0c4
DRY and small pref boost for scattergl
etpinard Jul 31, 2018
41ad08a
push trace module into fullLayout._modules even if visible:false
etpinard Jul 23, 2018
9c8ba02
fill in list of visible:true module in fullLayout._visibleModules
etpinard Jul 23, 2018
8ef5cb3
fix and :lock: splom trace visible toggling
etpinard Jul 23, 2018
cf0b19d
sub fail -> failTest
etpinard Jul 26, 2018
9cc5fbe
add scatter visibility restyles tests
etpinard Jul 25, 2018
dfada6a
add bar autorange tests & move 'b' init to setPositions
etpinard Jul 26, 2018
be44366
add findExtremes
etpinard Jul 25, 2018
ad1ac1f
adapt getAutoRange and doAutoRange to trace _extremes
etpinard Jul 25, 2018
769c160
fill trace._extremes with findExtremes in calc
etpinard Jul 25, 2018
736ab69
replace Axex.expand -> findExtremes in annotations and shapes
etpinard Jul 25, 2018
6194457
:hocho: ax._min / ax._max logic for rangeslider
etpinard Jul 25, 2018
8cd06ae
adapt enforceConstraints to new per trace/item _extremes
etpinard Jul 25, 2018
2a745de
adapt polar to new per trace/item _extremes
etpinard Jul 25, 2018
82d4bcc
adapt gl2d to findExtremes
etpinard Jul 26, 2018
29db388
:hocho: Axes.expand & adapt test for findExtremes
etpinard Jul 26, 2018
72f06a6
improve concatExtremes perf
etpinard Jul 27, 2018
a0bfaf3
collapse trace extremes before getAutorange
etpinard Jul 30, 2018
33b4085
mv repeat -> Lib.repeat
etpinard Aug 1, 2018
d233f3b
fix and :lock: _extremes in polar tranformed traces
etpinard Aug 1, 2018
89aebd1
fix typos in :books:
etpinard Aug 1, 2018
20db59a
Merge pull request #2860 from plotly/per-trace-ax-extremes-maintenance
etpinard Aug 2, 2018
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
mv repeat -> Lib.repeat
  • Loading branch information
etpinard committed Aug 1, 2018
commit 33b4085010209af0f37b8a2ca538115be76bfc84
15 changes: 15 additions & 0 deletions src/lib/index.js
8000
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,21 @@ lib.isIndex = function(v, len) {
lib.noop = require('./noop');
lib.identity = require('./identity');

/**
* create an array of length 'cnt' filled with 'v' at all indices
*
* @param {any} v
* @param {number} cnt
* @return {array}
*/
lib.repeat = function(v, cnt) {
var out = new Array(cnt);
for(var i = 0; i < cnt; i++) {
out[i] = v;
}
return out;
};

/**
* swap x and y of the same attribute in container cont
* specify attr with a ? in place of x/y
Expand Down
12 changes: 2 additions & 10 deletions src/traces/scattergl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function sceneUpdate(gd, subplot) {

// apply new option to all regl components (used on drag)
scene.update = function update(opt) {
var opts = repeat(opt, scene.count);
var opts = Lib.repeat(opt, scene.count);

if(scene.fill2d) scene.fill2d.update(opts);
if(scene.scatter2d) scene.scatter2d.update(opts);
Expand Down Expand Up @@ -366,14 +366,6 @@ function clearViewport(comp, vp) {
gl.clear(gl.COLOR_BUFFER_BIT);
}

function repeat(opt, cnt) {
var opts = new Array(cnt);
for(var i = 0; i < cnt; i++) {
opts[i] = opt;
}
return opts;
}

function plot(gd, subplot, cdata) {
if(!cdata.length) return;

Expand Down Expand Up @@ -619,7 +611,7 @@ function plot(gd, subplot, cdata) {
(yaxis._rl || yaxis.range)[1]
]
};
var vpRange = repeat(vpRange0, scene.count);
var vpRange = Lib.repeat(vpRange0, scene.count);

// upload viewport/range data to GPU
if(scene.fill2d) {
Expand Down
0