Skip to content

Commit

Permalink
add warning messages
Browse files Browse the repository at this point in the history
  • Loading branch information
meetar committed May 10, 2018
1 parent e3f0d17 commit e16d749
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/styles/points/points.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ Object.assign(Points, {
style.texcoords = sprite_info.texcoords;
}
else {
log({ level: 'warn', once: true }, `Layer '${draw.layers[draw.layers.length-1]}' uses a texture '${style.texture}' with defined sprites, but no sprite is specified. Skipping features in layer`);
return;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/styles/style_parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ StyleParser.createPointSizePropertyCache = function (obj) {
}

if (!has_pct) { // no percentage-based calculation, one cache for all sprites
if (obj === "auto") { throw `this value only allowed as half of an array, eg [16px, auto]:`; }
obj = StyleParser.createPropertyCache(obj, parsePositiveNumber);
}
else { // per-sprite based evaluation
Expand Down

0 comments on commit e16d749

Please sign in to comment.