plotly.js 3.0.0-rc.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -4
- package/CITATION.cff +2 -2
- package/README.md +3 -3
- package/dist/README.md +18 -18
- package/dist/plotly-basic.js +11 -8
- package/dist/plotly-basic.min.js +5 -5
- package/dist/plotly-cartesian.js +11 -8
- package/dist/plotly-cartesian.min.js +5 -5
- package/dist/plotly-finance.js +11 -8
- package/dist/plotly-finance.min.js +5 -5
- package/dist/plotly-geo-assets.js +3 -3
- package/dist/plotly-geo.js +11 -8
- package/dist/plotly-geo.min.js +5 -5
- package/dist/plotly-gl2d.js +11 -8
- package/dist/plotly-gl2d.min.js +5 -5
- package/dist/plotly-gl3d.js +11 -8
- package/dist/plotly-gl3d.min.js +5 -5
- package/dist/plotly-mapbox.js +11 -8
- package/dist/plotly-mapbox.min.js +5 -5
- package/dist/plotly-strict.js +11 -8
- package/dist/plotly-strict.min.js +5 -5
- package/dist/plotly-with-meta.js +11 -8
- package/dist/plotly.js +11 -8
- package/dist/plotly.min.js +5 -5
- package/dist/translation-keys.txt +1 -1
- package/package.json +1 -1
- package/src/components/modebar/modebar.js +4 -3
- package/src/lib/dom.js +5 -3
- package/src/version.js +1 -1
|
@@ -24,7 +24,7 @@ Erase active shape // components/modebar/but
|
|
|
24
24
|
Lasso Select // components/modebar/buttons.js:121
|
|
25
25
|
Orbital rotation // components/modebar/buttons.js:341
|
|
26
26
|
Pan // components/modebar/buttons.js:101
|
|
27
|
-
Produced with Plotly.js // components/modebar/modebar.js:
|
|
27
|
+
Produced with Plotly.js // components/modebar/modebar.js:324
|
|
28
28
|
Reset // components/modebar/buttons.js:514
|
|
29
29
|
Reset axes // components/modebar/buttons.js:213
|
|
30
30
|
Reset camera to default // components/modebar/buttons.js:380
|
package/package.json
CHANGED
|
@@ -60,9 +60,6 @@ proto.update = function(graphInfo, buttons) {
|
|
|
60
60
|
document.querySelectorAll(groupSelector).forEach(function(group) {
|
|
61
61
|
group.style.backgroundColor = style.bgcolor;
|
|
62
62
|
});
|
|
63
|
-
// set styles on hover using event listeners instead of inline CSS that's not allowed by strict CSP's
|
|
64
|
-
Lib.setStyleOnHover('#' + modeBarId + ' .modebar-btn', '.active', '.icon path', 'fill: ' + style.activecolor, 'fill: ' + style.color);
|
|
65
|
-
|
|
66
63
|
// if buttons or logo have changed, redraw modebar interior
|
|
67
64
|
var needsNewButtons = !this.hasButtons(buttons);
|
|
68
65
|
var needsNewLogo = (this.hasLogo !== context.displaylogo);
|
|
@@ -92,6 +89,10 @@ proto.update = function(graphInfo, buttons) {
|
|
|
92
89
|
}
|
|
93
90
|
|
|
94
91
|
this.updateActiveButton();
|
|
92
|
+
|
|
93
|
+
// set styles on hover using event listeners instead of inline CSS that's not allowed by strict CSP's
|
|
94
|
+
Lib.setStyleOnHover('#' + modeBarId + ' .modebar-btn', '.active', '.icon path', 'fill: ' + style.activecolor, 'fill: ' + style.color, this.element);
|
|
95
|
+
|
|
95
96
|
};
|
|
96
97
|
|
|
97
98
|
proto.updateButtons = function(buttons) {
|
package/src/lib/dom.js
CHANGED
|
@@ -101,12 +101,14 @@ function deleteRelatedStyleRule(uid) {
|
|
|
101
101
|
* @param {string} activeStyle style that has to be applied when 'hovered' or 'active'
|
|
102
102
|
* @param {string} inactiveStyle style that has to be applied when not 'hovered' nor 'active'
|
|
103
103
|
*/
|
|
104
|
-
function setStyleOnHover(selector, activeSelector, childSelector, activeStyle, inactiveStyle) {
|
|
104
|
+
function setStyleOnHover(selector, activeSelector, childSelector, activeStyle, inactiveStyle, element) {
|
|
105
105
|
var activeStyleParts = activeStyle.split(':');
|
|
106
106
|
var inactiveStyleParts = inactiveStyle.split(':');
|
|
107
107
|
var eventAddedAttrName = 'data-btn-style-event-added';
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
if (!element) {
|
|
109
|
+
element = document;
|
|
110
|
+
}
|
|
111
|
+
element.querySelectorAll(selector).forEach(function(el) {
|
|
110
112
|
if(!el.getAttribute(eventAddedAttrName)) {
|
|
111
113
|
// Emulate ":hover" CSS style using JS event handlers to set the
|
|
112
114
|
// style in a strict CSP-compliant manner.
|
package/src/version.js
CHANGED