[gnome-maps] geoJSONSource: Make exporting to image work
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] geoJSONSource: Make exporting to image work
- Date: Sun, 13 Dec 2015 20:31:24 +0000 (UTC)
commit fe17a71962844c055ab64665c46cc1c80f254b02
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Sun Dec 13 21:31:11 2015 +0100
geoJSONSource: Make exporting to image work
src/geoJSONSource.js | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/geoJSONSource.js b/src/geoJSONSource.js
index 820178b..01fd917 100644
--- a/src/geoJSONSource.js
+++ b/src/geoJSONSource.js
@@ -218,12 +218,6 @@ const GeoJSONSource = new Lang.Class({
_renderTile: function(tile) {
let tileJSON = this._tileIndex.getTile(tile.zoom_level, tile.x, tile.y);
-
- if (!tileJSON) {
- tile.emit('render-complete', null, 0, false);
- return;
- }
-
let content = new Clutter.Canvas({ width: TILE_SIZE,
height: TILE_SIZE });
tile.content = new Clutter.Actor({ width: TILE_SIZE,
@@ -231,11 +225,17 @@ const GeoJSONSource = new Lang.Class({
content: content });
content.connect('draw', (function(canvas, cr) {
+ tile.set_surface(cr.getTarget());
cr.setOperator(Cairo.Operator.CLEAR);
cr.paint();
cr.setOperator(Cairo.Operator.OVER);
cr.setFillRule(Cairo.FillRule.EVEN_ODD);
+ if (!tileJSON) {
+ tile.emit('render-complete', null, 0, false);
+ return;
+ }
+
tileJSON.features.forEach(function(feature) {
if (feature.type === TileFeature.POINT)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]