Skip to content

Commit

Permalink
Refactor format_section_override out of style-spec (#9543)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Hamley authored Apr 10, 2020
1 parent 2b4a337 commit d9696a0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
// @flow

import assert from 'assert';
import type {Expression} from '../expression';
import type EvaluationContext from '../evaluation_context';
import type {Type} from '../types';
import type {ZoomConstantExpression} from '../../expression';
import {NullType} from '../types';
import {PossiblyEvaluatedPropertyValue} from '../../../style/properties';
import {register} from '../../../util/web_worker_transfer';

import type {Expression} from '../style-spec/expression/expression';
import type EvaluationContext from '../style-spec/expression/evaluation_context';
import type {Type} from '../style-spec/expression/types';
import type {ZoomConstantExpression} from '../style-spec/expression';
import {NullType} from '../style-spec/expression/types';
import {PossiblyEvaluatedPropertyValue} from './properties';
import {register} from '../util/web_worker_transfer';

// This is an internal expression class. It is only used in GL JS and
// has GL JS dependencies which can break the standalone style-spec module
export default class FormatSectionOverride<T> implements Expression {
type: Type;
defaultValue: PossiblyEvaluatedPropertyValue<T>;
Expand Down
2 changes: 1 addition & 1 deletion src/style/style_layer/symbol_style_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import type {CanonicalTileID} from '../../source/tile_id';
import {FormattedType} from '../../style-spec/expression/types';
import {typeOf} from '../../style-spec/expression/values';
import Formatted from '../../style-spec/expression/types/formatted';
import FormatSectionOverride from '../../style-spec/expression/definitions/format_section_override';
import FormatSectionOverride from '../format_section_override';
import FormatExpression from '../../style-spec/expression/definitions/format';
import Literal from '../../style-spec/expression/definitions/literal';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {createExpression, ZoomConstantExpression} from '../../../src/style-spec/
import EvaluationContext from '../../../src/style-spec/expression/evaluation_context';
import properties from '../../../src/style/style_layer/symbol_style_layer_properties';
import {PossiblyEvaluatedPropertyValue} from '../../../src/style/properties';
import FormatSectionOverride from '../../../src/style-spec/expression/definitions/format_section_override';
import FormatSectionOverride from '../../../src/style/format_section_override';

test('evaluate', (t) => {

Expand Down
2 changes: 1 addition & 1 deletion test/unit/symbol/symbol_style_layer.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {test} from '../../util/test';
import SymbolStyleLayer from '../../../src/style/style_layer/symbol_style_layer';
import FormatSectionOverride from '../../../src/style-spec/expression/definitions/format_section_override';
import FormatSectionOverride from '../../../src/style/format_section_override';
import properties from '../../../src/style/style_layer/symbol_style_layer_properties';

function createSymbolLayer(layerProperties) {
Expand Down

0 comments on commit d9696a0

Please sign in to comment.