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({
|
const stage = new StageCore({
|
||||||
render: stageOptions.render,
|
render: stageOptions.render,
|
||||||
runtimeUrl: stageOptions.runtimeUrl,
|
runtimeUrl: stageOptions.runtimeUrl,
|
||||||
zoom: zoom.value,
|
zoom: stageOptions.zoom ?? zoom.value,
|
||||||
autoScrollIntoView: stageOptions.autoScrollIntoView,
|
autoScrollIntoView: stageOptions.autoScrollIntoView,
|
||||||
isContainer: stageOptions.isContainer,
|
isContainer: stageOptions.isContainer,
|
||||||
containerHighlightClassName: stageOptions.containerHighlightClassName,
|
containerHighlightClassName: stageOptions.containerHighlightClassName,
|
||||||
|
@ -90,6 +90,7 @@ class StageOverlay extends BaseService {
|
|||||||
public createStage(stageOptions: StageOptions = {}) {
|
public createStage(stageOptions: StageOptions = {}) {
|
||||||
return useStage({
|
return useStage({
|
||||||
...stageOptions,
|
...stageOptions,
|
||||||
|
zoom: 1,
|
||||||
runtimeUrl: '',
|
runtimeUrl: '',
|
||||||
autoScrollIntoView: false,
|
autoScrollIntoView: false,
|
||||||
render: async (stage: StageCore) => {
|
render: async (stage: StageCore) => {
|
||||||
|
@ -150,6 +150,7 @@ export interface StageOptions {
|
|||||||
renderType?: RenderType;
|
renderType?: RenderType;
|
||||||
guidesOptions?: Partial<GuidesOptions>;
|
guidesOptions?: Partial<GuidesOptions>;
|
||||||
disabledMultiSelect?: boolean;
|
disabledMultiSelect?: boolean;
|
||||||
|
zoom?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface StoreState {
|
export interface StoreState {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user