manubb / Leaflet.PixiOverlay

Bring Pixi.js power to Leaflet maps
MIT License
474 stars 84 forks source link

Pixi 5.0 compatibility fix #18

Closed dzwiedzmin closed 5 years ago

dzwiedzmin commented 6 years ago

Due to some changes in Pixi.js v5 renderer Leaflet.PixiOverlay's code is not working with the newest Pixi.js alpha.

After changing

if (this._renderer.gl) { this._renderer.resolution = this._renderer.rootRenderTarget.resolution = this.options.resolution; }

to

if (this._renderer.gl) { this._renderer.resolution = this.options.resolution; if (this._renderer.rootRenderTarget != void 0) this._renderer.rootRenderTarget.resolution = this.options.resolution; }

everything should work on both the current and the alpha version of Pixi.js

manubb commented 5 years ago

Published in leaflet-pixi-overlay@1.7.0 Thank you @dzwiedzmin!