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

Skip to content

Commit 6d8583e

Browse files
committed
sub hasCartesian -> has('cartesian')
1 parent 6a67366 commit 6d8583e

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/components/modebar/buttons.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ function handleCartesian(gd, ev) {
256256

257257
Plotly.relayout(gd, aobj).then(function() {
258258
if(astr === 'dragmode') {
259-
if(fullLayout._hasCartesian) {
259+
if(fullLayout._has('cartesian')) {
260260
setCursor(
261261
fullLayout._paper.select('.nsewdrag'),
262262
DRAGCURSORS[val]
@@ -500,7 +500,7 @@ function toggleHover(gd) {
500500
var fullLayout = gd._fullLayout;
501501

502502
var onHoverVal;
503-
if(fullLayout._hasCartesian) {
503+
if(fullLayout._has('cartesian')) {
504504
onHoverVal = fullLayout._isHoriz ? 'y' : 'x';
505505
}
506506
else onHoverVal = 'closest';

src/plot_api/plot_api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2642,7 +2642,7 @@ function makePlotFramework(gd) {
26422642
makeSubplots(gd, subplots);
26432643
}
26442644

2645-
if(fullLayout._hasCartesian) makeCartesianPlotFramwork(gd, subplots);
2645+
if(fullLayout._has('cartesian')) makeCartesianPlotFramwork(gd, subplots);
26462646

26472647
// single ternary layer for the whole plot
26482648
fullLayout._ternarylayer = fullLayout._paper.append('g').classed('ternarylayer', true);

src/plots/cartesian/axes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1797,7 +1797,7 @@ axes.doTicks = function(gd, axid, skipTitle) {
17971797
var alldone = axes.getSubplots(gd, ax).map(function(subplot) {
17981798
var plotinfo = fullLayout._plots[subplot];
17991799

1800-
if(!fullLayout._hasCartesian) return;
1800+
if(!fullLayout._has('cartesian')) return;
18011801

18021802
var container = plotinfo[axletter + 'axislayer'],
18031803

src/plots/cartesian/graph_interact.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fx.supplyLayoutDefaults = function(layoutIn, layoutOut, fullData) {
6060
coerce('dragmode');
6161

6262
var hovermodeDflt;
63-
if(layoutOut._hasCartesian) {
63+
if(layoutOut._has('cartesian')) {
6464
// flag for 'horizontal' plots:
6565
// determines the state of the mode bar 'compare' hovermode button
6666
var isHoriz = layoutOut._isHoriz = fx.isHoriz(fullData);
@@ -89,7 +89,7 @@ fx.isHoriz = function(fullData) {
8989
fx.init = function(gd) {
9090
var fullLayout = gd._fullLayout;
9191

92-
if(!fullLayout._hasCartesian || gd._context.staticPlot) return;
92+
if(!fullLayout._has('cartesian') || gd._context.staticPlot) return;
9393

9494
var subplots = Object.keys(fullLayout._plots || {}).sort(function(a,b) {
9595
// sort overlays last, then by x axis number, then y axis number
@@ -107,7 +107,7 @@ fx.init = function(gd) {
107107
subplots.forEach(function(subplot) {
108108
var plotinfo = fullLayout._plots[subplot];
109109

110-
if(!fullLayout._hasCartesian) return;
110+
if(!fullLayout._has('cartesian')) return;
111111

112112
var xa = plotinfo.x(),
113113
ya = plotinfo.y(),

0 commit comments

Comments
 (0)