Skip to content

Commit

Permalink
nit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Molly Lloyd committed Mar 22, 2018
1 parent 57e1d4c commit 03828ea
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/data/bucket/line_attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ export const linePatternAttributes = createLayout([
{name: 'a_pattern_to', components: 4, type: 'Float32'}
]);

export default lineLayoutAttributes;
export const {members, size, alignment} = lineLayoutAttributes;
12 changes: 6 additions & 6 deletions src/data/program_configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,16 +504,16 @@ export default class ProgramConfiguration {
}
keys.push(`/u_${property}`);
} else if (property.match(/line-pattern/)) {
const structArrayLayout = layoutType(property, type, 'source');
self.binders[property] = new PatternCompositeExpressionBinder(value.value, names, type, useIntegerZoom, zoom, structArrayLayout);
const StructArrayLayout = layoutType(property, type, 'source');
self.binders[property] = new PatternCompositeExpressionBinder(value.value, names, type, useIntegerZoom, zoom, StructArrayLayout);
keys.push(`/p_${property}`);
} else if (value.value.kind === 'source') {
const structArrayLayout = layoutType(property, type, 'source');
self.binders[property] = new SourceExpressionBinder(value.value, names, type, structArrayLayout);
const StructArrayLayout = layoutType(property, type, 'source');
self.binders[property] = new SourceExpressionBinder(value.value, names, type, StructArrayLayout);
keys.push(`/a_${property}`);
} else {
const structArrayLayout = layoutType(property, type, 'composite');
self.binders[property] = new CompositeExpressionBinder(value.value, names, type, useIntegerZoom, zoom, structArrayLayout);
const StructArrayLayout = layoutType(property, type, 'composite');
self.binders[property] = new CompositeExpressionBinder(value.value, names, type, useIntegerZoom, zoom, StructArrayLayout);
keys.push(`/z_${property}`);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/render/image_atlas.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export class ImagePosition {
export default class ImageAtlas {
image: RGBAImage;
positions: {[string]: ImagePosition};
uploaded: ?boolean;

constructor(images: {[string]: StyleImage}) {
const image = new RGBAImage({width: 0, height: 0});
Expand Down
4 changes: 2 additions & 2 deletions src/source/tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ class Tile {
}

const gl = context.gl;

if (this.iconAtlas) {
if (this.iconAtlas && !this.iconAtlas.uploaded) {
this.iconAtlasTexture = new Texture(context, this.iconAtlas.image, gl.RGBA);
this.iconAtlas.uploaded = true;
}

if (this.glyphAtlasImage) {
Expand Down
8 changes: 4 additions & 4 deletions src/style/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,8 @@ export class CrossFadedDataDrivenProperty<T> extends DataDrivenProperty<?CrossFa
const t = parameters.crossFadingFactor();

return z > parameters.zoomHistory.lastIntegerZoom ?
{ from: min, to: mid, min: min, mid: mid, max: max, fromScale: 2, toScale: 1, t: fraction + (1 - fraction) * t } :
{ from: max, to: mid, min: min, mid: mid, max: max, fromScale: 0.5, toScale: 1, t: 1 - (1 - t) * fraction };
{ from: min, to: mid, min, mid, max, fromScale: 2, toScale: 1, t: fraction + (1 - fraction) * t } :
{ from: max, to: mid, min, mid, max, fromScale: 0.5, toScale: 1, t: 1 - (1 - t) * fraction };
}

interpolate(a: PossiblyEvaluatedPropertyValue<?CrossFaded<T>>): PossiblyEvaluatedPropertyValue<?CrossFaded<T>> {
Expand Down Expand Up @@ -666,8 +666,8 @@ export class CrossFadedProperty<T> implements Property<T, ?CrossFaded<T>> {
const fraction = z - Math.floor(z);
const t = parameters.crossFadingFactor();
return z > parameters.zoomHistory.lastIntegerZoom ?
{ from: min, to: mid, min: min, mid: mid, max: max, fromScale: 2, toScale: 1, t: fraction + (1 - fraction) * t } :
{ from: max, to: mid, min: min, mid: mid, max: max, fromScale: 0.5, toScale: 1, t: 1 - (1 - t) * fraction };
{ from: min, to: mid, min, mid, max, fromScale: 2, toScale: 1, t: fraction + (1 - fraction) * t } :
{ from: max, to: mid, min, mid, max, fromScale: 0.5, toScale: 1, t: 1 - (1 - t) * fraction };
}

interpolate(a: ?CrossFaded<T>): ?CrossFaded<T> {
Expand Down

0 comments on commit 03828ea

Please sign in to comment.