Skip to content

Commit

Permalink
Fix geo sublayout params
Browse files Browse the repository at this point in the history
  • Loading branch information
zBritva committed Nov 4, 2024
1 parent 3e4082b commit 50fa902
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/app/views/panels/constraints_panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ export const ConstraintsPanel: React.FC<{
setConstraints(newConstraints);
}}
onRemove={() => {
debugger;
const newConstraints = [...constraints];
const index = newConstraints.findIndex(c => c._id === constraint._id);
newConstraints.splice(index, 1);
Expand Down
14 changes: 9 additions & 5 deletions src/core/prototypes/plot_segments/region_2d/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2298,7 +2298,7 @@ export class Region2DConstraintBuilder {
const shiftX = - (<number>x2 - <number>x1) / 2;
const shiftY = (<number>y2 - <number>y1) / 2;

if (!geoProps.GeoJSON) {
if (!geoProps || !geoProps.GeoJSON) {
return;
}

Expand Down Expand Up @@ -2352,6 +2352,10 @@ export class Region2DConstraintBuilder {
return projection;
});

if (coordinateColumns.length == 0) {
return;
}

for (const gr in groups) {
const glyphGroup = groups[gr];
for (const groupIndex in glyphGroup.group) {
Expand Down Expand Up @@ -3435,8 +3439,8 @@ export class Region2DConstraintBuilder {
label: strings.objects.plotSegment.geo.x,
showUpdown: true,
updownTick: 1,
minimum: -1000,
maximum: 1000,
minimum: -5000,
maximum: 5000,
searchSection: strings.objects.style,
}
),
Expand All @@ -3449,8 +3453,8 @@ export class Region2DConstraintBuilder {
label: strings.objects.plotSegment.geo.y,
showUpdown: true,
updownTick: 1,
minimum: -1000,
maximum: 1000,
minimum: -5000,
maximum: 5000,
searchSection: strings.objects.style,
}
),
Expand Down

0 comments on commit 50fa902

Please # to comment.