parse 3.5.0-alpha.4 → 3.5.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/parse.js +31 -10
- package/dist/parse.min.js +2 -2
- package/dist/parse.weapp.js +31 -10
- package/dist/parse.weapp.min.js +2 -2
- package/lib/browser/CoreManager.js +1 -1
- package/lib/browser/OfflineQuery.js +29 -8
- package/lib/node/CoreManager.js +1 -1
- package/lib/node/OfflineQuery.js +18 -3
- package/lib/react-native/CoreManager.js +1 -1
- package/lib/react-native/OfflineQuery.js +28 -7
- package/lib/weapp/CoreManager.js +1 -1
- package/lib/weapp/OfflineQuery.js +29 -8
- package/package.json +1 -1
package/dist/parse.weapp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parse JavaScript SDK v3.5.0-alpha.
|
|
2
|
+
* Parse JavaScript SDK v3.5.0-alpha.5
|
|
3
3
|
*
|
|
4
4
|
* The source tree of this library can be found at
|
|
5
5
|
* https://github.com/ParsePlatform/Parse-SDK-JS
|
|
@@ -699,7 +699,7 @@ var config
|
|
|
699
699
|
SERVER_AUTH_TOKEN: null,
|
|
700
700
|
LIVEQUERY_SERVER_URL: null,
|
|
701
701
|
ENCRYPTED_KEY: null,
|
|
702
|
-
VERSION: 'js' + "3.5.0-alpha.
|
|
702
|
+
VERSION: 'js' + "3.5.0-alpha.5",
|
|
703
703
|
APPLICATION_ID: null,
|
|
704
704
|
JAVASCRIPT_KEY: null,
|
|
705
705
|
MASTER_KEY: null,
|
|
@@ -6535,21 +6535,42 @@ function matchesKeyConstraints(className, object, objects, key, constraints) {
|
|
|
6535
6535
|
|
|
6536
6536
|
case '$geoWithin':
|
|
6537
6537
|
{
|
|
6538
|
-
|
|
6538
|
+
if (compareTo.$polygon) {
|
|
6539
|
+
var _context4;
|
|
6539
6540
|
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6541
|
+
var points = (0, _map.default)(_context4 = compareTo.$polygon).call(_context4, function (geoPoint) {
|
|
6542
|
+
return [geoPoint.latitude, geoPoint.longitude];
|
|
6543
|
+
});
|
|
6544
|
+
var polygon = new ParsePolygon(points);
|
|
6545
|
+
return polygon.containsPoint(object[key]);
|
|
6546
|
+
}
|
|
6547
|
+
|
|
6548
|
+
if (compareTo.$centerSphere) {
|
|
6549
|
+
var _compareTo$$centerSph = (0, _slicedToArray2.default)(compareTo.$centerSphere, 2),
|
|
6550
|
+
WGS84Point = _compareTo$$centerSph[0],
|
|
6551
|
+
maxDistance = _compareTo$$centerSph[1];
|
|
6552
|
+
|
|
6553
|
+
var centerPoint = new ParseGeoPoint({
|
|
6554
|
+
latitude: WGS84Point[1],
|
|
6555
|
+
longitude: WGS84Point[0]
|
|
6556
|
+
});
|
|
6557
|
+
var point = new ParseGeoPoint(object[key]);
|
|
6558
|
+
|
|
6559
|
+
var _distance = point.radiansTo(centerPoint);
|
|
6560
|
+
|
|
6561
|
+
return _distance <= maxDistance;
|
|
6562
|
+
}
|
|
6563
|
+
|
|
6564
|
+
break;
|
|
6545
6565
|
}
|
|
6546
6566
|
|
|
6547
6567
|
case '$geoIntersects':
|
|
6548
6568
|
{
|
|
6549
6569
|
var _polygon = new ParsePolygon(object[key].coordinates);
|
|
6550
6570
|
|
|
6551
|
-
var
|
|
6552
|
-
|
|
6571
|
+
var _point = new ParseGeoPoint(compareTo.$point);
|
|
6572
|
+
|
|
6573
|
+
return _polygon.containsPoint(_point);
|
|
6553
6574
|
}
|
|
6554
6575
|
|
|
6555
6576
|
default:
|