File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import {
1919} from './default_panels' ;
2020import { traceHasColorbar } from './default_panels/StyleColorbarsPanel' ;
2121import Logo from './components/widgets/Logo' ;
22- import { TRANSFORMABLE_TRACES } from './lib/constants' ;
22+ import { TRANSFORMABLE_TRACES , TRACE_TO_AXIS } from './lib/constants' ;
2323
2424class DefaultEditor extends Component {
2525 constructor ( props , context ) {
@@ -71,11 +71,9 @@ class DefaultEditor extends Component {
7171 }
7272
7373 hasMaps ( ) {
74- const {
75- layout : { geo, mapbox} ,
76- } = this . context ;
77-
78- return Boolean ( geo ) || Boolean ( mapbox ) ;
74+ return this . context . fullData . some ( d =>
75+ [ ...TRACE_TO_AXIS . geo , ...TRACE_TO_AXIS . mapbox ] . includes ( d . type )
76+ ) ;
7977 }
8078
8179 render ( ) {
You can’t perform that action at this time.
0 commit comments