Skip to content

Commit

Permalink
wip 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
roncodes committed Dec 8, 2023
1 parent 1c111ef commit 6de1db7
Show file tree
Hide file tree
Showing 12 changed files with 2,188 additions and 4,252 deletions.
3 changes: 1 addition & 2 deletions addon/utils/geojson/circle.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import GeoJson, { EarthRadius, MercatorCRS, DegreesPerRadian, RadiansPerDegree } from './geo-json';
import Feature from './feature';
import closedPolygon from './closed-polygon';
import { assign } from '@ember/polyfills';

function radToDeg(rad) {
return rad * DegreesPerRadian;
Expand Down Expand Up @@ -78,7 +77,7 @@ export default class Circle extends GeoJson {
throw new Error('GeoJSON: missing parameter for new Circle');
}

assign(
Object.assign(
this,
new Feature({
type: 'Feature',
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/feature-collection.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import GeoJson from './geo-json';
import Feature from './feature';
import { assign } from '@ember/polyfills';
import { isArray } from '@ember/array';

export default class FeatureCollection extends GeoJson {
constructor(input) {
super();

if (input && input.type === 'FeatureCollection' && input.features) {
assign(this, input);
Object.assign(this, input);
} else if (isArray(input)) {
this.features = input;
} else {
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/feature.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import GeoJson from './geo-json';
import { assign } from '@ember/polyfills';

export default class Feature extends GeoJson {
constructor(input) {
super();

if (input && input.type === 'Feature') {
assign(this, input);
Object.assign(this, input);
} else if (input && input.type && input.coordinates) {
this.geometry = input;
} else {
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/geometry-collection.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import GeoJson from './geo-json';
import { assign } from '@ember/polyfills';
import { isArray } from '@ember/array';

export default class GeometryCollection extends GeoJson {
constructor(input) {
super();

if (input && input.type === 'GeometryCollection' && input.geometries) {
assign(this, input);
Object.assign(this, input);
} else if (isArray(input)) {
this.geometries = input;
} else if (input.coordinates && input.type) {
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/line-string.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import GeoJson from './geo-json';
import { assign } from '@ember/polyfills';
import { isArray } from '@ember/array';

export default class LineString extends GeoJson {
constructor(input) {
super();

if (input && input.type === 'LineString' && input.coordinates) {
assign(this, input);
Object.assign(this, input);
} else if (isArray(input)) {
this.coordinates = input;
} else {
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/multi-line-string.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import GeoJson from './geo-json';
import LineString from './line-string';
import { assign } from '@ember/polyfills';
import { isArray } from '@ember/array';

export default class MultiLineString extends GeoJson {
constructor(input) {
super();

if (input && input.type === 'MultiLineString' && input.coordinates) {
assign(this, input);
Object.assign(this, input);
} else if (isArray(input)) {
this.coordinates = input;
} else {
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/multi-point.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import GeoJson from './geo-json';
import Point from './point';
import { assign } from '@ember/polyfills';
import { isArray } from '@ember/array';

export default class MultiPoint extends GeoJson {
constructor(input) {
super();

if (input && input.type === 'MultiPolygon' && input.coordinates) {
assign(this, input);
Object.assign(this, input);
} else if (isArray(input)) {
this.coordinates = input;
} else {
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/multi-polygon.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import GeoJson from './geo-json';
import Polygon from './polygon';
import closedPolygon from './closed-polygon';
import { assign } from '@ember/polyfills';
import { isArray } from '@ember/array';

export default class MultiPolygon extends GeoJson {
constructor(input) {
super();

if (input && input.type === 'MultiPolygon' && input.coordinates) {
assign(this, input);
Object.assign(this, input);
} else if (isArray(input)) {
this.coordinates = input;
} else {
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/point.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import GeoJson from './geo-json';
import { assign } from '@ember/polyfills';
import { isArray } from '@ember/array';

export default class Point extends GeoJson {
Expand All @@ -8,7 +7,7 @@ export default class Point extends GeoJson {
var args = Array.prototype.slice.call(arguments);

if (input && input.type === 'Point' && input.coordinates) {
assign(this, input);
Object.assign(this, input);
} else if (input && isArray(input)) {
this.coordinates = input;
} else if (args.length >= 2) {
Expand Down
3 changes: 1 addition & 2 deletions addon/utils/geojson/polygon.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import GeoJson from './geo-json';
import closedPolygon from './closed-polygon';
import { assign } from '@ember/polyfills';
import { isArray } from '@ember/array';

export default class Polygon extends GeoJson {
constructor(input) {
super();

if (input && input.type === 'Polygon' && input.coordinates) {
assign(this, input);
Object.assign(this, input);
} else if (isArray(input)) {
this.coordinates = input;
} else {
Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^3.2.0",
"@embroider/test-setup": "^3.0.2",
"@fleetbase/ember-core": "^0.1.6",
"@fleetbase/ember-core": "link:../ember-core",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"broccoli-asset-rev": "^3.0.0",
Expand All @@ -59,7 +59,7 @@
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-data": "^5.3.0",
"ember-data": "^4.12.5",
"ember-load-initializers": "^2.1.2",
"ember-page-title": "^8.0.0",
"ember-qunit": "^8.0.1",
Expand All @@ -83,9 +83,6 @@
"stylelint-prettier": "^4.0.2",
"webpack": "^5.89.0"
},
"peerDependencies": {
"ember-source": ">= 4.0.0"
},
"engines": {
"node": ">= 18"
},
Expand Down
Loading

0 comments on commit 6de1db7

Please sign in to comment.