Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
merge master
  • Loading branch information
emilykl committed Oct 8, 2024
commit 8a0362dc77f4b1580e3a6fed5e8f40ede3e1c1cc
1 change: 1 addition & 0 deletions draftlogs/7213_remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Drop deprecated pointcloud and heatmapgl traces and gl2d subplots [[#7213](https://github.com/plotly/plotly.js/pull/7213)]
1 change: 1 addition & 0 deletions draftlogs/7214_remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop support for deprecated `bardir` attribute (use `orientation` instead) [[#7214](https://github.com/plotly/plotly.js/pull/7214)]
1 change: 1 addition & 0 deletions draftlogs/7215_remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop support for deprecated `annotation.ref` attribute (use `annotation.xref` and `annotation.yref` instead) [[#7215](https://github.com/plotly/plotly.js/pull/7215)]
1 change: 1 addition & 0 deletions draftlogs/7216_remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop support for deprecated error bar `opacity` attribute (use alpha channel of error bar `color` attribute instead) [[#7214](https://github.com/plotly/plotly.js/pull/7216)]
1 change: 1 addition & 0 deletions draftlogs/7217_remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop support for deprecated attribute `gl3d.cameraposition` (use `gl3d.camera` instead) [[#7217](https://github.com/plotly/plotly.js/pull/7217)]
3 changes: 0 additions & 3 deletions lib/heatmapgl.js

This file was deleted.

2 changes: 0 additions & 2 deletions lib/index-gl2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Plotly.register([
// traces
require('./scattergl'),
require('./splom'),
require('./pointcloud'),
require('./heatmapgl'),
require('./parcoords'),

// transforms
Expand Down
2 changes: 0 additions & 2 deletions lib/index-strict.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ Plotly.register([
require('./choropleth'),
require('../src/traces/scattergl/strict'),
require('../src/traces/splom/strict'),
require('./pointcloud'),
require('./heatmapgl'),
require('../src/traces/parcoords/strict'),
require('./parcats'),
require('./scattermapbox'),
Expand Down
2 changes: 0 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ Plotly.register([
require('./choropleth'),
require('./scattergl'),
require('./splom'),
require('./pointcloud'),
require('./heatmapgl'),
require('./parcoords'),
require('./parcats'),
require('./scattermapbox'),
Expand Down
3 changes: 0 additions & 3 deletions lib/pointcloud.js

This file was deleted.

10 changes: 0 additions & 10 deletions src/components/annotations/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,14 +487,4 @@ module.exports = templatedArray('annotation', {
].join(' ')
},
editType: 'calc',

_deprecated: {
ref: {
valType: 'string',
editType: 'calc',
description: [
'Obsolete. Set `xref` and `yref` separately instead.'
].join(' ')
}
}
});
13 changes: 1 addition & 12 deletions src/components/errorbars/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ module.exports = {
color: {
valType: 'color',
editType: 'style',
description: 'Sets the stoke color of the error bars.'
description: 'Sets the stroke color of the error bars.'
},
thickness: {
valType: 'number',
Expand All @@ -121,15 +121,4 @@ module.exports = {
].join(' ')
},
editType: 'calc',

_deprecated: {
opacity: {
valType: 'number',
editType: 'style',
description: [
'Obsolete.',
'Use the alpha channel in error bar `color` to set the opacity.'
].join(' ')
}
}
};
2 changes: 1 addition & 1 deletion src/components/fx/hover.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ exports.loneHover = function loneHover(hoverItems, opts) {
x1 += dx;
y0 += dy;
y1 += dy;
} // TODO: handle heatmapgl
}

eventData.bbox = {
x0: x0 + gLeft,
Expand Down
1 change: 0 additions & 1 deletion src/components/images/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ module.exports = function draw(gd) {
var subplotObj = fullLayout._plots[subplot];

// filter out overlaid plots (which have their images on the main plot)
// and gl2d plots (which don't support below images, at least not yet)
if(!subplotObj.imagelayer) continue;

var imagesOnSubplot = subplotObj.imagelayer.selectAll('image')
Expand Down
12 changes: 0 additions & 12 deletions src/components/modebar/buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,18 +559,6 @@ function handleGeo(gd, ev) {
}
}

modeBarButtons.hoverClosestGl2d = {
name: 'hoverClosestGl2d',
_cat: 'hoverclosest',
title: function(gd) { return _(gd, 'Toggle show closest data on hover'); },
attr: 'hovermode',
val: null,
toggle: true,
icon: Icons.tooltip_basic,
gravity: 'ne',
click: toggleHover
};

modeBarButtons.hoverClosestPie = {
name: 'hoverClosestPie',
_cat: 'hoverclosest',
Expand Down
11 changes: 3 additions & 8 deletions src/components/modebar/manage.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ function getButtonGroups(gd) {
var hasGeo = fullLayout._has('geo');
var hasPie = fullLayout._has('pie');
var hasFunnelarea = fullLayout._has('funnelarea');
var hasGL2D = fullLayout._has('gl2d');
var hasTernary = fullLayout._has('ternary');
var hasMapbox = fullLayout._has('mapbox');
var hasMap = fullLayout._has('map');
Expand Down Expand Up @@ -155,7 +154,7 @@ function getButtonGroups(gd) {
var resetGroup = [];
var dragModeGroup = [];

if((hasCartesian || hasGL2D || hasPie || hasFunnelarea || hasTernary) + hasGeo + hasGL3D + hasMapbox + hasMap + hasPolar + hasSmith > 1) {
if((hasCartesian || hasPie || hasFunnelarea || hasTernary) + hasGeo + hasGL3D + hasMapbox + hasMap + hasPolar + hasSmith > 1) {
// graphs with more than one plot types get 'union buttons'
// which reset the view or toggle hover labels across all subplots.
hoverGroup = ['toggleHover'];
Expand All @@ -175,8 +174,6 @@ function getButtonGroups(gd) {
zoomGroup = ['zoomInMap', 'zoomOutMap'];
hoverGroup = ['toggleHover'];
resetGroup = ['resetViewMap'];
} else if(hasGL2D) {
hoverGroup = ['hoverClosestGl2d'];
} else if(hasPie) {
hoverGroup = ['hoverClosestPie'];
} else if(hasSankey) {
Expand All @@ -196,14 +193,14 @@ function getButtonGroups(gd) {
hoverGroup = [];
}

if((hasCartesian || hasGL2D) && !allAxesFixed) {
if(hasCartesian && !allAxesFixed) {
zoomGroup = ['zoomIn2d', 'zoomOut2d', 'autoScale2d'];
if(resetGroup[0] !== 'resetViews') resetGroup = ['resetScale2d'];
}

if(hasGL3D) {
dragModeGroup = ['zoom3d', 'pan3d', 'orbitRotation', 'tableRotation'];
} else if(((hasCartesian || hasGL2D) && !allAxesFixed) || hasTernary) {
} else if((hasCartesian && !allAxesFixed) || hasTernary) {
dragModeGroup = ['zoom2d', 'pan2d'];
} else if(hasMapbox || hasMap || hasGeo) {
dragModeGroup = ['pan2d'];
Expand Down Expand Up @@ -248,14 +245,12 @@ function getButtonGroups(gd) {
enableHover('hoverClosestCartesian');
enableHover('hoverClosestGeo');
enableHover('hoverClosest3d');
enableHover('hoverClosestGl2d');
enableHover('hoverClosestPie');
} else if(b === 'v1hovermode') {
enableHover('hoverClosestCartesian');
enableHover('hoverCompareCartesian');
enableHover('hoverClosestGeo');
enableHover('hoverClosest3d');
enableHover('hoverClosestGl2d');
enableHover('hoverClosestPie');
}
} else newList.push(b);
Expand Down
18 changes: 8 additions & 10 deletions src/components/rangeslider/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@ exports.makeData = function(fullLayout) {
var margin = fullLayout.margin;
var rangeSliderData = [];

if(!fullLayout._has('gl2d')) {
for(var i = 0; i < axes.length; i++) {
var ax = axes[i];
for(var i = 0; i < axes.length; i++) {
var ax = axes[i];

if(isVisible(ax)) {
rangeSliderData.push(ax);
if(isVisible(ax)) {
rangeSliderData.push(ax);

var opts = ax[name];
opts._id = name + ax._id;
opts._height = (fullLayout.height - margin.b - margin.t) * opts.thickness;
opts._offsetShift = Math.floor(opts.borderwidth / 2);
}
var opts = ax[name];
opts._id = name + ax._id;
opts._height = (fullLayout.height - margin.b - margin.t) * opts.thickness;
opts._offsetShift = Math.floor(opts.borderwidth / 2);
}
}

Expand Down
61 changes: 0 additions & 61 deletions src/plot_api/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,33 +90,6 @@ exports.cleanLayout = function(layout) {
delete ax.autotick;
}

} else if(sceneAttrRegex && sceneAttrRegex.test(key)) {
// modifications for 3D scenes

var scene = layout[key];

// clean old Camera coords
var cameraposition = scene.cameraposition;

if(Array.isArray(cameraposition) && cameraposition[0].length === 4) {
var rotation = cameraposition[0];
var center = cameraposition[1];
var radius = cameraposition[2];
var mat = m4FromQuat([], rotation);
var eye = [];

for(j = 0; j < 3; ++j) {
eye[j] = center[j] + radius * mat[2 + 4 * j];
}

scene.camera = {
eye: {x: eye[0], y: eye[1], z: eye[2]},
center: {x: center[0], y: center[1], z: center[2]},
up: {x: 0, y: 0, z: 1} // we just ignore calculating camera z up in this case
};

delete scene.cameraposition;
}
}
}

Expand All @@ -126,17 +99,6 @@ exports.cleanLayout = function(layout) {

if(!Lib.isPlainObject(ann)) continue;

if(ann.ref) {
if(ann.ref === 'paper') {
ann.xref = 'paper';
ann.yref = 'paper';
} else if(ann.ref === 'data') {
ann.xref = 'x';
ann.yref = 'y';
}
delete ann.ref;
}

cleanAxRef(ann, 'xref');
cleanAxRef(ann, 'yref');
}
Expand Down Expand Up @@ -224,29 +186,6 @@ exports.cleanData = function(data) {
delete trace.xbins;
}

// error_y.opacity is obsolete - merge into color
if(trace.error_y && 'opacity' in trace.error_y) {
var dc = Color.defaults;
var yeColor = trace.error_y.color || (traceIs(trace, 'bar') ?
Color.defaultLine :
dc[tracei % dc.length]);
trace.error_y.color = Color.addOpacity(
Color.rgb(yeColor),
Color.opacity(yeColor) * trace.error_y.opacity);
delete trace.error_y.opacity;
}

// convert bardir to orientation, and put the data into
// the axes it's eventually going to be used with
if('bardir' in trace) {
if(trace.bardir === 'h' && (traceIs(trace, 'bar') ||
trace.type.substr(0, 9) === 'histogram')) {
trace.orientation = 'h';
exports.swapXYData(trace);
}
delete trace.bardir;
}

// now we have only one 1D histogram type, and whether
// it uses x or y data depends on trace.orientation
if(trace.type === 'histogramy') exports.swapXYData(trace);
Expand Down
2 changes: 0 additions & 2 deletions src/plot_api/plot_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2145,8 +2145,6 @@ function _relayout(gd, aobj) {
!(vOld === 'lasso' || vOld === 'select'))
) {
flags.plot = true;
} else if(fullLayout._has('gl2d')) {
flags.plot = true;
} else if(valObject) editTypes.update(flags, valObject);
else flags.calc = true;

Expand Down
3 changes: 1 addition & 2 deletions src/plot_api/plot_schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,15 +324,14 @@ function layoutHeadAttr(fullLayout, head) {
_module = basePlotModules[i];
if(_module.attrRegex && _module.attrRegex.test(head)) {
// if a module defines overrides, these take precedence
// initially this is to allow gl2d different editTypes from svg cartesian
// this is to allow different editTypes from svg cartesian
if(_module.layoutAttrOverrides) return _module.layoutAttrOverrides;

// otherwise take the first attributes we find
if(!out && _module.layoutAttributes) out = _module.layoutAttributes;
}

// a module can also override the behavior of base (and component) module layout attrs
// again see gl2d for initial use case
var baseOverrides = _module.baseLayoutAttrOverrides;
if(baseOverrides && head in baseOverrides) return baseOverrides[head];
}
Expand Down
4 changes: 1 addition & 3 deletions src/plot_api/subroutines.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ function lsInner(gd) {
exports.drawMainTitle(gd);
ModeBar.manage(gd);

// _has('cartesian') means SVG specifically, not GL2D - but GL2D
// can still get here because it makes some of the SVG structure
// for shared features like selections.
// _has('cartesian') means SVG specifically
if(!fullLayout._has('cartesian')) {
return Plots.previousPromises(gd);
}
Expand Down
4 changes: 2 additions & 2 deletions src/plots/cartesian/include_components.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = function makeIncludeComponents(containerArrayName) {
var xaList = subplots.xaxis;
var yaList = subplots.yaxis;
var cartesianList = subplots.cartesian;
var hasCartesianOrGL2D = layoutOut._has('cartesian') || layoutOut._has('gl2d');
var hasCartesian = layoutOut._has('cartesian');

for(var i = 0; i < array.length; i++) {
var itemi = array[i];
Expand All @@ -40,7 +40,7 @@ module.exports = function makeIncludeComponents(containerArrayName) {
var hasXref = idRegex.x.test(xref);
var hasYref = idRegex.y.test(yref);
if(hasXref || hasYref) {
if(!hasCartesianOrGL2D) Lib.pushUnique(layoutOut._basePlotModules, Cartesian);
if(!hasCartesian) Lib.pushUnique(layoutOut._basePlotModules, Cartesian);

var newAxis = false;
if(hasXref && xaList.indexOf(xref) === -1) {
Expand Down
2 changes: 1 addition & 1 deletion src/plots/cartesian/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exports.finalizeSubplots = function(layoutIn, layoutOut) {
var xList = subplots.xaxis;
var yList = subplots.yaxis;
var spSVG = subplots.cartesian;
var spAll = spSVG.concat(subplots.gl2d || []);
var spAll = spSVG;
var allX = {};
var allY = {};
var i, xi, yi;
Expand Down
2 changes: 1 addition & 1 deletion src/plots/cartesian/layout_defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
// look for axes in the data
for(i = 0; i < fullData.length; i++) {
var trace = fullData[i];
if(!traceIs(trace, 'cartesian') && !traceIs(trace, 'gl2d')) continue;
if(!traceIs(trace, 'cartesian')) continue;

var xaName;
if(trace.xaxis) {
Expand Down
14 changes: 1 addition & 13 deletions src/plots/get_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,10 @@ exports.getSubplotData = function getSubplotData(data, type, subplotId) {
var subplotData = [];
var trace, subplotX, subplotY;

if(type === 'gl2d') {
var spmatch = subplotId.match(SUBPLOT_PATTERN);
subplotX = 'x' + spmatch[1];
subplotY = 'y' + spmatch[2];
}

for(var i = 0; i < data.length; i++) {
trace = data[i];

if(type === 'gl2d' && Registry.traceIs(trace, 'gl2d')) {
if(trace[attr[0]] === subplotX && trace[attr[1]] === subplotY) {
subplotData.push(trace);
}
} else {
if(trace[attr] === subplotId) subplotData.push(trace);
}
if(trace[attr] === subplotId) subplotData.push(trace);
}

return subplotData;
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.