mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-19 12:09:25 +08:00
fix(editor): stageOverlay不应受编辑器zoom影响
This commit is contained in:
parent
5ce099c11d
commit
47c42222b3
@ -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,
|
||||
|
@ -90,6 +90,7 @@ class StageOverlay extends BaseService {
|
||||
public createStage(stageOptions: StageOptions = {}) {
|
||||
return useStage({
|
||||
...stageOptions,
|
||||
zoom: 1,
|
||||
runtimeUrl: '',
|
||||
autoScrollIntoView: false,
|
||||
render: async (stage: StageCore) => {
|
||||
|
@ -150,6 +150,7 @@ export interface StageOptions {
|
||||
renderType?: RenderType;
|
||||
guidesOptions?: Partial<GuidesOptions>;
|
||||
disabledMultiSelect?: boolean;
|
||||
zoom?: number;
|
||||
}
|
||||
|
||||
export interface StoreState {
|
||||
|
Loading…
x
Reference in New Issue
Block a user