Skip to content

Commit

Permalink
fix: fix the issue where pictorial charts cannot zoom in the blank ar…
Browse files Browse the repository at this point in the history
…eas of a region
  • Loading branch information
xiaoluoHe committed Jan 9, 2025
1 parent e580904 commit 5ae3011
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vchart",
"comment": "fix: fix the issue where map drag interaction cannot be terminated outside the canvas.",
"type": "none"
}
],
"packageName": "@visactor/vchart"
}
7 changes: 6 additions & 1 deletion packages/vchart/src/region/region.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { MarkTypeEnum } from '../mark/interface/type';
import type { ISeries } from '../series/interface';
import type { IModelOption } from '../model/interface';
import type { CoordinateType } from '../typings/coordinate';
import type { IRegion, IRegionSpec, IRegionSpecInfo } from './interface';
import type { IGeoRegionSpec, IRegion, IRegionSpec, IRegionSpecInfo } from './interface';
import type { IInteraction, ITrigger } from '../interaction/interface';
import { Interaction } from '../interaction/interaction';
import { ChartEvent } from '../constant/event';
Expand Down Expand Up @@ -167,6 +167,11 @@ export class Region<T extends IRegionSpec = IRegionSpec> extends LayoutModel<T>
'normal',
AttributeLevel.User_Mark
);

if ((this._spec as IGeoRegionSpec).roam) {
groupMark.setMarkConfig({ interactive: true });
}

this._marks.addMark(groupMark);
return groupMark;
}
Expand Down

0 comments on commit 5ae3011

Please sign in to comment.