calculate coords based on container viewport position (#1955)
* feat: calculate coords based on parent left and top so it renders correctly in host App * fix text * move offsets to state & fix bugs * fix text jumping * account for zoom in textWysiwyg & undo incorrect offsetting Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
@ -8,7 +8,10 @@ import {
|
||||
DEFAULT_TEXT_ALIGN,
|
||||
} from "./constants";
|
||||
|
||||
export const getDefaultAppState = (): AppState => {
|
||||
export const getDefaultAppState = (): Omit<
|
||||
AppState,
|
||||
"offsetTop" | "offsetLeft"
|
||||
> => {
|
||||
return {
|
||||
isLoading: false,
|
||||
errorMessage: null,
|
||||
@ -126,6 +129,8 @@ const APP_STATE_STORAGE_CONF = (<
|
||||
width: { browser: false, export: false },
|
||||
zenModeEnabled: { browser: true, export: false },
|
||||
zoom: { browser: true, export: false },
|
||||
offsetTop: { browser: false, export: false },
|
||||
offsetLeft: { browser: false, export: false },
|
||||
});
|
||||
|
||||
const _clearAppStateForStorage = <ExportType extends "export" | "browser">(
|
||||
|
Reference in New Issue
Block a user