fix(editor): stageOverlay不应受编辑器zoom影响

This commit is contained in:
roymondchen 2024-05-23 19:32:00 +08:00
parent 5ce099c11d
commit 47c42222b3
3 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,7 @@ export const useStage = (stageOptions: StageOptions) => {
const stage = new StageCore({
render: stageOptions.render,
runtimeUrl: stageOptions.runtimeUrl,
zoom: zoom.value,
zoom: stageOptions.zoom ?? zoom.value,
autoScrollIntoView: stageOptions.autoScrollIntoView,
isContainer: stageOptions.isContainer,
containerHighlightClassName: stageOptions.containerHighlightClassName,

View File

@ -90,6 +90,7 @@ class StageOverlay extends BaseService {
public createStage(stageOptions: StageOptions = {}) {
return useStage({
...stageOptions,
zoom: 1,
runtimeUrl: '',
autoScrollIntoView: false,
render: async (stage: StageCore) => {

View File

@ -150,6 +150,7 @@ export interface StageOptions {
renderType?: RenderType;
guidesOptions?: Partial<GuidesOptions>;
disabledMultiSelect?: boolean;
zoom?: number;
}
export interface StoreState {