diff options
author | ninioe <ninioe@gmail.com> | 2016-07-19 09:07:23 +0300 |
---|---|---|
committer | ninioe <ninioe@gmail.com> | 2016-07-19 09:07:23 +0300 |
commit | ef40f3317392068692606b484c6782b95b554cbf (patch) | |
tree | 41c48e6c87620a6444aed0ad5706a94e26b1662d /web/app | |
parent | 04627d7473e4ea21d6ecd950cbb3fdd6fa249429 (diff) | |
parent | d3e063cf9de8a45bed4dfe87b73aadfd8d2edeab (diff) | |
download | trackermap-server-ef40f3317392068692606b484c6782b95b554cbf.tar.gz trackermap-server-ef40f3317392068692606b484c6782b95b554cbf.tar.bz2 trackermap-server-ef40f3317392068692606b484c6782b95b554cbf.zip |
Merge remote-tracking branch 'refs/remotes/tananaev/master'
Diffstat (limited to 'web/app')
-rw-r--r-- | web/app/GeofenceConverter.js | 4 | ||||
-rw-r--r-- | web/app/view/GroupsController.js | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/web/app/GeofenceConverter.js b/web/app/GeofenceConverter.js index ebe121385..339f09615 100644 --- a/web/app/GeofenceConverter.js +++ b/web/app/GeofenceConverter.js @@ -20,7 +20,7 @@ Ext.define('Traccar.GeofenceConverter', { wktToGeometry: function (mapView, wkt) { var geometry, projection, resolutionAtEquator, pointResolution, resolutionFactor, points = [], center, radius, content, i, lat, lon, coordinates; - if (wkt.startsWith('POLYGON')) { + if (wkt.lastIndexOf('POLYGON', 0) === 0) { content = wkt.match(/\([^\(\)]+\)/); if (content !== null) { coordinates = content[0].match(/-?\d+\.?\d*/g); @@ -34,7 +34,7 @@ Ext.define('Traccar.GeofenceConverter', { geometry = new ol.geom.Polygon([points]); } } - } else if (wkt.startsWith('CIRCLE')) { + } else if (wkt.lastIndexOf('CIRCLE', 0) === 0) { content = wkt.match(/\([^\(\)]+\)/); if (content !== null) { coordinates = content[0].match(/-?\d+\.?\d*/g); diff --git a/web/app/view/GroupsController.js b/web/app/view/GroupsController.js index 1764423d7..4cf1459a6 100644 --- a/web/app/view/GroupsController.js +++ b/web/app/view/GroupsController.js @@ -19,6 +19,7 @@ Ext.define('Traccar.view.GroupsController', { alias: 'controller.groups', requires: [ + 'Traccar.view.GroupDialog', 'Traccar.view.GroupGeofences' ], |