Skip to content

Commit

Permalink
More rebase fixups.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLoer committed Sep 15, 2017
1 parent 9b89de3 commit 96adda9
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 43 deletions.
4 changes: 0 additions & 4 deletions src/data/bucket/symbol_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ import type {
import type StyleLayer from '../../style/style_layer';
import type {SymbolQuad} from '../../symbol/quads';
import type {SizeData} from '../../symbol/symbol_size';
import type {StyleImage} from '../../style/style_image';
import type {StyleGlyph} from '../../style/style_glyph';
import type {ImagePosition} from '../../render/image_atlas';
import type {GlyphPosition} from '../../render/glyph_atlas';

type SymbolBucketParameters = BucketParameters & {
sdfIcons: boolean,
Expand Down
2 changes: 1 addition & 1 deletion src/source/tile_coord.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class TileCoord {
} else {
return new TileCoord(targetZ, this.x << (targetZ - this.z), this.y << (targetZ - this.z), this.w); // child
}
}
}

isChildOf(coord: TileCoord, sourceMaxZoom: number) {
const parentZ = Math.min(sourceMaxZoom, coord.z);
Expand Down
5 changes: 2 additions & 3 deletions test/unit/data/symbol_bucket.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ test('SymbolBucket', (t) => {
t.end();
});


test('SymbolBucket integer overflow', (t) => {
t.stub(util, 'warnOnce');
t.stub(SymbolBucket, 'MAX_GLYPHS').value(5);
Expand All @@ -90,8 +89,8 @@ test('SymbolBucket integer overflow', (t) => {
const options = {iconDependencies: {}, glyphDependencies: {}};

bucket.populate([{feature}], options);
PrepareSymbols.prepare(bucket, stacks, {});
PlaceSymbols.place(bucket, collision, showCollisionBoxes, zoom, pixelRatio, labelPlaneMatrix, tileID, collisionBoxArray);
const fakeGlyph = { rect: { w: 10, h: 10 }, metrics: { left: 10, top: 10, advance: 10 } };
PrepareSymbols.prepare(bucket, stacks, { 'Test': {97: fakeGlyph, 98: fakeGlyph, 99: fakeGlyph, 100: fakeGlyph, 101: fakeGlyph, 102: fakeGlyph} });

t.ok(util.warnOnce.calledOnce);
t.ok(util.warnOnce.getCall(0).calledWithMatch(/Too many glyphs being rendered in a tile./));
Expand Down
35 changes: 0 additions & 35 deletions test/unit/source/tile.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,41 +156,6 @@ test('Tile#placeLayer', (t) => {
t.end();
});

test('changing cameraToCenterDistance does not trigger placement for low pitch', (t)=>{
const tile = new Tile(new TileCoord(1, 1, 1));
tile.loadVectorData(createVectorData(), createPainter());
t.stub(tile, 'reloadSymbolData').returns(null);
const source1 = util.extend(new Evented(), {
type: 'vector',
dispatcher: {
send: (name, data, cb) => {
cb();
}
},
map: {
transform: { cameraToCenterDistance: 1, pitch: 10, cameraToTileDistance: () => { return 1; } },
painter: { tileExtentVAO: {vao: 0}}
}
});

const source2 = util.extend(new Evented(), {
type: 'vector',
dispatcher: {
send: () => {}
},
map: {
transform: { cameraToCenterDistance: 2, pitch: 10, cameraToTileDistance: () => { return 1; } },
painter: { tileExtentVAO: {vao: 0}}
}
});

tile.redoPlacement(source1);
tile.redoPlacement(source2);

t.ok(tile.state === 'loaded');
t.end();
});

t.end();
});

Expand Down

0 comments on commit 96adda9

Please sign in to comment.