Skip to content

Commit

Permalink
Merge pull request #49 from DavidLevinsky/master
Browse files Browse the repository at this point in the history
Fixed bound layer masks and fixed style paths
  • Loading branch information
davidmtech authored Jun 2, 2017
2 parents 90f57dc + 624aa56 commit 01ddf47
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vts-browser-js",
"version": "2.5.0",
"version": "2.5.2",
"description": "JavaScript WebGL 3D maps rendering engine",
"main": "src/browser/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ string getCoreVersion()
*/

function getCoreVersion(full) {
return (full ? 'Core: ' : '') + '2.5.0';
return (full ? 'Core: ' : '') + '2.5.2';
}


Expand Down
2 changes: 1 addition & 1 deletion src/core/inspector/stylesheets.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ InspectorStylesheets.prototype.onUpdate = function() {


InspectorStylesheets.prototype.niceStyleFormat = function(data) {
if (!data) {
if (!data || !data.data) {
return '';
}

Expand Down
9 changes: 7 additions & 2 deletions src/core/map/stylesheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {utils as utils_} from '../utils/utils';
var utils = utils_;


var MapStylesheet = function(map, id, url) {
var MapStylesheet = function(map, id, url, freeLayer) {
this.generateLines = true;
this.map = map;
this.stats = map.stats;
Expand All @@ -15,12 +15,17 @@ var MapStylesheet = function(map, id, url) {
this.loadState = 0;
this.size = 0;
this.fileSize = 0;
this.freeLayer = freeLayer;

if (typeof url === 'object') {
this.data = url;
this.loadState = 2;
} else {
this.url = this.map.url.processUrl(url);
if (this.freeLayer) {
this.url = this.freeLayer.processUrl(url, '');
} else {
this.url = this.map.url.processUrl(url);
}

//load style directly
utils.loadJSON(this.url, this.onLoaded.bind(this), this.onLoadError.bind(this), null, (utils.useCredentials ? (this.url.indexOf(this.map.url.baseUrl) != -1) : false), this.map.core.xhrParams);
Expand Down
2 changes: 1 addition & 1 deletion src/core/map/surface.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ MapSurface.prototype.setStyle = function(style) {
this.stylesheet = this.map.getStylesheet(style);

if (!this.stylesheet) {
this.stylesheet = new MapStylesheet(this.map, style, style);
this.stylesheet = new MapStylesheet(this.map, style, style, this);
this.map.addStylesheet(style, this.stylesheet);
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/map/texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ MapTexture.prototype.getMaskTexture = function() {

MapTexture.prototype.getGpuMaskTexture = function() {
if (this.extraBound) {
if (this.extraBound.texture && this.extraBound.texture.mask) {
if (this.extraBound.texture && this.extraBound.texture.maskTexture) {
return this.extraBound.texture.getGpuMaskTexture();
}
return null;
Expand Down

0 comments on commit 01ddf47

Please sign in to comment.