Skip to content

Commit

Permalink
dont render custom label text legend (needs discussion)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck committed Dec 26, 2019
1 parent 6f2e262 commit facba05
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import React from 'react';
import _ from 'lodash';
import { RangedStyleLegendRow } from '../../../components/ranged_style_legend_row';
import { VECTOR_STYLES } from '../../vector_style_defaults';
const EMPTY_VALUE = '';

export class DynamicLegendRow extends React.Component {
Expand Down Expand Up @@ -82,6 +83,12 @@ export class DynamicLegendRow extends React.Component {
}

_renderBreakedLegend() {
if (this.props.style.getStyleName() === VECTOR_STYLES.LABEL_TEXT) {
//It is not clear how to render breaked legend yet for text.
//Cannot rely on small-legend icon to provide a similar preview
return null;
}

return this.props.style.renderBreakedLegend({
fieldLabel: this.state.label,
isLinesOnly: this.state.isLinesOnly,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,4 @@ export class DynamicTextProperty extends DynamicStyleProperty {
isScaled() {
return false;
}

renderHeader() {
return null;
}
}

0 comments on commit facba05

Please sign in to comment.