Skip to content

Commit

Permalink
fixed css bug
Browse files Browse the repository at this point in the history
  • Loading branch information
easylogic committed May 25, 2022
1 parent de36070 commit b15ca71
Show file tree
Hide file tree
Showing 15 changed files with 145 additions and 148 deletions.
6 changes: 4 additions & 2 deletions dist/editor.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -6483,9 +6483,11 @@ class ToolbarButtonMenuItem extends EditorElement {
}
[BIND("$el")]() {
const selected = isFunction(this.props.selected) ? this.props.selected(this.$editor) : false;
const disabled = isFunction(this.props.disabled) ? this.props.disabled(this.$editor) : this.props.disabled;
return {
style: __spreadValues({}, this.props.style),
"data-selected": selected
"data-selected": selected,
disabled
};
}
}
Expand Down Expand Up @@ -25025,7 +25027,7 @@ class BlankEditor extends BaseLayout {
}
template() {
return /* @__PURE__ */ createElementJsx("div", {
class: "elf-studio blank-editor"
class: "elf-editor"
}, /* @__PURE__ */ createElementJsx(DefaultLayout, {
showLeftPanel: this.$config.get("show.left.panel"),
showRightPanel: this.$config.get("show.right.panel"),
Expand Down
4 changes: 2 additions & 2 deletions dist/editor.umd.js

Large diffs are not rendered by default.

91 changes: 41 additions & 50 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ declare module "@easylogic/editor" {
// before method

// after method
type MoveMethod = (method: string = "move") => string;
type MoveMethod = (method: string) => string;
export const MOVE: MoveMethod;

type MoveEndMethod = (method: string = "end") => string;
type MoveEndMethod = (method: string) => string;
export const END: MoveEndMethod;

export const PREVENT: string;
Expand Down Expand Up @@ -402,12 +402,12 @@ declare module "@easylogic/editor" {
*/
checkField(key: string, value: any): boolean;

toCloneObject(isDeep: boolean = true): KeyValue;
toCloneObject(isDeep: boolean): KeyValue;

/**
* clone Item
*/
clone(isDeep: boolean = true): Item;
clone(isDeep: boolean): Item;

/**
* set json content
Expand Down Expand Up @@ -510,10 +510,10 @@ declare module "@easylogic/editor" {
*
* @param {number} dist
*/
copy(dist: number = 0): Item;
copy(dist: number): Item;
findIndex(item: Item): number;

copyItem(childItem: Item, dist: number = 10): Item;
copyItem(childItem: Item, dist: number): Item;

/**
* 부모 객체에서 나를 지운다.
Expand Down Expand Up @@ -583,7 +583,7 @@ declare module "@easylogic/editor" {
export class MovableItem extends Item {
get isAbsolute(): boolean;

toCloneObject(isDeep: boolean = true): KeyValue;
toCloneObject(isDeep: boolean): KeyValue;

convert(json: KeyValue): KeyValue;

Expand All @@ -608,8 +608,8 @@ declare module "@easylogic/editor" {
*
* @param {vec3} distVector
*/
move(distVector: vec3 = [0, 0, 0]): void;
moveByCenter(newCenter: vec3 = [0, 0, 0]): void;
move(distVector: vec3): void;
moveByCenter(newCenter: vec3): void;

/**
* 충돌 체크
Expand Down Expand Up @@ -693,18 +693,18 @@ declare module "@easylogic/editor" {
*
* @returns {PathParser}
*/
absolutePath(pathString: string = ""): PathParser;
absolutePath(pathString: string): PathParser;

// 전체 캔버스에 그려진 path 의 개별 verties 를
// svg container 의 matrix 의 inverse matrix 를 곱해서 재계산 한다.
invertPath(pathString: string = ""): PathParser;
invertPath(pathString: string): PathParser;

/**
* pathString 의 좌표를 기준 좌표로 돌린다.
*
* @param {string} pathString svg path string
*/
invertPathString(pathString: string = ""): string;
invertPathString(pathString: string): string;

/**
* 나를 포함한 모든 layer 에 대해서 체크한다.
Expand Down Expand Up @@ -804,18 +804,18 @@ declare module "@easylogic/editor" {
static createComponent: (params: IComponentParams) => Component;
}

class EventMachine {
protected opt: KeyValue = {};
export class EventMachine {
protected opt: KeyValue;
protected parent: any;
protected props: KeyValue = {};
protected state: KeyValue = {};
protected props: KeyValue;
protected state: KeyValue;
public source: string;
public sourceName: string;

/**
* UIElement instance 에 필요한 기본 속성 설정
*/
protected initializeProperty(opt: KeyValue, props: any = {}): void;
protected initializeProperty(opt: KeyValue, props: KeyValue): void;

protected initComponents(): void;

Expand All @@ -835,7 +835,7 @@ declare module "@easylogic/editor" {
* @param {Object} state 새로운 state
* @param {Boolean} isLoad 다시 로드 할 것인지 체크 , true 면 state 변경후 다시 로드
*/
setState(state: KeyValue = {}, isLoad: boolean = true): void;
setState(state: KeyValue, isLoad: boolean): void;

/**
* state 에 있는 key 필드의 값을 토글한다.
Expand All @@ -844,7 +844,7 @@ declare module "@easylogic/editor" {
* @param {string} key
* @param {Boolean} isLoad
*/
toggleState(key: string, isLoad: boolean = true): void;
toggleState(key: string, isLoad: boolean): void;

/**
* 객체를 다시 그릴 때 사용한다.
Expand All @@ -859,7 +859,7 @@ declare module "@easylogic/editor" {
*
* @param {Dom|undefined} $container 컴포넌트가 그려질 대상
*/
async render($container: Dom | undefined): void;
render($container: Dom | undefined): Promise<void>;

protected initialize(): void;

Expand Down Expand Up @@ -892,12 +892,12 @@ declare module "@easylogic/editor" {
*/
public refresh(): void;

async load(...args: any[]): void;
protected load(...args: any[]): Promise<any>;

public bindData(...args: string[]): void;

// 기본 템플릿 지정
template(): string;
protected template(): string|string[]|HTMLElement|HTMLElement[]|null|undefined;

//
protected eachChildren(callback: Function): void;
Expand Down Expand Up @@ -989,7 +989,7 @@ declare module "@easylogic/editor" {

interface ConfigManager {
get(key: string): any;
set(key: string, value: any, isSave: boolean = true): void;
set(key: string, value: any, isSave: boolean): void;
setAll(obj: KeyValue): void;

getType(key: string): string;
Expand Down Expand Up @@ -1067,9 +1067,9 @@ declare module "@easylogic/editor" {
show(): void;

onShowTitle(isShow: boolean): void;
refreshShowIsNot(type: string = "", isRefresh: boolean = true): void;
refreshShowIsNot(type: string, isRefresh: boolean): void;

refreshShow(type: string, isRefresh: boolean = true): void;
refreshShow(type: string, isRefresh: boolean): void;
}

export interface ObjectPropertyProps {
Expand All @@ -1082,15 +1082,15 @@ declare module "@easylogic/editor" {
static create(json: ObjectPropertyProps): BaseProperty;
}

interface ICommandObject {}
export interface ICommandObject {}

interface ShortcutObject {}
export interface ShortcutObject {}

interface MenuItemCallback<T> {
export interface MenuItemCallback<T> {
(editor: EditorInstance, ...args: any[]): T;
}

interface DropdownMenuItem {
export interface DropdownMenuItem {
type: "dropdown";
items?: MenuItem[];
direction?: "left" | "right";
Expand All @@ -1104,9 +1104,9 @@ declare module "@easylogic/editor" {
dy?: number;
}

type EventCommandType = string;
export type EventCommandType = string;

interface CustomMenuItem {
export interface CustomMenuItem {
type: "custom";
title?: string;
icon?: string;
Expand All @@ -1118,7 +1118,7 @@ declare module "@easylogic/editor" {
events?: EventCommandType[];
}

interface ButtonMenuItem {
export interface ButtonMenuItem {
type: "button";
title?: string;
icon?: string;
Expand All @@ -1135,7 +1135,7 @@ declare module "@easylogic/editor" {
style?: KeyValue;
}

interface CheckboxMenuItem {
export interface CheckboxMenuItem {
type: "checkbox";
checked?: boolean | (() => boolean);
value?: string;
Expand All @@ -1152,7 +1152,7 @@ declare module "@easylogic/editor" {
style?: KeyValue;
}

type MenuItem =
export type MenuItem =
| string
| DropdownMenuItem
| ButtonMenuItem
Expand All @@ -1168,7 +1168,7 @@ declare module "@easylogic/editor" {
registerRenderer(
rendererType: string,
name: string,
rendererInstance: IRender
rendererInstance: any
);
registerCommand(commandObject: Function | ICommandObject): void;
registerShortCut(shortcut: ShortcutObject): void;
Expand All @@ -1185,7 +1185,7 @@ declare module "@easylogic/editor" {
* @param {PluginInterface} createPluginFunction
*/
registerPlugin(createPluginFunction: PluginInterface): void;
registerPluginList(plugins: PluginInterface[] = []): void;
registerPluginList(plugins: PluginInterface[]): void;

/**
* locale 에 맞는 i18n 메세지 등록
Expand Down Expand Up @@ -1295,29 +1295,20 @@ declare module "@easylogic/editor" {
options: KeyValue
): Promise<string>;
export function createDesignEditor(opts: EditorOptions): UIElement;
export function createThreeEditor(opts: EditorOptions): UIElement;
export function createBlankEditor(opts: EditorOptions): UIElement;
export function createDataEditor(opts: EditorOptions): UIElement;

// createPageBuilder (opts = {}) {
// return App.start(PageBuilder as any, opts)
// },
export function createWhiteBoard(opts) {
return start(WhiteBoard, opts);
}

export function createComponent(
ComponentName: string,
props: KeyValue = {},
children: any[] = []
props: KeyValue,
children: any[]
): string;

export function createComponentList(...args: any[]): string;

export function createElement(
Component: string,
props: KeyValue = {},
children: any[] = []
props: KeyValue,
children: any[]
): string;

type FragmentInstanceType = any;
Expand All @@ -1329,7 +1320,7 @@ declare module "@easylogic/editor" {

export function createElementJsx(
Component: ElementType | string | FragmentInstanceType,
props: KeyValue = {},
props: KeyValue,
...children: any[]
): string;

Expand Down
2 changes: 1 addition & 1 deletion dist/style.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/assets/editor.50cf8556.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/assets/editor.58120e25.css

This file was deleted.

58 changes: 29 additions & 29 deletions docs/assets/editor.5891116e.js → docs/assets/editor.96e8f19a.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.0/beautify.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.0/beautify-css.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.0/beautify-html.min.js"></script>
<script type="module" crossorigin src="/assets/editor.5891116e.js"></script>
<link rel="stylesheet" href="/assets/editor.58120e25.css">
<script type="module" crossorigin src="/assets/editor.96e8f19a.js"></script>
<link rel="stylesheet" href="/assets/editor.50cf8556.css">
</head>
<body>
<div id="app"></div>
Expand Down
Loading

0 comments on commit b15ca71

Please sign in to comment.