diff --git a/imports/api/ActiveFiresUnion/server/publications.js b/imports/api/ActiveFiresUnion/server/publications.js index 9ea010c..6a126d8 100644 --- a/imports/api/ActiveFiresUnion/server/publications.js +++ b/imports/api/ActiveFiresUnion/server/publications.js @@ -67,12 +67,14 @@ Meteor.publish('activefiresunionmyloc', function activeInMyLoc(northEastLng, nor check(northEastLat, NumberBetween(-90, 90)); check(withMarks, Boolean); - if (!Meteor.isDevelopment) return this.ready(); // empty + // I use this for fire stats + // if (!Meteor.isDevelopment) return this.ready(); // empty return activeFiresUnion(northEastLng, northEastLat, southWestLng, southWestLat, withMarks); }); // Warning: this increase always by one the fire stats Meteor.publish('lastFireUnionDetected', function lastFireDetected() { - if (!Meteor.isDevelopment) return this.ready(); // empty + // I use this for fire stats + // if (!Meteor.isDevelopment) return this.ready(); // empty return ActiveFiresUnion.find({}, { limit: 1, sort: { when: -1 } }); }); diff --git a/imports/ui/components/Maps/FireCircleMark.js b/imports/ui/components/Maps/FireCircleMark.js index 901d905..80b9826 100644 --- a/imports/ui/components/Maps/FireCircleMark.js +++ b/imports/ui/components/Maps/FireCircleMark.js @@ -31,7 +31,7 @@ class FireCircleMark extends Component { } = this.props; const rect = rectangleAround({ lat, lon }, track, track); return ( - + ); diff --git a/imports/ui/pages/FiresMap/FiresMap.js b/imports/ui/pages/FiresMap/FiresMap.js index 09ceacd..e797427 100644 --- a/imports/ui/pages/FiresMap/FiresMap.js +++ b/imports/ui/pages/FiresMap/FiresMap.js @@ -84,19 +84,6 @@ class FiresMap extends React.Component { }); } - /* shouldComponentUpdate(nextProps, nextState) { - * const notMoving = !nextState.moving; - * const markersChanged = this.state.useMarkers !== nextState.useMarkers; - * const unionChanged = this.state.showSubsUnion !== nextState.showSubsUnion; - * const otherViewport = this.state.viewport !== nextState.viewport; - * // const init = nextState.viewport.center === [0, 0]; - * // console.log(notMoving ? 'Not moving map' : 'Moving map'); - * // console.log(otherViewport ? 'Other viewport' : 'Not other viewport'); - * console.log(`${otherViewport ? 'OTHER' : 'Not other'} viewport ${nextState.viewport.center} zoom: ${nextState.viewport.zoom}`); - * return this.state.init || (notMoving && otherViewport && this.state.moved) || unionChanged || markersChanged; - * } - */ - shouldComponentUpdate(nextProps, nextState) { const notMoving = !nextState.moving; return notMoving; @@ -249,7 +236,7 @@ class FiresMap extends React.Component {

{ (this.props.activefires.length + this.props.firealerts.length) === 0 ? No hay fuegos activos en esta zona del mapa. {{ countTotal: this.props.activefirestotal }} fuegos activos en el mundo. : - En rojo, {{ count: this.props.activefires.length + this.props.firealerts.length }} fuegos activos. {{ countTotal: this.props.activefirestotal }} fuegos activos en el mundo. + En rojo, {{ count: this.props.activefiresunion.length + this.props.firealerts.length }} fuegos activos. {{ countTotal: this.props.activefirestotal }} fuegos activos en el mundo. }

{isNotHomeAndMobile() && this.props.firealerts.length > 0 &&