Skip to content

Commit 3a2bb92

Browse files
committed
fix plotly global CSS issues, see plotly/plotly.js#1433
1 parent 0957b98 commit 3a2bb92

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

plotly/ccm.plotly.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* recommended used framework version
2828
* @type {string}
2929
*/
30-
// ccm: 'https://ccmjs.github.io/ccm/versions/ccm-18.0.4.min.js',
30+
// ccm: 'https://ccmjs.github.io/ccm/versions/ccm-18.0.5.min.js',
3131
ccm: 'https://ccmjs.github.io/ccm/ccm.js',
3232

3333
/**
@@ -38,7 +38,7 @@
3838

3939
html: {
4040
main: {
41-
style: "width:600px;height:400px;"
41+
style: "width:600px;height:350px;"
4242
}
4343
},
4444

@@ -54,9 +54,9 @@
5454

5555
plot_config: {},
5656

57-
plotly_lib: [ 'ccm.load', 'https://cdn.plot.ly/plotly-latest.min.js' ]
57+
plotly_lib: [ 'ccm.load', 'https://cdn.plot.ly/plotly-latest.min.js' ],
5858

59-
// css: [ 'ccm.load', 'resources/default.css' ],
59+
css: [ 'ccm.load', 'resources/default.css' ],
6060
// css: [ 'ccm.load', 'https://ccmjs.github.io/mkaul-components/plotly/resources/default.css' ],
6161
// onfinish: function( instance, results ){ console.log( results ); }
6262
},

plotly/resources/default.css

+8
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,12 @@
55
*/
66
#element {
77
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
8+
}
9+
10+
/* plotly require those class to render correctly */
11+
.js-plotly-plot .plotly .main-svg {
12+
position: absolute;
13+
top: 0;
14+
left: 0;
15+
pointer-events: none;
816
}

plotly/test.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta name="author" content="Manfred Kaul <[email protected]> 2018">
55
<meta name="license" content="The MIT License (MIT)">
66

7-
<script src="https://ccmjs.github.io/ccm/versions/ccm-18.0.4.min.js"></script>
7+
<script src="https://ccmjs.github.io/ccm/versions/ccm-18.0.5.min.js"></script>
88
<script>ccm.components.testsuite = { ccm: 'https://ccmjs.github.io/ccm/ccm.js' };</script>
99
<script src="https://ccmjs.github.io/akless-components/testsuite/versions/ccm.testsuite-1.0.0.js"></script>
1010
<ccm-testsuite-1-0-0>

plotly/versions/ccm.plotly-1.0.0.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* recommended used framework version
2929
* @type {string}
3030
*/
31-
ccm: 'https://ccmjs.github.io/ccm/versions/ccm-18.0.4.min.js',
31+
ccm: 'https://ccmjs.github.io/ccm/versions/ccm-18.0.5.min.js',
3232
// ccm: 'https://ccmjs.github.io/ccm/ccm.js',
3333

3434
/**
@@ -39,7 +39,7 @@
3939

4040
html: {
4141
main: {
42-
style: "width:600px;height:400px;"
42+
style: "width:600px;height:350px;"
4343
}
4444
},
4545

@@ -55,10 +55,10 @@
5555

5656
plot_config: {},
5757

58-
plotly_lib: [ 'ccm.load', 'https://cdn.plot.ly/plotly-1.41.3.min.js' ]
58+
plotly_lib: [ 'ccm.load', 'https://cdn.plot.ly/plotly-1.41.3.min.js' ],
5959

6060
// css: [ 'ccm.load', 'resources/default.css' ],
61-
// css: [ 'ccm.load', 'https://ccmjs.github.io/mkaul-components/plotly/resources/default.css' ],
61+
css: [ 'ccm.load', 'https://ccmjs.github.io/mkaul-components/plotly/resources/default.css' ],
6262
// onfinish: function( instance, results ){ console.log( results ); }
6363
},
6464

0 commit comments

Comments
 (0)