Skip to content

Commit da9e43e

Browse files
authored
Merge pull request #7513 from Lexachoc/fix_title_text_edit_regression_v3.0.0
fix: title text cannot be edited for multiple plots/components (regression since v3.0.0)
2 parents 5ebf07e + 59be210 commit da9e43e

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

draftlogs/7513_fix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix editable `title.text` for `ternary`, `polar`, `colorbar`, and `rangeslider` (regression introduced in 3.0.0) [[#7513](https://github.com/plotly/plotly.js/pull/7513)]

src/components/colorbar/draw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ function drawColorBar(g, opts, gd) {
326326
function drawTitle(titleClass, titleOpts) {
327327
var dfltTitleOpts = {
328328
propContainer: ax,
329-
propName: opts._propPrefix + 'title',
329+
propName: opts._propPrefix + 'title.text',
330330
traceIndex: opts._traceIndex,
331331
_meta: opts._meta,
332332
placeholder: fullLayout._dfltTitle.colorbar,

src/components/rangeslider/draw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ module.exports = function(gd) {
212212
if(axisOpts.side === 'bottom') {
213213
Titles.draw(gd, axisOpts._id + 'title', {
214214
propContainer: axisOpts,
215-
propName: axisOpts._name + '.title',
215+
propName: axisOpts._name + '.title.text',
216216
placeholder: fullLayout._dfltTitle.x,
217217
attributes: {
218218
x: axisOpts._offset + axisOpts._length / 2,

src/plots/polar/polar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ proto.updateRadialAxisTitle = function(fullLayout, polarLayout, _angle) {
589589

590590
_this.layers['radial-axis-title'] = Titles.draw(gd, titleClass, {
591591
propContainer: radialLayout,
592-
propName: _this.id + '.radialaxis.title',
592+
propName: _this.id + '.radialaxis.title.text',
593593
placeholder: _(gd, 'Click to enter radial axis title'),
594594
attributes: {
595595
x: x,

src/plots/ternary/ternary.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ proto.drawAxes = function(doTitles) {
375375

376376
layers['a-title'] = Titles.draw(gd, 'a' + titlesuffix, {
377377
propContainer: aaxis,
378-
propName: _this.id + '.aaxis.title',
378+
propName: _this.id + '.aaxis.title.text',
379379
placeholder: _(gd, 'Click to enter Component A title'),
380380
attributes: {
381381
x: _this.x0 + _this.w / 2,
@@ -385,7 +385,7 @@ proto.drawAxes = function(doTitles) {
385385
});
386386
layers['b-title'] = Titles.draw(gd, 'b' + titlesuffix, {
387387
propContainer: baxis,
388-
propName: _this.id + '.baxis.title',
388+
propName: _this.id + '.baxis.title.text',
389389
placeholder: _(gd, 'Click to enter Component B title'),
390390
attributes: {
391391
x: _this.x0 - bpad,
@@ -395,7 +395,7 @@ proto.drawAxes = function(doTitles) {
395395
});
396396
layers['c-title'] = Titles.draw(gd, 'c' + titlesuffix, {
397397
propContainer: caxis,
398-
propName: _this.id + '.caxis.title',
398+
propName: _this.id + '.caxis.title.text',
399399
placeholder: _(gd, 'Click to enter Component C title'),
400400
attributes: {
401401
x: _this.x0 + _this.w + bpad,

test/jasmine/tests/transition_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ describe('Plotly.react transitions:', function() {
648648
layout.xaxis.range = [-1, 1];
649649
return Plotly.react(gd, data, layout);
650650
})
651-
.then(delay(50))
651+
.then(delay(100))
652652
.then(function() {
653653
assertSpies('both trace and layout transitions', [
654654
[Plots, 'transitionFromReact', 1],

0 commit comments

Comments
 (0)