Skip to content

Commit

Permalink
[ATPWM-1192] Date axis: clicking near start or end of axis, renders a…
Browse files Browse the repository at this point in the history
… date time wrongly editable.
  • Loading branch information
michelezanda committed Jun 22, 2018
1 parent 65b12e5 commit 0e8c2a1
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG_ION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# plotly.js ION changelog

## [1.33.1-ion13] -- 2018-06-21
## [1.33.1-ion14] -- 2018-06-22

### [ATPWM-1192] Date axis: clicking near start or end of axis, renders a date time wrongly editable.

Expand Down
40 changes: 20 additions & 20 deletions dist_ion/plotly-ion.js
Original file line number Diff line number Diff line change
Expand Up @@ -32817,7 +32817,7 @@ exports.svgAttrs = {
var Plotly = require('./plotly');

// package version injected by `npm run preprocess`
exports.version = '1.33.1-ion13';
exports.version = '1.33.1-ion14';

// inject promise polyfill
require('es6-promise').polyfill();
Expand Down Expand Up @@ -42572,7 +42572,7 @@ module.exports = {
* enable direct range entry at the pan/zoom drag points
* (drag handles must be enabled above)
*/
showAxisRangeEntryBoxes: true,
showAxisRangeEntryBoxes: false,

// link to open this plot in plotly
showLink: false,
Expand Down Expand Up @@ -48591,24 +48591,24 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
}
else if(ew === 'e') hAlign = 'right';

// if(gd._context.showAxisRangeEntryBoxes) {
// d3.select(dragger)
// .call(svgTextUtils.makeEditable, {
// gd: gd,
// immediate: true,
// background: fullLayout.paper_bgcolor,
// text: String(initialText),
// fill: ax.tickfont ? ax.tickfont.color : '#444',
// horizontalAlign: hAlign,
// verticalAlign: vAlign
// })
// .on('edit', function(text) {
// var v = ax.d2r(text);
// if(v !== undefined) {
// Plotly.relayout(gd, attrStr, v);
// }
// });
// }
if(gd._context.showAxisRangeEntryBoxes) {
d3.select(dragger)
.call(svgTextUtils.makeEditable, {
gd: gd,
immediate: true,
background: fullLayout.paper_bgcolor,
text: String(initialText),
fill: ax.tickfont ? ax.tickfont.color : '#444',
horizontalAlign: hAlign,
verticalAlign: vAlign
})
.on('edit', function(text) {
var v = ax.d2r(text);
if(v !== undefined) {
Plotly.relayout(gd, attrStr, v);
}
});
}
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion dist_ion/plotly-ion.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plotly.js",
"version": "1.33.1-ion13",
"version": "1.33.1-ion14",
"description": "The open source javascript graphing library that powers plotly",
"license": "MIT",
"main": "./lib/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/geo_assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ var saneTopojson = require('sane-topojson');


// package version injected by `npm run preprocess`
exports.version = '1.33.1-ion13';exports.topojson = saneTopojson;
exports.version = '1.33.1-ion14';exports.topojson = saneTopojson;
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
var Plotly = require('./plotly');

// package version injected by `npm run preprocess`
exports.version = '1.33.1-ion13';
exports.version = '1.33.1-ion14';

// inject promise polyfill
require('es6-promise').polyfill();
Expand Down
2 changes: 1 addition & 1 deletion src/plot_api/plot_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module.exports = {
* enable direct range entry at the pan/zoom drag points
* (drag handles must be enabled above)
*/
showAxisRangeEntryBoxes: true,
showAxisRangeEntryBoxes: false,

// link to open this plot in plotly
showLink: false,
Expand Down
36 changes: 18 additions & 18 deletions src/plots/cartesian/dragbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,24 +199,24 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
}
else if(ew === 'e') hAlign = 'right';

// if(gd._context.showAxisRangeEntryBoxes) {
// d3.select(dragger)
// .call(svgTextUtils.makeEditable, {
// gd: gd,
// immediate: true,
// background: fullLayout.paper_bgcolor,
// text: String(initialText),
// fill: ax.tickfont ? ax.tickfont.color : '#444',
// horizontalAlign: hAlign,
// verticalAlign: vAlign
// })
// .on('edit', function(text) {
// var v = ax.d2r(text);
// if(v !== undefined) {
// Plotly.relayout(gd, attrStr, v);
// }
// });
// }
if(gd._context.showAxisRangeEntryBoxes) {
d3.select(dragger)
.call(svgTextUtils.makeEditable, {
gd: gd,
immediate: true,
background: fullLayout.paper_bgcolor,
text: String(initialText),
fill: ax.tickfont ? ax.tickfont.color : '#444',
horizontalAlign: hAlign,
verticalAlign: vAlign
})
.on('edit', function(text) {
var v = ax.d2r(text);
if(v !== undefined) {
Plotly.relayout(gd, attrStr, v);
}
});
}
}
}
};
Expand Down

0 comments on commit 0e8c2a1

Please sign in to comment.